Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-17 Thread Michal Hocko
On Tue 17-03-20 14:44:45, Vlastimil Babka wrote: > On 3/16/20 10:06 AM, Michal Hocko wrote: > > On Thu 12-03-20 17:41:58, Vlastimil Babka wrote: > > [...] > >> with nid present in: > >> N_POSSIBLE - pgdat might not exist, node_to_mem_node() must return some > >> online > > > > I would rather

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-17 Thread Vlastimil Babka
On 3/16/20 10:06 AM, Michal Hocko wrote: > On Thu 12-03-20 17:41:58, Vlastimil Babka wrote: > [...] >> with nid present in: >> N_POSSIBLE - pgdat might not exist, node_to_mem_node() must return some >> online > > I would rather have a dummy pgdat for those. Have a look at > $ git grep

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-16 Thread Michal Hocko
On Thu 12-03-20 17:41:58, Vlastimil Babka wrote: [...] > with nid present in: > N_POSSIBLE - pgdat might not exist, node_to_mem_node() must return some online I would rather have a dummy pgdat for those. Have a look at $ git grep "NODE_DATA.*->" | wc -l 63 Who knows how many else we have there.

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-16 Thread Joonsoo Kim
2020년 3월 13일 (금) 오후 8:38, Vlastimil Babka 님이 작성: > > On 3/13/20 12:04 PM, Srikar Dronamraju wrote: > >> I lost all the memory about it. :) > >> Anyway, how about this? > >> > >> 1. make node_present_pages() safer > >> static inline node_present_pages(nid) > >> { > >> if (!node_online(nid)) return

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-13 Thread Vlastimil Babka
On 3/13/20 12:04 PM, Srikar Dronamraju wrote: >> I lost all the memory about it. :) >> Anyway, how about this? >> >> 1. make node_present_pages() safer >> static inline node_present_pages(nid) >> { >> if (!node_online(nid)) return 0; >> return (NODE_DATA(nid)->node_present_pages); >> } >> > >

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-13 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-12 17:41:58]: > On 3/12/20 5:13 PM, Srikar Dronamraju wrote: > > * Vlastimil Babka [2020-03-12 14:51:38]: > > > >> > * Vlastimil Babka [2020-03-12 10:30:50]: > >> > > >> >> On 3/12/20 9:23 AM, Sachin Sant wrote: > >> >> >> On 12-Mar-2020, at 10:57 AM, Srikar

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-13 Thread Srikar Dronamraju
* Joonsoo Kim [2020-03-13 18:47:49]: > > >> > > >> > Also for a memoryless/cpuless node or possible but not present nodes, > > >> > node_to_mem_node(node) will still end up as node (atleast on powerpc). > > >> > > >> I think that's the place where this would be best to fix. > > >> > > > > > >

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-13 Thread Joonsoo Kim
2020년 3월 13일 (금) 오전 1:42, Vlastimil Babka 님이 작성: > > On 3/12/20 5:13 PM, Srikar Dronamraju wrote: > > * Vlastimil Babka [2020-03-12 14:51:38]: > > > >> > * Vlastimil Babka [2020-03-12 10:30:50]: > >> > > >> >> On 3/12/20 9:23 AM, Sachin Sant wrote: > >> >> >> On 12-Mar-2020, at 10:57 AM, Srikar

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Vlastimil Babka
On 3/12/20 5:13 PM, Srikar Dronamraju wrote: > * Vlastimil Babka [2020-03-12 14:51:38]: > >> > * Vlastimil Babka [2020-03-12 10:30:50]: >> > >> >> On 3/12/20 9:23 AM, Sachin Sant wrote: >> >> >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju >> >> >> wrote: >> >> >> * Michal Hocko

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-12 14:51:38]: > > * Vlastimil Babka [2020-03-12 10:30:50]: > > > >> On 3/12/20 9:23 AM, Sachin Sant wrote: > >> >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju > >> >> wrote: > >> >> * Michal Hocko [2020-03-11 12:57:35]: > >> >>> On Wed 11-03-20 16:32:35, Srikar

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Vlastimil Babka
On 3/12/20 2:14 PM, Srikar Dronamraju wrote: > * Vlastimil Babka [2020-03-12 10:30:50]: > >> On 3/12/20 9:23 AM, Sachin Sant wrote: >> >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju >> >> wrote: >> >> * Michal Hocko [2020-03-11 12:57:35]: >> >>> On Wed 11-03-20 16:32:35, Srikar Dronamraju

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-12 10:30:50]: > On 3/12/20 9:23 AM, Sachin Sant wrote: > >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju > >> wrote: > >> * Michal Hocko [2020-03-11 12:57:35]: > >>> On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: > To ensure a cpuless, memoryless dummy

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Vlastimil Babka
On 3/12/20 9:23 AM, Sachin Sant wrote: > > >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju >> wrote: >> >> * Michal Hocko [2020-03-11 12:57:35]: >> >>> On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: A Powerpc system with multiple possible nodes and with CONFIG_NUMA enabled

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-12 Thread Sachin Sant
> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju > wrote: > > * Michal Hocko [2020-03-11 12:57:35]: > >> On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: >>> A Powerpc system with multiple possible nodes and with CONFIG_NUMA >>> enabled always used to have a node 0, even if node 0 does

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-11 Thread Srikar Dronamraju
* Michal Hocko [2020-03-11 12:57:35]: > On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: > > A Powerpc system with multiple possible nodes and with CONFIG_NUMA > > enabled always used to have a node 0, even if node 0 does not any cpus > > or memory attached to it. As per PAPR, node affinity of

Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-11 Thread Michal Hocko
On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: > A Powerpc system with multiple possible nodes and with CONFIG_NUMA > enabled always used to have a node 0, even if node 0 does not any cpus > or memory attached to it. As per PAPR, node affinity of a cpu is only > available once its present /

[PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-03-11 Thread Srikar Dronamraju
A Powerpc system with multiple possible nodes and with CONFIG_NUMA enabled always used to have a node 0, even if node 0 does not any cpus or memory attached to it. As per PAPR, node affinity of a cpu is only available once its present / online. For all cpus that are possible but not present,