From: Waiman Long <llong@redhat.com>
To: Gregory Price <gourry@gourry.net>, Tejun Heo <tj@kernel.org>
Cc: cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com,
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
Subject: Re: [PATCH v2 2/2] vmscan,cgroup: apply mems_effective to reclaim
Date: Fri, 18 Apr 2025 23:47:54 -0400 [thread overview]
Message-ID: <fd97e9cc-50d7-4d99-a856-3151891eb397@redhat.com> (raw)
In-Reply-To: <aAMYOxSOrVpjhtzT@gourry-fedora-PF4VCD3F>
On 4/18/25 11:27 PM, Gregory Price wrote:
> On Fri, Apr 18, 2025 at 05:06:20PM -1000, Tejun Heo wrote:
>> Hello,
>>
>> On Thu, Apr 17, 2025 at 11:13:52PM -0400, Gregory Price wrote:
>> ...
>>> +static inline bool mem_cgroup_node_allowed(struct mem_cgroup *memcg, int nid)
>>> +{
>>> + return memcg ? cgroup_node_allowed(memcg->css.cgroup, nid) : true;
>>> +}
>>> +
>> ...
>>> +bool cgroup_node_allowed(struct cgroup *cgroup, int nid)
>>> +{
>>> + return cpuset_node_allowed(cgroup, nid);
>>> +}
>> ...
>>> +bool cpuset_node_allowed(struct cgroup *cgroup, int nid)
>>> +{
>> What does the indirection through cgroup_node_allowed() add? Why not just
>> call cpuset directly?
>>
> This is an artifact of me trying to figure out how to get this to build
> with allconfig (matrix of CPUSET and MEM_CGROUP).
>
> I think you're right, I can probably drop it. I was trying to write :
>
> bool cpuset_node_allowed(struct cpuset *cs, int nid);
The cpuset structure isn't exposed externally. So you can't use cpuset
from outside cpuset.c. Passing the cgroup structure is the right approach.
Cheers,
Longman
>
> and just couldn't do it, so eventually landed on passing the cgroup into
> the cpuset function, which means I think I can drop the indirection now.
>
> Will push it and see if allconfig builds.
>
> Thanks
>
> ~Gregory
>
next prev parent reply other threads:[~2025-04-19 3:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 3:13 [PATCH 1/2] cpuset: rename cpuset_node_allowed to cpuset_current_node_allowed Gregory Price
2025-04-18 3:13 ` [PATCH v2 2/2] vmscan,cgroup: apply mems_effective to reclaim Gregory Price
2025-04-19 2:06 ` Waiman Long
2025-04-19 3:47 ` Gregory Price
2025-04-19 3:53 ` Waiman Long
2025-04-19 3:06 ` Tejun Heo
2025-04-19 3:27 ` Gregory Price
2025-04-19 3:41 ` Gregory Price
2025-04-19 3:47 ` Waiman Long [this message]
2025-04-19 1:59 ` [PATCH 1/2] cpuset: rename cpuset_node_allowed to cpuset_current_node_allowed Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd97e9cc-50d7-4d99-a856-3151891eb397@redhat.com \
--to=llong@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=gourry@gourry.net \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox