Linux cgroups development
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: hezhongkun <hezhongkun.hzk-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
Cc: lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org,
	hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cgroup/cpuset: Add a new isolated mems.policy type.
Date: Sun, 4 Sep 2022 09:42:14 -1000	[thread overview]
Message-ID: <YxT/liaotbiOod51@slm.duckdns.org> (raw)
In-Reply-To: <20220902063303.1057-1-hezhongkun.hzk-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>

Hello,

On Fri, Sep 02, 2022 at 02:33:03PM +0800, hezhongkun wrote:
> From: Zhongkun He <hezhongkun.hzk-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
> 
> Mempolicy is difficult to use because it is set in-process
> via a system call. We want to make it easier to use mempolicy
> in cpuset, and  we can control low-priority cgroups to
> allocate memory in specified nodes. So this patch want to
> adds the mempolicy interface in cpuset.
> 
> The mempolicy priority of cpuset is lower than the task.
> The order of getting the policy is:
> 	1) vma mempolicy
> 	2) task->mempolicy
> 	3) cpuset->mempolicy
> 	4) default policy.
> 
> cpuset's policy is owned by itself, but descendants will
> get the default mempolicy from parent.
> 
> How to use the mempolicy interface:
> 	echo prefer:2 > /sys/fs/cgroup/zz/cpuset.mems.policy
> 	echo bind:1-3 > /sys/fs/cgroup/zz/cpuset.mems.policy
>         echo interleave:0,1,2,3 >/sys/fs/cgroup/zz/cpuset.mems.policy
> Show the policy:
> 	cat /sys/fs/cgroup/zz/cpuset.mems.policy
> 		prefer:2
> 	cat /sys/fs/cgroup/zz/cpuset.mems.policy
> 		bind:1-3
> 	cat /sys/fs/cgroup/zz/cpuset.mems.policy
> 		interleave:0-3
> Clear the policy:
> 	echo default > /sys/fs/cgroup/zz/cpuset.mems.policy

So, I'm a fan of adding cgroup functionalities which don't enforce anything
resource related. What you're proposing can easily be achieved with userland
tooling, right?

Thanks.

-- 
tejun

  parent reply	other threads:[~2022-09-04 19:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02  6:33 [PATCH] cgroup/cpuset: Add a new isolated mems.policy type hezhongkun
2022-09-02  9:14 ` kernel test robot
     [not found] ` <20220902063303.1057-1-hezhongkun.hzk-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-09-02 10:00   ` kernel test robot
2022-09-04 19:42   ` Tejun Heo [this message]
     [not found]     ` <YxT/liaotbiOod51-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-09-05 10:30       ` [Phishing Risk] [External] " Zhongkun He
     [not found]         ` <c05bdeac-b354-0ac7-3233-27f8e5cbb38a-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-09-06 17:19           ` Tejun Heo
     [not found]             ` <YxeBGeOaQxvlPLzo-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-09-07 12:06               ` [Phishing Risk] " Zhongkun He
     [not found]                 ` <d323bd95-476b-0901-855e-14c8796d1b23-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-09-07 15:26                   ` Tejun Heo
2022-09-09  3:00                     ` [Phishing Risk] " Zhongkun He
  -- strict thread matches above, loose matches on Subject: below --
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 23:08 ` kernel test robot
     [not found] ` <20220904040241.1708-1-hezhongkun.hzk-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-09-04  6:41   ` kernel test robot
2022-09-05  6:45   ` Michal Hocko

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=YxT/liaotbiOod51@slm.duckdns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=hezhongkun.hzk-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.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