mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <shuah@kernel.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Will Deacon <will.deacon@arm.com>,
	catalin.marinas@arm.com, sudeep.holla@arm.com,
	ganapatrao.kulkarni@cavium.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] arm64: add NUMA emulation support
Date: Tue, 4 Sep 2018 15:59:34 -0600	[thread overview]
Message-ID: <f041ba95-03e6-4a7d-c324-870b45a2f648@kernel.org> (raw)
In-Reply-To: <20180829110802.GD10349@dhcp22.suse.cz>

Hi Michal,

Sorry for the delay in responding. I was traveling last week.

On 08/29/2018 05:08 AM, Michal Hocko wrote:
> On Tue 28-08-18 12:09:53, Shuah Khan wrote:
> [...]
>> The main intent is to use numa emulation in conjunction with cpusets for coarse
>> memory management similar to x86_64 use-case for the same.
> 
> Could you be more specific please? Why would you want a hack like this
> when you have a full featured memory cgroup controller to limit the
> amount of memory?
> 

I should have given more details about the nature of memory management use-case
this patch addresses.

Memory cgroup allows specifying memory limits and controls memory footprint of
tasks in a cgroup.

However, there are some limitations

- Memory isn't reserved for the cgroup and there is no guarantee that the memory will
  be available when it needs it.

- cgroups allocate from the same system memory pool and is shared with other cgroups.
  Since root cgroup doesn’t have limits, it could potentially impact performance on
  other cgroups in high memory pressure situations.

- Allocating entire memory blocks to a cgroup to ensure reservation and isolation isn't
  possible. Pages can be re-allocated to another processes.

With NUMA emulation, memory blocks can be split and assigned to emulated nodes, both
reservation and isolation can be supported.

This will support the following workload requirements:

- reserving one or more NUMA memory nodes for class of critical tasks that require
  guaranteed memory availability.
- isolate memory blocks with a guaranteed exclusive access.

NUMA emulation to split the flat machine into "x" number of nodes, combined with
cpuset cgroup with the following example configuration will make it possible to
support the above workloads on non-NUMA platforms.

numa=fake=4

cpuset.mems=2
cpuset.cpus=2
cpuset.mem_exclusive=1 (enabling exclusive use of the memory nodes by a CPU set)
cpuset.mem_hardwall=1  (separate the memory nodes that are allocated to different cgroups)

thanks,
-- Shuah

  reply	other threads:[~2018-09-04 21:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 23:05 Shuah Khan (Samsung OSG)
2018-08-28 17:40 ` Will Deacon
2018-08-28 18:09   ` Shuah Khan
2018-08-29 11:08     ` Michal Hocko
2018-09-04 21:59       ` Shuah Khan [this message]
2018-09-05  6:42         ` Michal Hocko
2018-09-06 21:53           ` Shuah Khan
2018-09-07  8:34             ` Michal Hocko
2018-09-07 22:30               ` Shuah Khan
2018-09-10 13:48                 ` Michal Hocko
2018-09-11  2:02                   ` Shuah Khan
2018-09-11  9:11                     ` Michal Hocko
2018-09-11 15:27                       ` Shuah Khan
2018-09-11 16:50                         ` Will Deacon
2018-09-11 19:53                           ` Shuah Khan

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=f041ba95-03e6-4a7d-c324-870b45a2f648@kernel.org \
    --to=shuah@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=ganapatrao.kulkarni@cavium.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=will.deacon@arm.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®