correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd
PATCH 1/1 correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd
I have no idea how I came to use __cpumask_set_cpu() there, the conversion should have been set_bit() -> __set_bit(). The wrong construct results in problems on systems with relatively few CPUs.
xen/common/softirq.c +1 -1
@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,if ( !per_cpu (batching, this_cpu) ||in_irq () )smp_send_event_check_cpu (cpu);else -__cpumask_set_cpu (nr, &per_cpu (batch_mask, this_cpu)); +__set_bit (nr, &per_cpu (batch_mask, this_cpu)); }void cpu_raise_softirq_batch_begin (void )
correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd
I have no idea how I came to use __cpumask_set_cpu() there, the conversion should have been set_bit() -> __set_bit(). The wrong construct results in problems on systems with relatively few CPUs.
xen/common/softirq.c +1 -1
@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,if ( !per_cpu (batching, this_cpu) ||in_irq () )smp_send_event_check_cpu (cpu);else -__cpumask_set_cpu (nr, &per_cpu (batch_mask, this_cpu)); +__set_bit (nr, &per_cpu (batch_mask, this_cpu)); }void cpu_raise_softirq_batch_begin (void )
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · you
I have no idea how I came to use
__cpumask_set_cpu()there, the conversion should have beenset_bit()->__set_bit(). The wrong construct results in problems on systems with relatively few CPUs.Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Jan Beulich <[email protected]>
xen/common/softirq.c void cpu_raise_softirq(unsigned int cpu, · line 112
Quoted 8 lines
xen/common/softirq.c +1
-1@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,if ( !per_cpu (batching, this_cpu) ||in_irq () )smp_send_event_check_cpu (cpu);else -__cpumask_set_cpu (nr, &per_cpu (batch_mask, this_cpu)); +__set_bit (nr, &per_cpu (batch_mask, this_cpu)); }void cpu_raise_softirq_batch_begin (void )
Thanks !
--
Sander
Quoted 6 lines · Jan Beulich
I have no idea how I came to use
__cpumask_set_cpu()there, the conversion should have beenset_bit()->__set_bit(). The wrong construct results in problems on systems with relatively few CPUs.Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Jan Beulich <[email protected]>
Insofar as this clearly corrects the identified regression,
However, I am still not convinced that the resulting code is actually correct.
batch_mask is a cpumask_t and used properly as a cpumask in cpumask_raise_softirq(). It is wrong to be putting softirq indices into it here.
Quoted 17 lines
xen/common/softirq.c +1
-1@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,if ( !per_cpu (batching, this_cpu) ||in_irq () )smp_send_event_check_cpu (cpu);else -__cpumask_set_cpu (nr, &per_cpu (batch_mask, this_cpu)); +__set_bit (nr, &per_cpu (batch_mask, this_cpu)); }void cpu_raise_softirq_batch_begin (void )
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 23.02.15 at 13:01, <[email protected]> wrote:
Quoted 6 lines · Jan Beulich
I have no idea how I came to use
__cpumask_set_cpu()there, the conversion should have beenset_bit()->__set_bit(). The wrong construct results in problems on systems with relatively few CPUs.Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Jan Beulich <[email protected]>Insofar as this clearly corrects the identified regression,
Quoted 8 lines
Reviewed-by Andrew Cooper <[email protected]>However, I am still not convinced that the resulting code is actually correct.
batch_maskis acpumask_tand used properly as a cpumask incpumask_raise_softirq(). It is wrong to be putting softirq indices into it here.
Ah, now I see (somehow I didn't pay close enough attention to what you said in the morning) - the code was wrong even before that change. In that case - yes, let's not fix it the wrong way.
Jan
Quoted 10 lines · you
I have no idea how I came to use
__cpumask_set_cpu()there, the conversion should have beenset_bit()->__set_bit(). The wrong construct results in problems on systems with relatively few CPUs.Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Jan Beulich <[email protected]>
xen/common/softirq.c void cpu_raise_softirq(unsigned int cpu, · line 112
Quoted 8 lines
xen/common/softirq.c +1
-1@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,if ( !per_cpu (batching, this_cpu) ||in_irq () )smp_send_event_check_cpu (cpu);else -__cpumask_set_cpu (nr, &per_cpu (batch_mask, this_cpu)); +__set_bit (nr, &per_cpu (batch_mask, this_cpu)); }void cpu_raise_softirq_batch_begin (void )
Hi Jan,
Any reason this wasn't applied to staging yet ?
--
Sander
Quoted 21 lines
Quoted 1 line
Quoted 1 line · On 26.02.15 at 17:53, <[email protected]> wrote:
Quoted 17 lines · you
I have no idea how I came to use
__cpumask_set_cpu()there, the conversion should have beenset_bit()->__set_bit(). The wrong construct results in problems on systems with relatively few CPUs.Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Jan Beulich <[email protected]>xen/common/softirq.c +1
-1@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,if ( !per_cpu (batching, this_cpu) ||in_irq () )smp_send_event_check_cpu (cpu);else -__cpumask_set_cpu (nr, &per_cpu (batch_mask, this_cpu)); +__set_bit (nr, &per_cpu (batch_mask, this_cpu)); }
Quoted 5 lines
xen/common/softirq.c void cpu_raise_softirq(unsigned int cpu, · line 112
Quoted 1 line
xen/common/softirq.c +0
-0void cpu_raise_softirq_batch_begin (void )Hi Jan,
Any reason this wasn't applied to staging yet ?
It didn't get ack-ed so far (and it was a little too early still to ping it - I try to allow a week before doing so).
Jan
Ian Campbell
Acked-byQuoted 21 lines · Jan Beulich
Quoted 21 lines
Quoted 1 line
Quoted 1 line · On 26.02.15 at 17:53, <[email protected]> wrote:
Quoted 17 lines · you
I have no idea how I came to use
__cpumask_set_cpu()there, the conversion should have beenset_bit()->__set_bit(). The wrong construct results in problems on systems with relatively few CPUs.Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Jan Beulich <[email protected]>xen/common/softirq.c +1
-1@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,if ( !per_cpu (batching, this_cpu) ||in_irq () )smp_send_event_check_cpu (cpu);else -__cpumask_set_cpu (nr, &per_cpu (batch_mask, this_cpu)); +__set_bit (nr, &per_cpu (batch_mask, this_cpu)); }
Quoted 7 lines
Quoted 5 lines
xen/common/softirq.c void cpu_raise_softirq(unsigned int cpu, · line 112
Quoted 1 line
xen/common/softirq.c +0
-0void cpu_raise_softirq_batch_begin (void )Hi Jan,
Any reason this wasn't applied to staging yet ?
It didn't get ack-ed
Sorry, I thought this was an x86 patch for some reason and therefore that Andrew's ack was sufficient.
For v2 of the patch (<[email protected]>, using __cpumask_set_cpu(cpu, ...):