Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646390

Re: [PATCH 2/7] genirq/affinity: assign vectors to all present CPUs

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 2/7] genirq/affinity: assign vectors to all present CPUs
Date 2017-05-21 20:40 +0200
Message-ID <tJDVL-2VV-1@gated-at.bofh.it> (permalink)
References <tILVn-84l-11@gated-at.bofh.it> <tILVo-84l-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

spread MSI(-X) vectors to all possible CPUs V2 Christoph Hellwig <hch@lst.de> - 2017-05-19 11:00 +0200
  [PATCH 1/7] genirq: allow assigning affinity to present but not online CPUs Christoph Hellwig <hch@lst.de> - 2017-05-19 11:00 +0200
  [PATCH 2/7] genirq/affinity: assign vectors to all present CPUs Christoph Hellwig <hch@lst.de> - 2017-05-19 11:00 +0200
    Re: [PATCH 2/7] genirq/affinity: assign vectors to all present  CPUs Thomas Gleixner <tglx@linutronix.de> - 2017-05-21 20:40 +0200
      Re: [PATCH 2/7] genirq/affinity: assign vectors to all present CPUs Christoph Hellwig <hch@lst.de> - 2017-05-23 11:40 +0200

csiph-web