Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1676335 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2017-06-28 05:20 +0200 |
| Last post | 2017-06-29 02:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
linux-next: manual merge of the tip tree with the pci tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-06-28 05:20 +0200
Re: linux-next: manual merge of the tip tree with the pci tree Christoph Hellwig <hch@lst.de> - 2017-06-29 02:30 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-06-28 05:20 +0200 |
| Subject | linux-next: manual merge of the tip tree with the pci tree |
| Message-ID | <tXbGi-1p2-5@gated-at.bofh.it> |
Hi all,
Today's linux-next merge of the tip tree got a conflict in:
kernel/irq/affinity.c
between commit:
6f9a22bc5775 ("PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecs")
from the pci tree and commit:
9a0ef98e186d ("genirq/affinity: Assign vectors to all present CPUs")
from the tip tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc kernel/irq/affinity.c
index 9b71406d2eec,d2747f9c5707..000000000000
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@@ -64,15 -108,8 +108,15 @@@ irq_create_affinity_masks(int nvecs, co
int last_affv = affv + affd->pre_vectors;
nodemask_t nodemsk = NODE_MASK_NONE;
struct cpumask *masks;
- cpumask_var_t nmsk;
+ cpumask_var_t nmsk, *node_to_present_cpumask;
+ /*
+ * If there aren't any vectors left after applying the pre/post
+ * vectors don't bother with assigning affinity.
+ */
+ if (!affv)
+ return NULL;
+
if (!zalloc_cpumask_var(&nmsk, GFP_KERNEL))
return NULL;
@@@ -155,15 -199,10 +207,13 @@@ int irq_calc_affinity_vectors(int minve
{
int resv = affd->pre_vectors + affd->post_vectors;
int vecs = maxvec - resv;
- int cpus;
+ int ret;
+ if (resv > minvec)
+ return 0;
+
- /* Stabilize the cpumasks */
get_online_cpus();
- cpus = cpumask_weight(cpu_online_mask);
+ ret = min_t(int, cpumask_weight(cpu_present_mask), vecs) + resv;
put_online_cpus();
-
- return min(cpus, vecs) + resv;
+ return ret;
}
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2017-06-29 02:30 +0200 |
| Message-ID | <tXvvm-rh-37@gated-at.bofh.it> |
| In reply to | #1676335 |
On Wed, Jun 28, 2017 at 01:15:34PM +1000, Stephen Rothwell wrote: > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. The merge looks fine to me.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web