From patchwork Fri Oct 13 08:55:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 152414 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1751767vqb; Fri, 13 Oct 2023 01:59:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+xEKS0LDh/m380tj3/yk7ghvY4MR2cxe8a3FqxBoLrReo4YasEsQ5zJgNrpIOr4qVnzyq X-Received: by 2002:a17:90a:4ca4:b0:274:99ed:a80c with SMTP id k33-20020a17090a4ca400b0027499eda80cmr23840338pjh.3.1697187562714; Fri, 13 Oct 2023 01:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697187562; cv=none; d=google.com; s=arc-20160816; b=CTAiRZ+cj71O4gbuR/+gNC+b9P+xsaeGsXOmB1LFp5lVEBXcTwxXytfttfu7wa6evJ AZhXbeLEl8lsVq0NJDYPmFUw83A821vd/pt8HqKD5KoIrv895aRrWFYL3eGQDnW90GOU ufCn+sChpoz9ZW6p9yQ1/ZmpbJ4+Mr68b5IuzL2PqFa6D15c9cN/yVXRBJF1guWRh8UC F4CdWv34Tna4qRsiSO7ndXCuiRdrEk4fyKzufK1wLkElfLs7foQXcvhYia3UfFkPc54o wXF+MGp+pqfFztI+7ZwhPL1ES6lSRveBkGuf5WQCMhwu1uAtvL48npvNmPgOe6Zjq9u1 FpRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ew90GRduGLuwlGQ2gfJPl9ppfNJrebvIabpuV6V4jCE=; fh=Q+Hibf2y+6rOlBpt37Lm5i0wTMmcQsnxMBqJTtvbZCs=; b=vsDzTiAZqekomiAa3+kf4HuYDFDRf/SvW7g6+NlGPfKR377WwzXQjBG2WrhjoMFYsH Ivhum98wlofbQ0tL+t/IZ2kWhUssVqTrNZOTU/5fPBtT42pHNEullEBft0nmY8ewzYBF iqnAQgMmhp8QrB4j7FUoFQJV3Bb3NEiKF46CM+u38G6iQyYOd3eHq8weOKe6liNRz8Nm POvVWeJiygwPSAJ4Be/McCoA0hI9T/WtwzD8wwiBIcdgF+1jAtbANPBhKPWq3fGKPcu+ +Jpoc0Kx+AZWMnfpJGnO985dhbZrOyuCVC3bF9At4/GCbgrlu+6BPISvaBw701y4hLda fx2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id p20-20020a17090ad31400b002773d013d02si4108506pju.140.2023.10.13.01.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 01:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E907B82CC466; Fri, 13 Oct 2023 01:59:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbjJMI6v (ORCPT + 19 others); Fri, 13 Oct 2023 04:58:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230327AbjJMI6b (ORCPT ); Fri, 13 Oct 2023 04:58:31 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B54B7 for ; Fri, 13 Oct 2023 01:58:26 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S6L2D0JD9zrTQV; Fri, 13 Oct 2023 16:55:48 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 13 Oct 2023 16:58:24 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Kefeng Wang Subject: [PATCH -next v2 06/19] mm: remove page_cpupid_last() Date: Fri, 13 Oct 2023 16:55:50 +0800 Message-ID: <20231013085603.1227349-7-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231013085603.1227349-1-wangkefeng.wang@huawei.com> References: <20231013085603.1227349-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 01:59:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779630145532727762 X-GMAIL-MSGID: 1779630145532727762 Since all calls use folio_last_cpupid(), remove page_cpupid_last(). Signed-off-by: Kefeng Wang --- include/linux/mm.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 1c393a72037b..1d56a818b212 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1700,18 +1700,18 @@ static inline int page_cpupid_xchg_last(struct page *page, int cpupid) return xchg(&page->_last_cpupid, cpupid & LAST_CPUPID_MASK); } -static inline int page_cpupid_last(struct page *page) +static inline int folio_last_cpupid(struct folio *folio) { - return page->_last_cpupid; + return folio->_last_cpupid; } static inline void page_cpupid_reset_last(struct page *page) { page->_last_cpupid = -1 & LAST_CPUPID_MASK; } #else -static inline int page_cpupid_last(struct page *page) +static inline int folio_last_cpupid(struct folio *folio) { - return (page->flags >> LAST_CPUPID_PGSHIFT) & LAST_CPUPID_MASK; + return (folio->flags >> LAST_CPUPID_PGSHIFT) & LAST_CPUPID_MASK; } extern int page_cpupid_xchg_last(struct page *page, int cpupid); @@ -1750,9 +1750,9 @@ static inline int xchg_page_access_time(struct page *page, int time) return 0; } -static inline int page_cpupid_last(struct page *page) +static inline int folio_last_cpupid(struct folio *folio) { - return page_to_nid(page); /* XXX */ + return folio_nid(folio); /* XXX */ } static inline int cpupid_to_nid(int cpupid) @@ -1794,11 +1794,6 @@ static inline void vma_set_access_pid_bit(struct vm_area_struct *vma) } #endif /* CONFIG_NUMA_BALANCING */ -static inline int folio_last_cpupid(struct folio *folio) -{ - return page_cpupid_last(&folio->page); -} - #if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS) /*