Thread (38 messages) 38 messages, 5 authors, 2021-08-02

Re: [PATCH v6 1/6] mm/mempolicy: Add MPOL_PREFERRED_MANY for multiple preferred nodes

From: Feng Tang <hidden>
Date: 2021-07-30 03:05:12
Also in: linux-api, lkml

On Thu, Jul 29, 2021 at 06:21:19PM +0200, Michal Hocko wrote:
On Thu 29-07-21 23:12:42, Feng Tang wrote:
quoted
On Thu, Jul 29, 2021 at 03:38:44PM +0200, Michal Hocko wrote:
[...]
quoted
quoted
Also the
semantic to give nodes some ordering based on their numbers sounds
rather weird to me.
I agree, and as I admitted in the first reply, this need to be fixed.
OK. I was not really clear that we are on the same page here.
quoted
quoted
The semantic I am proposing is to allocate from prefered nodes in
distance order starting from the local node.
So the plan is:
* if the local node is set in 'prefer-many's nodemask, then chose
* otherwise chose the node with the shortest distance to local node
?
Yes and what I am trying to say is that you will achieve that simply by
doing the following in policy_node:
	if (policy->mode == MPOL_PREFERRED_MANY)
		return nd;
One thing is, it's possible that 'nd' is not set in the preferred
nodemask. 

For policy_node(), most of its caller use the local node id as 'nd'
parameter. For HBM and PMEM memory nodes, they are cpuless nodes,
so they will not be a 'local node', but some use cases only prefer
these nodes.

Thanks,
Feng
-- 
Michal Hocko
SUSE Labs
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help