All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: Paul Jackson <pj@sgi.com>,
	ak@suse.de, akpm@osdl.org, dgc@sgi.com, steiner@sgi.com,
	Simon.Derr@bull.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] cpuset memory spread basic implementation
Date: Mon, 6 Feb 2006 22:07:01 +0100	[thread overview]
Message-ID: <20060206210701.GA24446@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.62.0602061243200.18394@schroedinger.engr.sgi.com>

* Christoph Lameter <clameter@engr.sgi.com> wrote:

> On Mon, 6 Feb 2006, Ingo Molnar wrote:
> 
> > it's a feature, not a weird effect! Under the VFS-driven scheme, if two 
> > projects (one 'local' and one 'global') can access the same (presumably 
> > big) file, then the sysadmin has to make up his mind and determine which 
> > policy to use for that file. The file will either be local, or global - 
> > consistently.
> 
> But that local or global allocation policy depends on what task is 
> accessing the data at what time. A simple grep should not result in 
> interleaving. A big application accessing the same data from multiple 
> processes should have interleaving for shared data. Both may not be 
> active at the same time.

the grep faults in the pagecache, and depending on which job is active 
first, the placement of the pages will either be spread out or local, 
depending on the timing of those jobs. How do you expect this to behave 
deterministically?

> > with the per-cpuset policy approach on the other hand it would be 
> > non-deterministic which policy the file gets allocated under: whichever 
> > cpuset first manages to touch that file. That is what i'd call a weird 
> > and undesirable effect. This weirdness comes from the conceptual hickup 
> > of attaching the object-allocation policy to the workload, not to the 
> > file objects of the workload - hence conflicts can arise if two 
> > workloads share file objects.
> 
> Well these weird effects are then at least expected since there was a 
> cpuset set up for applications to activate this effect and the 
> processes running in that cpuset will behave in the weird way we want.

nondeterministic placement of pagecache pages sure looks nasty. In most 
cases i suspect what matters are project-specific data files - which 
will be allocated deterministically because they are mostly private to 
the cpuset. But e.g. /usr files want to be local in most cases, even for 
a 'spread out' cpuset. Why would you want to allocate them globally?

> The mountpoint option means that reading the contents of a file in 
> some filesystems is slower than in others because some files spread 
> their pages all over the system while others are node local. Again if 
> the process is single threaded the node local is always the right 
> approach. These single threaded processes will no longer be able to 
> run with full pagecache speed. Memory will be used in other nodes that 
> may have been reserved for other purposes by the user.

but a single object cannot be allocated both locally and globally!  
(well, it could be, for read-mostly workloads, but lets ignore that 
possibility) So instead of letting chance determine it, it is the most 
natural thing to let the object (or its container) determine which 
strategy to use - not the workload. This avoids the ambiguity at its 
core.

so if two projects want to use the same file in two different ways at 
the same time then there is no solution either under the VFS-based or 
under the cpuset-based approach - but at least the VFS-based method is 
fully predictable, and wont depend on which science department starts 
its simulation job first ...

if two projects want to use the same file in two different ways but not 
at the same time, then again the VFS-based method is better: each 
project, when it starts to run, could/should set the policy of that 
shared data. (which setting of policy would also flush all pagecache 
pages of the affected file[s], flushing any prior incorrect placement of 
pages)

	Ingo

  reply	other threads:[~2006-02-06 21:08 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-04  7:19 [PATCH 1/5] cpuset memory spread basic implementation Paul Jackson
2006-02-04  7:19 ` [PATCH 2/5] cpuset memory spread page cache implementation and hooks Paul Jackson
2006-02-04 23:49   ` Andrew Morton
2006-02-05  1:42     ` Paul Jackson
2006-02-05  1:54       ` Andrew Morton
2006-02-05  3:28         ` Christoph Lameter
2006-02-05  5:06           ` Andrew Morton
2006-02-05  6:08             ` Paul Jackson
2006-02-05  6:15               ` Andrew Morton
2006-02-05  6:28                 ` Paul Jackson
2006-02-06  0:20                 ` Paul Jackson
2006-02-06  5:51                 ` Paul Jackson
2006-02-06  7:14                   ` Pekka J Enberg
2006-02-06  7:42                     ` Pekka J Enberg
2006-02-06  7:51                       ` Pekka J Enberg
2006-02-06 17:32                         ` Pekka Enberg
2006-02-04  7:19 ` [PATCH 3/5] cpuset memory spread slab cache implementation Paul Jackson
2006-02-04 23:49   ` Andrew Morton
2006-02-05  3:37     ` Christoph Lameter
2006-02-04  7:19 ` [PATCH 4/5] cpuset memory spread slab cache optimizations Paul Jackson
2006-02-04 23:50   ` Andrew Morton
2006-02-05  3:18     ` Paul Jackson
2006-02-04 23:50   ` Andrew Morton
2006-02-05  4:10     ` Paul Jackson
2006-02-04  7:19 ` [PATCH 5/5] cpuset memory spread slab cache hooks Paul Jackson
2006-02-06  4:37   ` Andrew Morton
2006-02-04 23:49 ` [PATCH 1/5] cpuset memory spread basic implementation Andrew Morton
2006-02-05  3:35   ` Christoph Lameter
2006-02-06  4:33   ` Andrew Morton
2006-02-06  5:50     ` Paul Jackson
2006-02-06  6:02       ` Andrew Morton
2006-02-06  6:17         ` Ingo Molnar
2006-02-06  7:22           ` Paul Jackson
2006-02-06  7:43             ` Ingo Molnar
2006-02-06  8:19               ` Paul Jackson
2006-02-06  8:22                 ` Ingo Molnar
2006-02-06  8:40                   ` Ingo Molnar
2006-02-06  9:03                     ` Paul Jackson
2006-02-06  9:09                       ` Ingo Molnar
2006-02-06  9:27                         ` Paul Jackson
2006-02-06  9:37                           ` Ingo Molnar
2006-02-06 20:22                     ` Paul Jackson
2006-02-06  8:47                   ` Paul Jackson
2006-02-06  8:51                     ` Ingo Molnar
2006-02-06  9:09                       ` Paul Jackson
2006-02-06 10:09                   ` Andi Kleen
2006-02-06 10:11                     ` Ingo Molnar
2006-02-06 10:16                       ` Andi Kleen
2006-02-06 10:23                         ` Ingo Molnar
2006-02-06 10:35                           ` Andi Kleen
2006-02-06 14:42                           ` Paul Jackson
2006-02-06 14:35                         ` Paul Jackson
2006-02-06 16:48                           ` Christoph Lameter
2006-02-06 17:11                             ` Andi Kleen
2006-02-06 18:21                               ` Christoph Lameter
2006-02-06 18:36                                 ` Andi Kleen
2006-02-06 18:43                                   ` Christoph Lameter
2006-02-06 18:48                                     ` Andi Kleen
2006-02-06 19:19                                       ` Christoph Lameter
2006-02-06 20:27                                       ` Paul Jackson
2006-02-06 18:43                                   ` Ingo Molnar
2006-02-06 20:01                                     ` Paul Jackson
2006-02-06 20:05                                       ` Ingo Molnar
2006-02-06 20:27                                         ` Christoph Lameter
2006-02-06 20:41                                           ` Ingo Molnar
2006-02-06 20:49                                             ` Christoph Lameter
2006-02-06 21:07                                               ` Ingo Molnar [this message]
2006-02-06 22:10                                                 ` Christoph Lameter
2006-02-06 23:29                                                   ` Ingo Molnar
2006-02-06 23:45                                         ` Paul Jackson
2006-02-07  0:19                                           ` Ingo Molnar
2006-02-07  1:17                                             ` David Chinner
2006-02-07  9:31                                             ` Andi Kleen
2006-02-07 11:53                                               ` Ingo Molnar
2006-02-07 12:14                                                 ` Andi Kleen
2006-02-07 12:30                                                   ` Ingo Molnar
2006-02-07 12:43                                                     ` Andi Kleen
2006-02-07 12:58                                                       ` Ingo Molnar
2006-02-07 13:14                                                         ` Andi Kleen
2006-02-07 14:11                                                           ` Ingo Molnar
2006-02-07 14:23                                                             ` Andi Kleen
2006-02-07 17:11                                                               ` Christoph Lameter
2006-02-07 17:29                                                                 ` Andi Kleen
2006-02-07 17:39                                                                   ` Christoph Lameter
2006-02-07 17:10                                                       ` Christoph Lameter
2006-02-07 17:28                                                         ` Andi Kleen
2006-02-07 17:42                                                           ` Christoph Lameter
2006-02-07 17:51                                                             ` Andi Kleen
2006-02-07 17:06                                                     ` Christoph Lameter
2006-02-07 17:26                                                       ` Andi Kleen
2006-02-04 23:50 ` Andrew Morton
2006-02-04 23:57   ` David S. Miller
2006-02-06  4:37 ` Andrew Morton
2006-02-06  6:02   ` Ingo Molnar
2006-02-06  6:56   ` Paul Jackson
2006-02-06  7:08     ` Andrew Morton
2006-02-06  7:39       ` Ingo Molnar
2006-02-06  8:22         ` Paul Jackson
2006-02-06  8:35         ` Paul Jackson
2006-02-06  9:32       ` Paul Jackson
2006-02-06  9:57         ` Andrew Morton
2006-02-06  9:18 ` Simon Derr

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=20060206210701.GA24446@elte.hu \
    --to=mingo@elte.hu \
    --cc=Simon.Derr@bull.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=dgc@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=steiner@sgi.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 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.