Re: [patch 2/2] cpusets: add interleave_over_allowed option

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paul Jackson <pj@...>
Cc: David Rientjes <rientjes@...>, <clameter@...>, <akpm@...>, <ak@...>, <linux-kernel@...>
Date: Monday, October 29, 2007 - 12:54 pm

On Sat, 2007-10-27 at 16:19 -0700, Paul Jackson wrote:

If most apps use libnuma APIs instead of directly calling the sys calls,
libnuma could query something as simple as an environment variable, or a
new flag to get_mempolicy(), or the value of a file in it's current
cpuset--but I'd like to avoid a dependency on libcpuset--to determine
whether to implement "new" semantics.


I'd certainly like to hear from Oracle what libnuma features they use
and their opinion of the changes being discussed here.


Yeah.  This bothered me about policy remapping when I looked at it a
while back.  Worse, this behavior isn't documented as intended [or not].
I thought at the time that this could be solved by retaining the
original argument nodemask, but 1) I was worried about the size when ~1K
nodes are required to be supported and 2) it still doesn't solve the
problem of ensuring the same locality characteristics w/o a lot of
documentation about the implications of changing cpuset resources or
moving tasks between cpusets in such a way to preserve the locality
characteristics requested by the original mask.

Again, we stumble upon the notion of "intent".  If the intent is just to
spread allocations to share bandwidth, it probably doesn't matter.  If,
on the other hand, the original mask was carefully constructed, taking
into consideration the distances between the memories specified and
other resources [cpus in the cpuset, other memories in the cpuset, IO
adpater connection points, ...], there is a lot more to consider than
just preserving the cpuset relative positions of the nodes.


Agreed. 


In libnuma in numactl-1.0.2 that I recently grabbed off Andi's site,
numa_available() indeed issues this call.  But, I don't see any internal
calls to numa_available() [comments says all other calls undefined when
numa_available() returns an error] nor any other calls to
get_mempolicy() with all null/0 args.  So, you'd be depending on the
application to call numa_available().  However, you could define an
additional MPOL_F_* flag to get_mempolicy() that is issued in library
init code to enable new behavior--again, based on some indication that
new behavior is desired or not.


Only for apps that use the sys calls directly, right?  This can be
hidden by libnuma(), if all apps use that.  The "behavior switch" flag
suggested above would obviate a flag on each sys call and could also be
hidden by libnuma.  Any of these changes will require some better
documentation than we have now...


I worry more about applications that take a more physical view of the
node ids and that emphasize locality more than bandwidth spreading.  If
libnuma explicitly enables new behavior when requested, however that
might be implemented, I don't know that it would be a problem.

Lee

Lee

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 2/2] cpusets: add interleave_over_allowed option, David Rientjes, (Thu Oct 25, 6:54 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Thu Oct 25, 7:37 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Thu Oct 25, 8:28 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 11:18 am)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Mon Oct 29, 12:23 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Tue Oct 30, 4:20 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Mon Oct 29, 4:36 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Fri Oct 26, 1:36 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, David Rientjes, (Thu Oct 25, 10:11 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 11:30 am)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 4:43 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 5:13 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 5:31 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Mon Oct 29, 11:10 am)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Mon Oct 29, 3:01 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Fri Oct 26, 9:26 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Mon Oct 29, 12:54 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, David Rientjes, (Mon Oct 29, 12:47 am)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Fri Oct 26, 10:50 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Sat Oct 27, 2:07 am)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Sat Oct 27, 1:47 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Fri Oct 26, 5:17 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 5:26 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Fri Oct 26, 5:37 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Mon Oct 29, 11:00 am)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Mon Oct 29, 4:35 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Mon Oct 29, 1:46 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Fri Oct 26, 5:05 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Christoph Lameter, (Fri Oct 26, 5:12 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, David Rientjes, (Thu Oct 25, 10:45 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, David Rientjes, (Thu Oct 25, 11:58 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 11:37 am)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Michael Kerrisk, (Fri Oct 26, 4:21 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Michael Kerrisk, (Fri Oct 26, 4:33 pm)
Re: [patch 2/2] cpusets: add interleave_over_allowed option, Lee Schermerhorn, (Fri Oct 26, 1:28 pm)