From patchwork Fri Oct 13 08:55:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 152408 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1751602vqb; Fri, 13 Oct 2023 01:58:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRjKZ//s80SaAxK6K3NJlVKd6djfAfdTQHpMBCmTytSOKV1eKGl6276APGXRucbwB1wrDk X-Received: by 2002:a17:903:2306:b0:1bb:ac37:384b with SMTP id d6-20020a170903230600b001bbac37384bmr29315464plh.6.1697187537697; Fri, 13 Oct 2023 01:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697187537; cv=none; d=google.com; s=arc-20160816; b=M7TtGEwzdEW7wGSzv2iUZOdYxS+G6AxU5EHvfKBh/H8KrDTunYQasgNMsbKjzOysXQ S7E18ksQ1TUzTVvDYjpioL/ynIWly1R4AgwxBiBTxIxodDsXIT32DkZGGQVRoJ3xkDx3 i197sL5nqxq/2+5Pq2yZCUXGbS4hXL6NNJKOU4kA+oaO3GeXnWp2t9i80LwAJO+ZRIgE 748ndt5oBtILXkiHirXbyaO8jVKpDo+LqlsjFDSDNOHbJW4xrGIUJL/Bs2dwA7snMEd7 tdedIHOlDYZtxCKzGlxhWskSd2bl2hJqCvyA3KNouSMJS4ytXm1wLaaMiKSA/RDhg+zN MllA== 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=z3XKsRcFGkwnebwYgONpauQeYaDIMFmQ038Pa3oEk3k=; fh=Q+Hibf2y+6rOlBpt37Lm5i0wTMmcQsnxMBqJTtvbZCs=; b=rVahqsuP7nqv2t/N5kurzEngOuTZHHPO/oBjn3xJ3WXz5oFNbWWh/k6vDozjMwWnCJ JN7famKbgokreTPVNOs394F5i8ekBza9TJtOv/x309Bv6q/xFTsM9u+OW8q9JWzD8hYt TqCPaDh/Ttm9+T8YJVgX6Ux1tB7Lu1hdwuEwQJcReScf6tbraET9NfN5RzZLekjsj+qT sUxLFgtrRG+Qutl/wkJFFMjBqDQbe464+3RwiEQnL8RPMc+WnKJW45TwOhGJ2/qbLWju AdYhnFrX7R0TnenKux28IKRvXwMN146UYh/edMgtjTI+fDXAAd9s4wgldirQ5naPYhqw lNAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id x15-20020a170902820f00b001c5ff477ebcsi3821608pln.265.2023.10.13.01.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 01:58:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 8AB2582B90D8; Fri, 13 Oct 2023 01:58:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230382AbjJMI6g (ORCPT + 19 others); Fri, 13 Oct 2023 04:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbjJMI60 (ORCPT ); Fri, 13 Oct 2023 04:58:26 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48310BF for ; Fri, 13 Oct 2023 01:58:24 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S6L295KkrzrTQP; Fri, 13 Oct 2023 16:55:45 +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:22 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Kefeng Wang Subject: [PATCH -next v2 02/19] mm: add folio_last_cpupid() Date: Fri, 13 Oct 2023 16:55:46 +0800 Message-ID: <20231013085603.1227349-3-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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 13 Oct 2023 01:58:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779630119364779718 X-GMAIL-MSGID: 1779630119364779718 Add folio_last_cpupid() wrapper, which is required to convert page_cpupid_last() to folio vertion later in the series. Signed-off-by: Kefeng Wang --- include/linux/mm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index d005beccaa5d..1c393a72037b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1794,6 +1794,11 @@ 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) /*