public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Zhongkun He <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: [Phishing Risk] [External] Re: [PATCH] cgroup/cpuset: Add a new isolated mems.policy type.
Date: Tue, 6 Sep 2022 07:19:21 -1000	[thread overview]
Message-ID: <YxeBGeOaQxvlPLzo@slm.duckdns.org> (raw)
In-Reply-To: <c05bdeac-b354-0ac7-3233-27f8e5cbb38a-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>

Hello,

On Mon, Sep 05, 2022 at 06:30:38PM +0800, Zhongkun He wrote:
> We usually use numactl to set the memory policy, but it cannot be changed
> dynamically. In addition, the mempolicy of cpuset can provide a more
> convenient interface for management and control panel.

But you can write a better tool easily in userspace to do whatever you wanna
do, right? If you're worried about racing against forks, you can freeze the
cgroup, iterate all pids applying whatever new policy and then unfreeze. We
can probably improve the freezer interface so that multiple users don't
conflict with each other but that shouldn't be too difficult to do and is
gonna be useful generically.

I don't see much point in adding something which can be almost trivially
implemented in userspace as a built-in kernel feature.

> Sorry,I don't quite understand the meaning of "don't enforce anything
> resource related". Does it mean mempolicy, such as "prefer:2" must specify
> node? Or "cpuset.mems.policy" need to specify a default value?
> (cpuset.mems.policy does not require a default value.)

In that there's no real resource being distributed hierarchically like cpu
cycles or memory capacities. All it's doing is changing attributes for a
group of processes, which can be done from userspace all the same.

Thanks.

-- 
tejun

  parent reply	other threads:[~2022-09-06 17:19 UTC|newest]

Thread overview: 9+ 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
     [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 [this message]
     [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

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=YxeBGeOaQxvlPLzo@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