All of lore.kernel.org
 help / color / mirror / Atom feed
From: 贺中坤 <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
Subject: Re: [External] Re: [PATCH] mm: memcontrol: add the mempolicy interface for cgroup v2.
Date: Tue, 24 May 2022 19:46:38 +0800	[thread overview]
Message-ID: <CACSyD1N4VeWBOzZwBogDW-wBbLvF54VrZ1Z+p9NFiXY+etuDJA@mail.gmail.com> (raw)
In-Reply-To: <Yoy3wDh0cvziWGHJ@dhcp22.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]

Hi Michal, thanks for your reply.
mempolicy has two functions, which nodes to choose and how to use these
nodes. cpuset can only decide the first one,it equal to 'bind' mempolicy.
If cgroups support mempolicy, we can continue to develop more policy
types. For example, allocate memory according to node weight, etc.
We would like to have more precise control over memory allocation in NUMA
server.

On Tue, May 24, 2022 at 6:47 PM Michal Hocko <mhocko@suse.com> wrote:

> On Tue 24-05-22 18:36:38, hezhongkun wrote:
> > From: Hezhongkun <hezhongkun.hzk@bytedance.com>
> >
> > 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 cgroups, so that we can control low-priority cgroups to
> > allocate memory in specified nodes. So this patch want to
> > adds the mempolicy interface.
> >
> > the mempolicy priority of memcgroup is higher than the priority
> > of task. The order of getting the policy is,
> > memcgroup->policy,task->policy or vma policy, default policy.
> > memcgroup's policy is owned by itself, so descendants will
> > not inherit it.
>
> Why cannot you use cpuset cgroup?
> --
> Michal Hocko
> SUSE Labs
>

[-- Attachment #2: Type: text/html, Size: 1704 bytes --]

  reply	other threads:[~2022-05-24 11:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 10:36 [PATCH] mm: memcontrol: add the mempolicy interface for cgroup v2 hezhongkun
2022-05-24 10:36 ` hezhongkun
2022-05-24 10:47 ` Michal Hocko
2022-05-24 10:47   ` Michal Hocko
2022-05-24 11:46   ` 贺中坤 [this message]
2022-05-24 12:04     ` [External] " Michal Hocko
2022-05-24 12:04       ` Michal Hocko
2022-05-24 13:10 ` kernel test robot
2022-05-24 13:10   ` kernel test robot
2022-05-24 15:02 ` kernel test robot
2022-05-24 15:02   ` kernel test robot
2022-05-24 15:12 ` kernel test robot
2022-05-24 15:12   ` kernel test robot
2022-05-25  7:56 ` [mm] 6adb0a02c2: WARNING:suspicious_RCU_usage kernel test robot
2022-05-25  7:56   ` kernel test robot

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=CACSyD1N4VeWBOzZwBogDW-wBbLvF54VrZ1Z+p9NFiXY+etuDJA@mail.gmail.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.