lkml.org 
[lkml]   [2020]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus
    From
    Date
    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);
    >> }
    >>
    >
    > Yes this would help.

    Looks good, yeah.

    >> 2. make node_to_mem_node() safer for all cases
    >> In ppc arch's mem_topology_setup(void)
    >> for_each_present_cpu(cpu) {
    >> numa_setup_cpu(cpu);
    >> mem_node = node_to_mem_node(numa_mem_id());
    >> if (!node_present_pages(mem_node)) {
    >> _node_numa_mem_[numa_mem_id()] = first_online_node;
    >> }
    >> }
    >>
    >
    > But here as discussed above, we miss the case of possible but not present nodes.
    > For such nodes, the above change may not update, resulting in they still
    > having 0. And node 0 can be only possible but not present.

    So is there other way to do the setup so that node_to_mem_node() returns an
    online+present node when called for any possible node?

    \
     
     \ /
      Last update: 2020-03-13 12:39    [W:5.217 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site