All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: Brice Goglin <Brice.Goglin@inria.fr>
Cc: Andi Kleen <andi@firstfloor.org>,
	Stefan Lankes <lankes@lfbs.rwth-aachen.de>,
	linux-kernel@vger.kernel.org, linux-numa@vger.kernel.org,
	Boris Bierbaum <boris@lfbs.rwth-aachen.de>
Subject: Re: [RFC PATCH 0/4]: affinity-on-next-touch
Date: Mon, 22 Jun 2009 09:49:58 -0400	[thread overview]
Message-ID: <1245678598.7799.29.camel@lts-notebook> (raw)
In-Reply-To: <4A3C8EAE.3030007@inria.fr>

On Sat, 2009-06-20 at 09:24 +0200, Brice Goglin wrote:
> Lee Schermerhorn wrote:
> > My patches don't have per process enablement.  Rather, I chose to use
> > per cpuset enablement.  I view cpusets as sort of "numa control groups"
> > and thought this was an appropriate level at which to control this sort
> > of behavior--analogous to memory_spread_{page|slab}.  That probably
> > needs to be discussed more widely, tho'.
> >   
> 
> Could you explain why you actually want to enable/disable
> migrate-on-fault on a cpuset (or process) basis? Why would an
> administrator want to disable it? Aren't the existing cpuset memory
> restriction abilities enough?
> 
> Brice
> 

Hello, Brice:

There are a couple of aspects to this question, I think?

1) why enable/disable at all?  why not always enabled?  

When I try out some new behavior such as migrate of fault, I start with
the assumption [right or wrong] that not all users will want this
behavior.  For migrate-on-fault, one probably won't run into it all that
often unless the MPOL_MF_LAZY flag is used to forcibly unmap regions.
However, with swap read-ahead, one could end up with anon pages in the
swap cache with no pte references, and could experience unexpected
migrations.  I've learned that some folks really don't like
surprises :).  Now, when you consider the "automigration" feature
["auto" here means "self" more than "automatic"], I think it's more
important to be able to enable/disable it.  I've not seen any
performance degradation when using it, but I feared that for some
workloads, thrashing could cause such degradation.  Page migration isn't
free.

Also, because Linux runs on such a wide range of platforms, I don't want
to burden smaller, embedded systems with the additional code, so I also
try to make the feature source configurable.  I know we worry about the
proliferation of config options, but it's easier to remove one after the
fact, I think, than to retrofit it.

2) Why a per cpuset control?

I consider cpusets to be "numa control groups".  They constrain
resources on a numa node [and related cpus] granularity, and control
numa related behavior, such as migration when changing cpusets,
spreading page cache and slab pages over nodes in the cpuset, ...  In
fact, I think it would have been appropriate to call the cpuset control
group the "numa control group" when cgroups were introduced, but it's
too late for that now.

Finally, and not a reason to include the controls in the mainline, it's
REALLY useful during development.  One can boot a test kernel, and only
enable the feature in a test cpuset, limiting the damage of, e.g., a
reference counting bug or such.  It's also useful for measuring the
overhead of the patches absent any actual page migrations.  However, if
this feature ever makes it to mainline, the community will have its say
on whether these controls should be included and how.

Hope this helps,
Lee




  reply	other threads:[~2009-06-22 13:50 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11  8:27 [RFC PATCH 0/4]: affinity-on-next-touch Stefan Lankes
2009-05-11  8:48 ` Dieter an Mey
2009-05-11 13:22 ` Andi Kleen
2009-05-11 13:32   ` Brice Goglin
2009-05-11 14:54   ` Stefan Lankes
2009-05-11 14:54     ` Stefan Lankes
2009-05-11 16:37     ` Andi Kleen
2009-05-11 17:22       ` Stefan Lankes
2009-06-11 18:45   ` Stefan Lankes
2009-06-12 10:32     ` Andi Kleen
2009-06-12 11:46       ` Stefan Lankes
2009-06-12 12:30         ` Brice Goglin
2009-06-12 13:21           ` Stefan Lankes
2009-06-12 13:48           ` Stefan Lankes
2009-06-16  2:39         ` Lee Schermerhorn
2009-06-16 13:58           ` Stefan Lankes
2009-06-16 14:59             ` Lee Schermerhorn
2009-06-17  1:22               ` KAMEZAWA Hiroyuki
2009-06-17 12:02                 ` Lee Schermerhorn
2009-06-17  7:45               ` Stefan Lankes
2009-06-18  4:37                 ` Lee Schermerhorn
2009-06-18 19:04                   ` Lee Schermerhorn
2009-06-19 15:26                     ` Lee Schermerhorn
2009-06-19 15:41                       ` Balbir Singh
2009-06-19 15:59                         ` Lee Schermerhorn
2009-06-19 21:19                       ` Stefan Lankes
2009-06-22 12:34                   ` Brice Goglin
2009-06-22 14:24                     ` Lee Schermerhorn
2009-06-22 15:28                       ` Brice Goglin
2009-06-22 16:55                         ` Lee Schermerhorn
2009-06-22 17:06                           ` Brice Goglin
2009-06-22 17:59                             ` Stefan Lankes
2009-06-22 19:10                               ` Brice Goglin
2009-06-22 20:16                                 ` Stefan Lankes
2009-06-22 20:34                                   ` Brice Goglin
2009-06-22 14:32                     ` Stefan Lankes
2009-06-22 14:56                       ` Lee Schermerhorn
2009-06-22 15:42                         ` Stefan Lankes
2009-06-22 16:38                           ` Lee Schermerhorn
2009-06-16  2:25       ` Lee Schermerhorn
2009-06-20  7:24         ` Brice Goglin
2009-06-22 13:49           ` Lee Schermerhorn [this message]
2009-06-16  2:21     ` Lee Schermerhorn
2009-05-11 14:31 Samuel Thibault

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=1245678598.7799.29.camel@lts-notebook \
    --to=lee.schermerhorn@hp.com \
    --cc=Brice.Goglin@inria.fr \
    --cc=andi@firstfloor.org \
    --cc=boris@lfbs.rwth-aachen.de \
    --cc=lankes@lfbs.rwth-aachen.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-numa@vger.kernel.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 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.