From: Zhongkun He <hezhongkun.hzk@bytedance.com>
To: Michal Hocko <mhocko@suse.com>
Cc: hannes@cmpxchg.org, roman.gushchin@linux.dev,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-mm@kvack.org, lizefan.x@bytedance.com,
wuyun.abel@bytedance.com
Subject: Re: [External] Re: [PATCH] cgroup/cpuset: Add a new isolated mems.policy type.
Date: Wed, 14 Sep 2022 23:10:47 +0800 [thread overview]
Message-ID: <120cb50d-d617-a60a-ec24-915f826318f1@bytedance.com> (raw)
In-Reply-To: <fa5e5a79-aa1a-a009-d0c8-0a39380a71b6@bytedance.com>
>>
>>> Back to the previous question.
>>>> The question is how to implement that with a sensible semantic.
>>>
>>> Thanks for your analysis and suggestions.It is really difficult to add
>>> policy directly to cgroup for the hierarchical enforcement. It would
>>> be a good idea to add pidfd_set_mempolicy.
>>
>> Are you going to pursue that path?
> Hi Michal, thanks for your suggestion and reply.
>
> > Are you going to pursue that path?
>
> Yes,I'll give it a try as it makes sense to modify the policy dynamically.
>
> Thanks.
Hi Michal, i have a question about pidfd_set_mempolicy, it would be
better if you have some suggestions.
The task_struct of processes and threads are independent. If we change
the mempolicy of the process through pidfd_set_mempolicy, the mempolicy
of its thread will not change. Of course users can set the mempolicy of
all threads by iterating through /proc/tgid/task.
The question is whether we should override the thread's mempolicy when
setting the process's mempolicy.
There are two options:
A:Change the process's mempolicy and set that mempolicy to all it's threads.
B:Only change the process's mempolicy in kernel. The mempolicy of the
thread needs to be modified by the user through pidfd_set_mempolicy in
userspace, if necessary.
Thanks.
next prev parent reply other threads:[~2022-09-14 15:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 4:02 hezhongkun
2022-09-04 6:04 ` kernel test robot
2022-09-04 6:20 ` kernel test robot
2022-09-04 6:41 ` kernel test robot
2022-09-04 23:08 ` kernel test robot
2022-09-05 6:45 ` Michal Hocko
2022-09-05 10:30 ` [External] " Zhongkun He
2022-09-05 10:50 ` Michal Hocko
2022-09-06 10:37 ` Zhongkun He
2022-09-06 12:33 ` Michal Hocko
2022-09-07 13:50 ` Zhongkun He
2022-09-08 7:19 ` Michal Hocko
2022-09-09 2:55 ` Zhongkun He
2022-09-14 15:10 ` Zhongkun He [this message]
2022-09-23 7:29 ` Michal Hocko
2022-09-23 15:26 ` Zhongkun He
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=120cb50d-d617-a60a-ec24-915f826318f1@bytedance.com \
--to=hezhongkun.hzk@bytedance.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=mhocko@suse.com \
--cc=roman.gushchin@linux.dev \
--cc=wuyun.abel@bytedance.com \
/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
all inboxes | Powered by JetHome®