LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch] generic-ipi: fix the smp_mb() placement
@ 2008-10-29 22:42 Suresh Siddha
  2008-10-30  7:20 ` Jens Axboe
  2008-10-30 18:53 ` Ingo Molnar
  0 siblings, 2 replies; 16+ messages in thread
From: Suresh Siddha @ 2008-10-29 22:42 UTC (permalink / raw)
  To: jens.axboe, paulmck, mingo, jeremy.fitzhardinge, nickpiggin, torvalds
  Cc: linux-kernel, asit.k.mallick

While looking at some other issue recently, we encountered this smp_mb()
placement issue.  x86 specific code also needs some similar fixes. Patch for
that will follow soon.

Please review the appended generic-ipi fix.

thanks,
suresh
---

From: Suresh Siddha <suresh.b.siddha@intel.com>
Subject: generic-ipi: fix the smp_mb() placement

smp_mb() is needed (to make the memory operations visible globally) before
sending the ipi on the sender and the receiver (on Alpha atleast) needs
smp_read_barrier_depends() in the handler before reading the call_single_queue
list in a lock-free fashion.

On x86, x2apic mode register accesses for sending IPI's don't have serializing
semantics. So the need for smp_mb() before sending the IPI becomes more
critical in x2apic mode.

Remove the unnecessary smp_mb() in csd_flag_wait(), as the presence of that
smp_mb() doesn't mean anything on the sender, when the ipi receiver is not
doing any thing special (like memory fence) after clearing the CSD_FLAG_WAIT.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---

diff --git a/kernel/smp.c b/kernel/smp.c
index f362a85..75c8dde 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -51,10 +51,6 @@ static void csd_flag_wait(struct call_single_data *data)
 {
 	/* Wait for response */
 	do {
-		/*
-		 * We need to see the flags store in the IPI handler
-		 */
-		smp_mb();
 		if (!(data->flags & CSD_FLAG_WAIT))
 			break;
 		cpu_relax();
@@ -76,6 +72,11 @@ static void generic_exec_single(int cpu, struct call_single_data *data)
 	list_add_tail(&data->list, &dst->list);
 	spin_unlock_irqrestore(&dst->lock, flags);
 
+	/*
+	 * Make the list addition visible before sending the ipi.
+	 */
+	smp_mb();
+
 	if (ipi)
 		arch_send_call_function_single_ipi(cpu);
 
@@ -157,7 +158,7 @@ void generic_smp_call_function_single_interrupt(void)
 	 * Need to see other stores to list head for checking whether
 	 * list is empty without holding q->lock
 	 */
-	smp_mb();
+	smp_read_barrier_depends();
 	while (!list_empty(&q->list)) {
 		unsigned int data_flags;
 
@@ -191,7 +192,7 @@ void generic_smp_call_function_single_interrupt(void)
 		/*
 		 * See comment on outer loop
 		 */
-		smp_mb();
+		smp_read_barrier_depends();
 	}
 }
 
@@ -370,6 +371,11 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
 	list_add_tail_rcu(&data->csd.list, &call_function_queue);
 	spin_unlock_irqrestore(&call_function_lock, flags);
 
+	/*
+	 * Make the list addition visible before sending the ipi.
+	 */
+	smp_mb();
+
 	/* Send a message to all CPUs in the map */
 	arch_send_call_function_ipi(mask);
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-29 22:42 [patch] generic-ipi: fix the smp_mb() placement Suresh Siddha
@ 2008-10-30  7:20 ` Jens Axboe
  2008-10-30 16:30   ` Suresh Siddha
  2008-10-30 18:53 ` Ingo Molnar
  1 sibling, 1 reply; 16+ messages in thread
From: Jens Axboe @ 2008-10-30  7:20 UTC (permalink / raw)
  To: Suresh Siddha
  Cc: paulmck, mingo, jeremy.fitzhardinge, nickpiggin, torvalds,
	linux-kernel, asit.k.mallick

On Wed, Oct 29 2008, Suresh Siddha wrote:
> While looking at some other issue recently, we encountered this smp_mb()
> placement issue.  x86 specific code also needs some similar fixes. Patch for
> that will follow soon.
> 
> Please review the appended generic-ipi fix.

Looks good, nice debugging! A few comments below.

> 
> thanks,
> suresh
> ---
> 
> From: Suresh Siddha <suresh.b.siddha@intel.com>
> Subject: generic-ipi: fix the smp_mb() placement
> 
> smp_mb() is needed (to make the memory operations visible globally) before
> sending the ipi on the sender and the receiver (on Alpha atleast) needs
> smp_read_barrier_depends() in the handler before reading the call_single_queue
> list in a lock-free fashion.
> 
> On x86, x2apic mode register accesses for sending IPI's don't have serializing
> semantics. So the need for smp_mb() before sending the IPI becomes more
> critical in x2apic mode.
> 
> Remove the unnecessary smp_mb() in csd_flag_wait(), as the presence of that
> smp_mb() doesn't mean anything on the sender, when the ipi receiver is not
> doing any thing special (like memory fence) after clearing the CSD_FLAG_WAIT.
> 
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> ---
> 
> diff --git a/kernel/smp.c b/kernel/smp.c
> index f362a85..75c8dde 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -51,10 +51,6 @@ static void csd_flag_wait(struct call_single_data *data)
>  {
>  	/* Wait for response */
>  	do {
> -		/*
> -		 * We need to see the flags store in the IPI handler
> -		 */
> -		smp_mb();
>  		if (!(data->flags & CSD_FLAG_WAIT))
>  			break;
>  		cpu_relax();
> @@ -76,6 +72,11 @@ static void generic_exec_single(int cpu, struct call_single_data *data)
>  	list_add_tail(&data->list, &dst->list);
>  	spin_unlock_irqrestore(&dst->lock, flags);
>  
> +	/*
> +	 * Make the list addition visible before sending the ipi.
> +	 */
> +	smp_mb();
> +
>  	if (ipi)
>  		arch_send_call_function_single_ipi(cpu);

We can downgrade this to a smp_wmb().

>  
> @@ -157,7 +158,7 @@ void generic_smp_call_function_single_interrupt(void)
>  	 * Need to see other stores to list head for checking whether
>  	 * list is empty without holding q->lock
>  	 */
> -	smp_mb();
> +	smp_read_barrier_depends();
>  	while (!list_empty(&q->list)) {
>  		unsigned int data_flags;
>  
> @@ -191,7 +192,7 @@ void generic_smp_call_function_single_interrupt(void)
>  		/*
>  		 * See comment on outer loop
>  		 */
> -		smp_mb();
> +		smp_read_barrier_depends();
>  	}
>  }
>  
> @@ -370,6 +371,11 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
>  	list_add_tail_rcu(&data->csd.list, &call_function_queue);
>  	spin_unlock_irqrestore(&call_function_lock, flags);
>  
> +	/*
> +	 * Make the list addition visible before sending the ipi.
> +	 */
> +	smp_mb();
> +
>  	/* Send a message to all CPUs in the map */
>  	arch_send_call_function_ipi(mask);

Ditto

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-30  7:20 ` Jens Axboe
@ 2008-10-30 16:30   ` Suresh Siddha
  2008-10-30 17:25     ` Jens Axboe
  0 siblings, 1 reply; 16+ messages in thread
From: Suresh Siddha @ 2008-10-30 16:30 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Siddha, Suresh B, paulmck, mingo, jeremy.fitzhardinge,
	nickpiggin, torvalds, linux-kernel, Mallick, Asit K

On Thu, Oct 30, 2008 at 12:20:30AM -0700, Jens Axboe wrote:
> > @@ -76,6 +72,11 @@ static void generic_exec_single(int cpu, struct call_single_data *data)
> >  	list_add_tail(&data->list, &dst->list);
> >  	spin_unlock_irqrestore(&dst->lock, flags);
> >  
> > +	/*
> > +	 * Make the list addition visible before sending the ipi.
> > +	 */
> > +	smp_mb();
> > +
> >  	if (ipi)
> >  		arch_send_call_function_single_ipi(cpu);
> 
> We can downgrade this to a smp_wmb().

No. We want the ipi receiver to see the new consistent data rather than possible
old consistent data.

And on x86, smp_wmb() is a simple barrier() (in !CONFIG_X86_OOSTORE) and
which doesn't do much in this case.

on x86 mfence (smp_mb()) will ensure that msr based APIC (x2apic) accesses (ipi)
will be visible only after the memory operations before smp_mb() are made
visible.

thanks,
suresh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-30 16:30   ` Suresh Siddha
@ 2008-10-30 17:25     ` Jens Axboe
  0 siblings, 0 replies; 16+ messages in thread
From: Jens Axboe @ 2008-10-30 17:25 UTC (permalink / raw)
  To: Suresh Siddha
  Cc: paulmck, mingo, jeremy.fitzhardinge, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K

On Thu, Oct 30 2008, Suresh Siddha wrote:
> On Thu, Oct 30, 2008 at 12:20:30AM -0700, Jens Axboe wrote:
> > > @@ -76,6 +72,11 @@ static void generic_exec_single(int cpu, struct call_single_data *data)
> > >  	list_add_tail(&data->list, &dst->list);
> > >  	spin_unlock_irqrestore(&dst->lock, flags);
> > >  
> > > +	/*
> > > +	 * Make the list addition visible before sending the ipi.
> > > +	 */
> > > +	smp_mb();
> > > +
> > >  	if (ipi)
> > >  		arch_send_call_function_single_ipi(cpu);
> > 
> > We can downgrade this to a smp_wmb().
> 
> No. We want the ipi receiver to see the new consistent data rather
> than possible old consistent data.

Oh right, we need visibility here and not just store ordering.

> 
> And on x86, smp_wmb() is a simple barrier() (in !CONFIG_X86_OOSTORE)
> and which doesn't do much in this case.
> 
> on x86 mfence (smp_mb()) will ensure that msr based APIC (x2apic)
> accesses (ipi) will be visible only after the memory operations before
> smp_mb() are made visible.

OK, I'm convinced. I'll queue up the patch, thanks!

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-29 22:42 [patch] generic-ipi: fix the smp_mb() placement Suresh Siddha
  2008-10-30  7:20 ` Jens Axboe
@ 2008-10-30 18:53 ` Ingo Molnar
  2008-10-30 20:23   ` Suresh Siddha
  1 sibling, 1 reply; 16+ messages in thread
From: Ingo Molnar @ 2008-10-30 18:53 UTC (permalink / raw)
  To: Suresh Siddha
  Cc: jens.axboe, paulmck, jeremy.fitzhardinge, nickpiggin, torvalds,
	linux-kernel, asit.k.mallick


* Suresh Siddha <suresh.b.siddha@intel.com> wrote:

> Subject: generic-ipi: fix the smp_mb() placement
> 
> smp_mb() is needed (to make the memory operations visible globally) 
> before sending the ipi on the sender and the receiver (on Alpha 
> atleast) needs smp_read_barrier_depends() in the handler before 
> reading the call_single_queue list in a lock-free fashion.
> 
> On x86, x2apic mode register accesses for sending IPI's don't have 
> serializing semantics. So the need for smp_mb() before sending the 
> IPI becomes more critical in x2apic mode.
> 
> Remove the unnecessary smp_mb() in csd_flag_wait(), as the presence 
> of that smp_mb() doesn't mean anything on the sender, when the ipi 
> receiver is not doing any thing special (like memory fence) after 
> clearing the CSD_FLAG_WAIT.

nice! Did you see an actual lockup due to this? Seems like a v2.6.28 
fix to me in any case.

	Ingo

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-30 18:53 ` Ingo Molnar
@ 2008-10-30 20:23   ` Suresh Siddha
  2008-10-31  5:10     ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 16+ messages in thread
From: Suresh Siddha @ 2008-10-30 20:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Siddha, Suresh B, jens.axboe, paulmck, jeremy.fitzhardinge,
	nickpiggin, torvalds, linux-kernel, Mallick, Asit K

On Thu, Oct 30, 2008 at 11:53:22AM -0700, Ingo Molnar wrote:
> 
> * Suresh Siddha <suresh.b.siddha@intel.com> wrote:
> 
> > Subject: generic-ipi: fix the smp_mb() placement
> >
> > smp_mb() is needed (to make the memory operations visible globally)
> > before sending the ipi on the sender and the receiver (on Alpha
> > atleast) needs smp_read_barrier_depends() in the handler before
> > reading the call_single_queue list in a lock-free fashion.
> >
> > On x86, x2apic mode register accesses for sending IPI's don't have
> > serializing semantics. So the need for smp_mb() before sending the
> > IPI becomes more critical in x2apic mode.
> >
> > Remove the unnecessary smp_mb() in csd_flag_wait(), as the presence
> > of that smp_mb() doesn't mean anything on the sender, when the ipi
> > receiver is not doing any thing special (like memory fence) after
> > clearing the CSD_FLAG_WAIT.
> 
> nice! Did you see an actual lockup due to this?

We didn't see the lockup in our tests but Xen folks reported similar failures
with their smp call function code.

> Seems like a v2.6.28 fix to me in any case.

Yes.

thanks,
suresh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-30 20:23   ` Suresh Siddha
@ 2008-10-31  5:10     ` Jeremy Fitzhardinge
  2008-10-31  9:39       ` Ingo Molnar
  0 siblings, 1 reply; 16+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-31  5:10 UTC (permalink / raw)
  To: Suresh Siddha
  Cc: Ingo Molnar, jens.axboe, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K

Suresh Siddha wrote:
> We didn't see the lockup in our tests but Xen folks reported similar failures
> with their smp call function code.
>   

...really?  I don't remember anything like that, but perhaps I'm 
forgetting something.  In Xen the IPI is sent with a hypercall, which is 
definitely a solid enough barrier for these purposes.

    J

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-31  5:10     ` Jeremy Fitzhardinge
@ 2008-10-31  9:39       ` Ingo Molnar
  2008-10-31 11:12         ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 16+ messages in thread
From: Ingo Molnar @ 2008-10-31  9:39 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Suresh Siddha, jens.axboe, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Suresh Siddha wrote:
>> We didn't see the lockup in our tests but Xen folks reported similar failures
>> with their smp call function code.
>>   
>
> ...really?  I don't remember anything like that, but perhaps I'm 
> forgetting something.  In Xen the IPI is sent with a hypercall, 
> which is definitely a solid enough barrier for these purposes.

i think Suresh might be referring to some of the fragilities Xen had 
with generic-ipi. But those AFAICT were due to the on-stack lifetime 
bug that Nick fixed via the kmalloc? v2.6.26-ish issue.

	Ingo

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-31  9:39       ` Ingo Molnar
@ 2008-10-31 11:12         ` Jeremy Fitzhardinge
  2008-10-31 16:53           ` Suresh Siddha
  0 siblings, 1 reply; 16+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-31 11:12 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Suresh Siddha, jens.axboe, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K

Ingo Molnar wrote:
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
>   
>> Suresh Siddha wrote:
>>     
>>> We didn't see the lockup in our tests but Xen folks reported similar failures
>>> with their smp call function code.
>>>   
>>>       
>> ...really?  I don't remember anything like that, but perhaps I'm 
>> forgetting something.  In Xen the IPI is sent with a hypercall, 
>> which is definitely a solid enough barrier for these purposes.
>>     
>
> i think Suresh might be referring to some of the fragilities Xen had 
> with generic-ipi. But those AFAICT were due to the on-stack lifetime 
> bug that Nick fixed via the kmalloc? v2.6.26-ish issue.

Right, that's all I could think of.

    J

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-31 11:12         ` Jeremy Fitzhardinge
@ 2008-10-31 16:53           ` Suresh Siddha
  2008-10-31 20:30             ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 16+ messages in thread
From: Suresh Siddha @ 2008-10-31 16:53 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Ingo Molnar, Siddha, Suresh B, jens.axboe, paulmck, nickpiggin,
	torvalds, linux-kernel, Mallick, Asit K

On Fri, Oct 31, 2008 at 04:12:32AM -0700, Jeremy Fitzhardinge wrote:
> Ingo Molnar wrote:
> > * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> >
> >   
> >> Suresh Siddha wrote:
> >>     
> >>> We didn't see the lockup in our tests but Xen folks reported similar failures
> >>> with their smp call function code.
> >>>   
> >>>       
> >> ...really?  I don't remember anything like that, but perhaps I'm 
> >> forgetting something.  In Xen the IPI is sent with a hypercall, 
> >> which is definitely a solid enough barrier for these purposes.
> >>     
> >
> > i think Suresh might be referring to some of the fragilities Xen had 
> > with generic-ipi. But those AFAICT were due to the on-stack lifetime 
> > bug that Nick fixed via the kmalloc? v2.6.26-ish issue.
> 
> Right, that's all I could think of.

No. I am referring to Xen hypervisor code fix recently done by the Xen
team in the Intel.

http://xenbits.xensource.com/xen-unstable.hg?rev/50170dc8649c

thanks,
suresh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-31 16:53           ` Suresh Siddha
@ 2008-10-31 20:30             ` Jeremy Fitzhardinge
  2008-11-03 10:17               ` Ingo Molnar
  0 siblings, 1 reply; 16+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-31 20:30 UTC (permalink / raw)
  To: Suresh Siddha
  Cc: Ingo Molnar, jens.axboe, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K

Suresh Siddha wrote:
> No. I am referring to Xen hypervisor code fix recently done by the Xen
> team in the Intel.
>
> http://xenbits.xensource.com/xen-unstable.hg?rev/50170dc8649c
>   

Ah, yes, OK then.

    J

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-10-31 20:30             ` Jeremy Fitzhardinge
@ 2008-11-03 10:17               ` Ingo Molnar
  2008-11-03 23:48                 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 16+ messages in thread
From: Ingo Molnar @ 2008-11-03 10:17 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Suresh Siddha, jens.axboe, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Suresh Siddha wrote:
>> No. I am referring to Xen hypervisor code fix recently done by the Xen
>> team in the Intel.
>>
>> http://xenbits.xensource.com/xen-unstable.hg?rev/50170dc8649c
>>   
>
> Ah, yes, OK then.

ok - so that makes it a v2.6.28 item i guess.

	Ingo

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-11-03 10:17               ` Ingo Molnar
@ 2008-11-03 23:48                 ` Jeremy Fitzhardinge
  2008-11-04  9:19                   ` Ingo Molnar
  0 siblings, 1 reply; 16+ messages in thread
From: Jeremy Fitzhardinge @ 2008-11-03 23:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Suresh Siddha, jens.axboe, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K

Ingo Molnar wrote:
> ok - so that makes it a v2.6.28 item i guess.
>   

The case Suresh is talking about was a fix to Xen itself, rather than on 
the kernel side, so it doesn't need to be a .28 issue on Xen's account.

    J

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-11-03 23:48                 ` Jeremy Fitzhardinge
@ 2008-11-04  9:19                   ` Ingo Molnar
  2008-11-04 22:25                     ` Suresh Siddha
  0 siblings, 1 reply; 16+ messages in thread
From: Ingo Molnar @ 2008-11-04  9:19 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Suresh Siddha, jens.axboe, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Ingo Molnar wrote:
>> ok - so that makes it a v2.6.28 item i guess.
>>   
>
> The case Suresh is talking about was a fix to Xen itself, rather 
> than on the kernel side, so it doesn't need to be a .28 issue on 
> Xen's account.

ok - but still the portion of the fix that strengthens barriers looks 
obvious to have and there's little downside that i can see.

Suresh, you might want to split the patch(es) in two: get the barrier 
strengthening changes into v2.6.28 (to fix the x2apic bug), while the 
aspects that _weaken_ barriers can wait for v2.6.29.

With that it would be a 100% safe change for v2.6.28-rc4.

	Ingo

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-11-04  9:19                   ` Ingo Molnar
@ 2008-11-04 22:25                     ` Suresh Siddha
  2008-11-05  9:20                       ` Jens Axboe
  0 siblings, 1 reply; 16+ messages in thread
From: Suresh Siddha @ 2008-11-04 22:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jeremy Fitzhardinge, Siddha, Suresh B, jens.axboe, paulmck,
	nickpiggin, torvalds, linux-kernel, Mallick, Asit K,
	venkatesh.pallipadi

On Tue, Nov 04, 2008 at 02:19:56AM -0700, Ingo Molnar wrote:
> 
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> 
> > Ingo Molnar wrote:
> >> ok - so that makes it a v2.6.28 item i guess.
> >>   
> >
> > The case Suresh is talking about was a fix to Xen itself, rather 
> > than on the kernel side, so it doesn't need to be a .28 issue on 
> > Xen's account.
> 
> ok - but still the portion of the fix that strengthens barriers looks 
> obvious to have and there's little downside that i can see.
> 
> Suresh, you might want to split the patch(es) in two: get the barrier 
> strengthening changes into v2.6.28 (to fix the x2apic bug), while the 
> aspects that _weaken_ barriers can wait for v2.6.29.
> 
> With that it would be a 100% safe change for v2.6.28-rc4.

Ok. I just posted three patches (including the x86 specific change).

[patch 1/3] generic-ipi: add smp_mb() before sending the IPI
[patch 2/3] x86: Add smp_mb() before sending INVALIDATE_TLB_VECTOR
[patch 3/3] generic-ipi: fix the smp_mb() usage

First two patches are safe to go into v2.6.28. Third patch can wait for v2.6.29.

thanks,
suresh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch] generic-ipi: fix the smp_mb() placement
  2008-11-04 22:25                     ` Suresh Siddha
@ 2008-11-05  9:20                       ` Jens Axboe
  0 siblings, 0 replies; 16+ messages in thread
From: Jens Axboe @ 2008-11-05  9:20 UTC (permalink / raw)
  To: Suresh Siddha
  Cc: Ingo Molnar, Jeremy Fitzhardinge, paulmck, nickpiggin, torvalds,
	linux-kernel, Mallick, Asit K, venkatesh.pallipadi

On Tue, Nov 04 2008, Suresh Siddha wrote:
> On Tue, Nov 04, 2008 at 02:19:56AM -0700, Ingo Molnar wrote:
> > 
> > * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> > 
> > > Ingo Molnar wrote:
> > >> ok - so that makes it a v2.6.28 item i guess.
> > >>   
> > >
> > > The case Suresh is talking about was a fix to Xen itself, rather 
> > > than on the kernel side, so it doesn't need to be a .28 issue on 
> > > Xen's account.
> > 
> > ok - but still the portion of the fix that strengthens barriers looks 
> > obvious to have and there's little downside that i can see.
> > 
> > Suresh, you might want to split the patch(es) in two: get the barrier 
> > strengthening changes into v2.6.28 (to fix the x2apic bug), while the 
> > aspects that _weaken_ barriers can wait for v2.6.29.
> > 
> > With that it would be a 100% safe change for v2.6.28-rc4.
> 
> Ok. I just posted three patches (including the x86 specific change).
> 
> [patch 1/3] generic-ipi: add smp_mb() before sending the IPI
> [patch 2/3] x86: Add smp_mb() before sending INVALIDATE_TLB_VECTOR
> [patch 3/3] generic-ipi: fix the smp_mb() usage
> 
> First two patches are safe to go into v2.6.28. Third patch can wait for v2.6.29.

I already have the combined 1+3 patch queued up...

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-11-05  9:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-29 22:42 [patch] generic-ipi: fix the smp_mb() placement Suresh Siddha
2008-10-30  7:20 ` Jens Axboe
2008-10-30 16:30   ` Suresh Siddha
2008-10-30 17:25     ` Jens Axboe
2008-10-30 18:53 ` Ingo Molnar
2008-10-30 20:23   ` Suresh Siddha
2008-10-31  5:10     ` Jeremy Fitzhardinge
2008-10-31  9:39       ` Ingo Molnar
2008-10-31 11:12         ` Jeremy Fitzhardinge
2008-10-31 16:53           ` Suresh Siddha
2008-10-31 20:30             ` Jeremy Fitzhardinge
2008-11-03 10:17               ` Ingo Molnar
2008-11-03 23:48                 ` Jeremy Fitzhardinge
2008-11-04  9:19                   ` Ingo Molnar
2008-11-04 22:25                     ` Suresh Siddha
2008-11-05  9:20                       ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).