From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DB6BC369AB for ; Sat, 19 Apr 2025 01:59:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 362DA6B0005; Fri, 18 Apr 2025 21:59:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2EAB26B0007; Fri, 18 Apr 2025 21:59:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 167C06B0008; Fri, 18 Apr 2025 21:59:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E943A6B0005 for ; Fri, 18 Apr 2025 21:59:11 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 0C2EA1A146F for ; Sat, 19 Apr 2025 01:59:12 +0000 (UTC) X-FDA: 83349135744.21.99CAC35 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf17.hostedemail.com (Postfix) with ESMTP id AE25E40004 for ; Sat, 19 Apr 2025 01:59:09 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=bMZccqlb; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf17.hostedemail.com: domain of llong@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=llong@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1745027949; a=rsa-sha256; cv=none; b=N/Qhyt9NG08Wd5u8syrJsSYUu+xWjdKIC1ZErL7e7tdncjBYVjxWnuCRpum0xjNQcI7P/D yflXrg+c8oXrTIxtjdGdQFTsRF457UHgK/VZdSGeAzPzmbDCHEQ+/BaDhUZ8PsweD8s4fg r8lfaUQbXrdhUCfEXzUsKvw33l9PYZM= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=bMZccqlb; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf17.hostedemail.com: domain of llong@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=llong@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1745027949; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MyE2GzEt6O7iPqkt2gvQatRQFTaplB3Bd3IRBQ3niCU=; b=aO/Wr+i9K+q5oSBW6Ctbc4jZ/7AcBm4o38yCu8hRFMvmDi0nJUN27Tvm9emUxr1zKRoBW2 6TF/ggKQZeskdxPC7MbizPVXqQ2CGIFAYh5ZnSKvk/CXT4T0ewSTutH8KbwWBOKJfTVSjx 6ue9ai6POGdv4lIRksqO12K7U0iTFhc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745027948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MyE2GzEt6O7iPqkt2gvQatRQFTaplB3Bd3IRBQ3niCU=; b=bMZccqlbH1p1QaB4viXtse5rp4JxkRTz37Bxfa7I2gfBrs5FmNkL6K3+ICwxrdMoWuRgZj ytbotQLKiIMpLLamvPB8RAPlYZVWOTm646/1OGLjp2NlesEQelRrSuCQiYXz0eRXyjAqhj CodUVpCy195x6OlsvEsFC8m62OTWxNs= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-386-MOgdZmn5PJKXjD-0uqxFAw-1; Fri, 18 Apr 2025 21:59:07 -0400 X-MC-Unique: MOgdZmn5PJKXjD-0uqxFAw-1 X-Mimecast-MFC-AGG-ID: MOgdZmn5PJKXjD-0uqxFAw_1745027947 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7c793d573b2so408783185a.1 for ; Fri, 18 Apr 2025 18:59:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745027947; x=1745632747; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MyE2GzEt6O7iPqkt2gvQatRQFTaplB3Bd3IRBQ3niCU=; b=pUowe/aKVoa5sKQO/aNwPVkDcj8nSPhaQGkowSl07zQGPq00IOE6se2jtmmqlpElKA SgFZonRYjSVqKA0jwl83je/5PI5WVgOVE3lymYTmHfGwiOQSOT5DJD71tpLYfzH0rHKG 9rHAmOSbbSaKjGuNO7xT1sH/FeOHoTX/L/RLz5a3v4HIqwG3CZZxrrxWbCBTmPruAv2E GOheH8e+xfR4rw2ndo3lKHY/siJh3t7WlACVXdpgzUwlQn1qN9g0Zy0DMql/4mOXc0Cp mzoVKLYt4qwe7L6E2f7Efm0fXw3ihjGkdGbPnozfiWn4tj52T+YExZV1BrkFvnGytKHR ruiA== X-Gm-Message-State: AOJu0YwVe0WqKm1hJgDVzoN04tpuVzrNO1ZA7WdNz+mjGZIgqqR04tu6 bvxty5Gf6Y2sHPFKL+jmR/FPB9FRoVav3pyooGdGAt4zzAXzcJifecIjOHbuUYMFfIHMKEUhLE9 SY3VlhcY918L+B+nr/5/cIidf28ybt1lmwyJoMLDU7wD52Ag0 X-Gm-Gg: ASbGncsDVrnvZkS3hGWPPD7T4ZEOTjFRVtyuIbnmFp2qmdMgHPBBOLR6Id6QOBrhgiz x6ujpMf9HwKORHbtqT101/0K3oozOON5Ioh3a1yJxNeDkVLZhMDCYFcgcQ3TwzyFiAgBCiCJiQK 0s0V5Z0QpPYIMB3B7gyGLv1rly7DAoUmUjVh4fShaHzwlofDw5WYawqN/AG85oodjyenwGLkBp+ QG8WPOvnp+EEvL2bEkURlDmCJjYXNj1jEgoYbD1YxLCuMTeYL+o2oh7DaDq4iSxPVjDuTjScir8 G1TpffjYRshcC8+5WE5WHLYBnb4htj0NJKu6syKlqIBYY7gsYg== X-Received: by 2002:a05:620a:2a12:b0:7c5:3b52:517d with SMTP id af79cd13be357-7c92804942dmr920494085a.54.1745027946872; Fri, 18 Apr 2025 18:59:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHcXj4b/NM1OREe7QzWswzHIaHccrZVLgLJcaMbiSk/L6WwkHUEvx8kXDiJC2XmvPRO2v/pUg== X-Received: by 2002:a05:620a:2a12:b0:7c5:3b52:517d with SMTP id af79cd13be357-7c92804942dmr920491585a.54.1745027946562; Fri, 18 Apr 2025 18:59:06 -0700 (PDT) Received: from [192.168.130.170] (67-212-218-66.static.pfnllc.net. [67.212.218.66]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7c925a6ea8dsm168807885a.9.2025.04.18.18.59.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Apr 2025 18:59:06 -0700 (PDT) From: Waiman Long X-Google-Original-From: Waiman Long Message-ID: <9bcb139c-451b-4ea5-b4ff-21916372d94e@redhat.com> Date: Fri, 18 Apr 2025 21:59:04 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] cpuset: rename cpuset_node_allowed to cpuset_current_node_allowed To: Gregory Price , cgroups@vger.kernel.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, akpm@linux-foundation.org References: <20250418031352.1277966-1-gourry@gourry.net> In-Reply-To: <20250418031352.1277966-1-gourry@gourry.net> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rWP95UI9PiffI2Kaw2JuZXm0i6e71HKG7ZAVkMSvW2g_1745027947 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: AE25E40004 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: ib3a13gtdgj6pc3ca49dimb47wox6haj X-HE-Tag: 1745027949-449880 X-HE-Meta: U2FsdGVkX18lHLtw2MAvAHjfIeyl8bEcHxHOHW8R0kotoY3qJQCGS/QuUgcAkTc610K4/4n+T87ycxoH0Za7ymqvsJmL2s4mV0VpqWgwm08Fr/ACwnAE1DzlPypiVxTpwqtuwnhXMceFLMzbWyQ7NFHgSH4oUyJigxbfIg5s6aU9NzZgDn5RqRpbYCqSs733a2aWB5hT84v9DWE7RKRDDoj4/XLrJfuWhI6TZQiOV7But/kiwWq6cBVe88u5sWMsmMTYFe7x8kKvpO9vaGR54jpbQtUzg35TAQ9AaP+Tylrj5fb9uea401QjGu63MuKOg91acr1Z28tTdaNwWLtEXqU0n4z3dUZT7FBBMQPs/Hc1C0Za/Nu7Bv6VOg4XrbNdAbXJL6EC+yfZde3BqgW7TaVRlmbKdQxc4yr0/eQNShVa+KZmNZSe4o03uT/FH+fsI7P6EEiV9yTzqdw4pL4BiaUlq5Q41xAPMnqSblc4Vx8f6W2IHKrzRLX7U2oeql6fq2f6WlH6jgGj/epdcyqH8V0Tr1njjrWBvGZBG3pJ5vbNE+CIB3glQmUTMBGeSHMcMagbh9UAJfLfs4nToYDXkft5EbR2Rpju2psYBnE7bFH9LnDc6jzjtxcvyxNmOGarXM1G0rNRiUA4y6Ox8IO8ocB8/l5YEO9juHQ3OvNq3zOmvaWoEhHbTsGI8KlGsErag49l8gcXkemNiZPG7SYfKGJth5F4n3L/YHSRYYLYTId/Fw00BNL/tDHT6B5WZkTZk9QhbTXGEMQ80t/1hgDLDwxwnBYRASMkS3lwE/qNangerQkWnFM4bmS3COWzK079lNb0DwaLNb/mdAxHrcBcEztd8FSUoBab9sU0VIbY7jHlunurNn4awP2pKxbjhhtdWNvWQoC46fMhppEcUXPVgvyV7QZt/YolAZEwmfbQJQXcV+zSc22vlwd/S4hoazOXWeVgz2a3pmXZ6Xup14c IUjd5Tee PbWRw33vyBqxy1bwGibOFP+VclcEUhnWaOXxjq1qeT/24e86EKcc9p5T2LeUkFvjOdRGp4eErLAGfS40hwNgRFjEUFFYLzeBSryAwHZYZdptjoz+T47DHiAMRnX+eIo2eMiO2MpKv4xuL3/8JotNdYNx922lMdAU+7zgpuHOmmSS8TArGFmlmP3mgXQ3TUvy+aphK4cEZoqdnfY+wtloyhqo+sLtHmrmu01nRqmFKIsLdwGGo4hDvVcWnHQ81OaKv4mA3H2bVrZjibE5rMtplTv8Id+dp5elfHfeX6xMC2V4SVR0eS12muuKwGPJ0lo37o7j+RsKH4a2k+eX5QXGFOXNu32VYgRcnNK2NZhJcAqiFuIjf1i7sO0xaY3A4U+RDeEVRvfRzuhib7yLKAliCCZDGNuIHuJnQ+fJkquHMo7f0JBsLsY0lf5HwLtGxiF03Kml8Y+YPwPCexb56RNsl0Eu3nXo9R/Lcp6pmqYQScTA23IadeLt82DtDk9yFN+Nl5IdzHGhfo0y2WcA= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 4/17/25 11:13 PM, Gregory Price wrote: > Rename cpuset_node_allowed to reflect that the function checks the > current task's cpuset.mems. This allows us to make a new > cpuset_node_allowed function that checks a target cgroup's cpuset.mems. > > Signed-off-by: Gregory Price > --- > include/linux/cpuset.h | 4 ++-- > kernel/cgroup/cpuset.c | 4 ++-- > mm/page_alloc.c | 4 ++-- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h > index 835e7b793f6a..893a4c340d48 100644 > --- a/include/linux/cpuset.h > +++ b/include/linux/cpuset.h > @@ -82,11 +82,11 @@ extern nodemask_t cpuset_mems_allowed(struct task_struct *p); > void cpuset_init_current_mems_allowed(void); > int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask); > > -extern bool cpuset_node_allowed(int node, gfp_t gfp_mask); > +extern bool cpuset_current_node_allowed(int node, gfp_t gfp_mask); > > static inline bool __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) > { > - return cpuset_node_allowed(zone_to_nid(z), gfp_mask); > + return cpuset_current_node_allowed(zone_to_nid(z), gfp_mask); > } > > static inline bool cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index 0f910c828973..d6ed3f053e62 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -4090,7 +4090,7 @@ static struct cpuset *nearest_hardwall_ancestor(struct cpuset *cs) > } > > /* > - * cpuset_node_allowed - Can we allocate on a memory node? > + * cpuset_current_node_allowed - Can current task allocate on a memory node? > * @node: is this an allowed node? > * @gfp_mask: memory allocation flags > * > @@ -4129,7 +4129,7 @@ static struct cpuset *nearest_hardwall_ancestor(struct cpuset *cs) > * GFP_KERNEL - any node in enclosing hardwalled cpuset ok > * GFP_USER - only nodes in current tasks mems allowed ok. > */ > -bool cpuset_node_allowed(int node, gfp_t gfp_mask) > +bool cpuset_current_node_allowed(int node, gfp_t gfp_mask) > { > struct cpuset *cs; /* current cpuset ancestors */ > bool allowed; /* is allocation in zone z allowed? */ > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 5079b1b04d49..233ce25f8f3d 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3461,7 +3461,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, > retry: > /* > * Scan zonelist, looking for a zone with enough free. > - * See also cpuset_node_allowed() comment in kernel/cgroup/cpuset.c. > + * See also cpuset_current_node_allowed() comment in kernel/cgroup/cpuset.c. > */ > no_fallback = alloc_flags & ALLOC_NOFRAGMENT; > z = ac->preferred_zoneref; > @@ -4148,7 +4148,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask, unsigned int order) > /* > * Ignore cpuset mems for non-blocking __GFP_HIGH (probably > * GFP_ATOMIC) rather than fail, see the comment for > - * cpuset_node_allowed(). > + * cpuset_current_node_allowed(). > */ > if (alloc_flags & ALLOC_MIN_RESERVE) > alloc_flags &= ~ALLOC_CPUSET; Acked-by: Waiman Long