[v3,13/19] sched/fair: use folio_xchg_last_cpupid() in should_numa_migrate_memory()
Message ID | 20231018140806.2783514-14-wangkefeng.wang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4819432vqb; Wed, 18 Oct 2023 07:11:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXYVH5v4dPW9WCW38V+ZD3IFjHYNNyD4Y4S3cyjVuYW9iEcqPAhbTGxj98XBsdmHpmp93h X-Received: by 2002:a17:902:dace:b0:1ca:8e79:53ae with SMTP id q14-20020a170902dace00b001ca8e7953aemr5419528plx.1.1697638288315; Wed, 18 Oct 2023 07:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697638288; cv=none; d=google.com; s=arc-20160816; b=sfIFk7uwufWCQOLhHXhZuAV4ckdbVPcMnv7fFnM5z3oNWpbAcG/y4xUhi0tQUWShsy nvvhAL4G89bfFdFM+UgMKcBTilQj0fRZvJYaGCwZcVZ/PbIImKYdar7yzf9AKy6yexJS IgIAsdFrPTiOX4g6qQh1HyrFa3Xtr4nty85bnxWUSriTbj7qaV3YkOxQObl3UT82M24L U4eF49VVcmQImbk4Jz+OYDWEueANjjms/HmEMJ4mbAqLce4kPOfhZaaEE3f4G3jM4RWL K7GolnajbpRDZvUO360EgYMA4akeoNUv75tCenOfUCp4pSeeY8sN/lrsZHoCSzxzS//M fs0g== 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=RlBbZypv6yE/hTj8++hHCKN5K1x2FYqLwI5an1ekiHg=; fh=Q+Hibf2y+6rOlBpt37Lm5i0wTMmcQsnxMBqJTtvbZCs=; b=1BxuhrSOla4qAqCTu9yJqsxYHMbC6eqJWo2xHYOFUsatICRvCL9F76LmUB8FZfNqKy BcHjJVm+yEEzi0I9den7Et8Pu4hP7C1xjzHTSf7xoYdGnLSuieZDjiflzbJtkqjgNLjv 7tAeyl33pqCN8uoWRTdC4m/uisDjZJe309Hoi0iO/xOtAF3ddBKmZAM/IpprOalTmyhO vj0qkuTlJl5FY7sfuGSmsIerQvhgsd3ZQSYuvCKwYhLqasfqGgImLjpUCSariORExBLI I2B4AeFx55oDqyfTAO4PmGUfgvFwHpFQcBoyW323HbgYT8iZCUkXmq9AybE8zaPRJDSF sZng== 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 m14-20020a170902f64e00b001ca73864563si1216272plg.232.2023.10.18.07.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 07:11:28 -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 A81AC808E674; Wed, 18 Oct 2023 07:10:18 -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 S1344923AbjJROJj (ORCPT <rfc822;zwp10758@gmail.com> + 23 others); Wed, 18 Oct 2023 10:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344858AbjJROJM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Oct 2023 10:09:12 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 770E4112 for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 07:09:10 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S9Xfq5SM4zCrSG; Wed, 18 Oct 2023 22:05:07 +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; Wed, 18 Oct 2023 22:09:06 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Andrew Morton <akpm@linux-foundation.org> CC: <willy@infradead.org>, <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <ying.huang@intel.com>, <david@redhat.com>, Zi Yan <ziy@nvidia.com>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH v3 13/19] sched/fair: use folio_xchg_last_cpupid() in should_numa_migrate_memory() Date: Wed, 18 Oct 2023 22:08:00 +0800 Message-ID: <20231018140806.2783514-14-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231018140806.2783514-1-wangkefeng.wang@huawei.com> References: <20231018140806.2783514-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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: <linux-kernel.vger.kernel.org> 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]); Wed, 18 Oct 2023 07:10:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780102765690006471 X-GMAIL-MSGID: 1780102765690006471 |
Series |
mm: convert page cpupid functions to folios
|
|
Commit Message
Kefeng Wang
Oct. 18, 2023, 2:08 p.m. UTC
Convert to use folio_xchg_last_cpupid() in should_numa_migrate_memory().
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b8c52893b3d9..bafac84f7be9 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1862,7 +1862,7 @@ bool should_numa_migrate_memory(struct task_struct *p, struct folio *folio, } this_cpupid = cpu_pid_to_cpupid(dst_cpu, current->pid); - last_cpupid = page_cpupid_xchg_last(&folio->page, this_cpupid); + last_cpupid = folio_xchg_last_cpupid(folio, this_cpupid); if (!(sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING) && !node_is_toptier(src_nid) && !cpupid_valid(last_cpupid))