lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 Feb 2008 12:06:50 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Paul Jackson <pj@....com>
cc:	Christoph Lameter <clameter@....com>, Lee.Schermerhorn@...com,
	mel@....ul.ie, kosaki.motohiro@...fujitsu.com, andi@...stfloor.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [2.6.24-rc8-mm1][regression?] numactl --interleave=all doesn't
 works on memoryless node.

On Tue, 5 Feb 2008, Paul Jackson wrote:

> Since any of those future patches only add optional modes
> with new flags, while preserving current behaviour if you
> don't use one of the new flags, therefore the current behavior
> has to work as best it can.
> 

There's a subtlety to this issue that allows it to be fixed and easily 
extended for two upcoming changes:

 - Paul Jackson's mempolicy and cpuset interactions change that will
   probably allow set_mempolicy() callers to specify with a MPOL_*
   flag whether they are referring to "dynamic" or "static" nodemasks[*],
   and

 - node hotplug (both add and remove) that will change the state of a
   node with an identical id.

Paul, with his patch, will need to preserve the "intent" of the mempolicy 
as the nodemask that was passed by the user and attempt on all successive 
rebinds to accomodate that intent as much as possible.

So at the time of rebind it is quite simple to intersect the set of system 
nodes that have memory with the intent of the mempolicy to yield the 
effected nodemask.  This nodemask is saved in the mempolicy (pol->v.nodes 
in this case for interleave) and only steps through the set of nodes that 
can allow interleaved allocations.

When the available nodes changes, either by cpuset change or node hotplug, 
the rebind is quite simple when the intent is preserved.  So we're going 
to need an additional nodemask_t added to struct mempolicy that saves this 
intent and modify contextualize_policy() to allow it.  This will basically 
make any set_mempolicy() call succeed even if the application does not 
have access to any of the mempolicy nodes because it is possible that they 
will become accessible in the future.  In that case the mempolicy is 
effectively MPOL_DEFAULT until the desired nodes become available and it 
is effected.

		David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ