lkml.org 
[lkml]   [2017]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/7] genirq/affinity: assign vectors to all present CPUs
    On Fri, 19 May 2017, Christoph Hellwig wrote:
    > - /* Stabilize the cpumasks */
    > - get_online_cpus();

    How is that protected against physical CPU hotplug? Physical CPU hotplug
    manipulates the present mask.

    > - nodes = get_nodes_in_cpumask(cpu_online_mask, &nodemsk);
    > + nodes = get_nodes_in_cpumask(cpu_present_mask, &nodemsk);
    > +static int __init irq_build_cpumap(void)
    > +{
    > + int node, cpu;
    > +
    > + for (node = 0; node < nr_node_ids; node++) {
    > + if (!zalloc_cpumask_var(&node_to_present_cpumask[node],
    > + GFP_KERNEL))
    > + panic("can't allocate early memory\n");
    > + }
    >
    > - return min(cpus, vecs) + resv;
    > + for_each_present_cpu(cpu) {
    > + node = cpu_to_node(cpu);
    > + cpumask_set_cpu(cpu, node_to_present_cpumask[node]);
    > + }

    This mask needs updating on physical hotplug as well.

    Thanks,

    tglx

    \
     
     \ /
      Last update: 2017-05-21 20:32    [W:4.620 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site