Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-09 Thread Andi Kleen
> Isn't it possible through some inline assembly trick > that only a certain variable has to be reloaded? A volatile cast does that already -Andi - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-09 Thread Martin Schwidefsky
On Thu, 2007-08-09 at 08:40 -0400, Chris Snook wrote: > > #define reload_var(x) __asm__ __volatile__ (whatever, x) > > > > I don't know inline assembly that much, but isn't it possible > > with that to kind of "fake-touch" the variable, so the compiler > > must reload it (and only it) to make sure

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-09 Thread Chris Snook
Michael Buesch wrote: On Thursday 09 August 2007 02:15:33 Andi Kleen wrote: On Wed, Aug 08, 2007 at 05:08:44PM -0400, Chris Snook wrote: Heiko Carstens wrote: On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: From: Heiko Carstens <[EMAIL PROTECTED]> Date: Wed, 8 Aug 2007 11:33:00

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-09 Thread Michael Buesch
On Thursday 09 August 2007 02:15:33 Andi Kleen wrote: > On Wed, Aug 08, 2007 at 05:08:44PM -0400, Chris Snook wrote: > > Heiko Carstens wrote: > > >On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: > > >>From: Heiko Carstens <[EMAIL PROTECTED]> > > >>Date: Wed, 8 Aug 2007 11:33:00 +0200

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Andi Kleen
On Wed, Aug 08, 2007 at 05:08:44PM -0400, Chris Snook wrote: > Heiko Carstens wrote: > >On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: > >>From: Heiko Carstens <[EMAIL PROTECTED]> > >>Date: Wed, 8 Aug 2007 11:33:00 +0200 > >> > >>>Just saw this while grepping for atomic_reads in a wh

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Chris Snook
Heiko Carstens wrote: On Wed, Aug 08, 2007 at 02:31:15PM -0700, Andrew Morton wrote: On Wed, 08 Aug 2007 17:08:44 -0400 Chris Snook <[EMAIL PROTECTED]> wrote: Heiko Carstens wrote: On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: From: Heiko Carstens <[EMAIL PROTECTED]> Date: We

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Heiko Carstens
On Wed, Aug 08, 2007 at 02:31:15PM -0700, Andrew Morton wrote: > On Wed, 08 Aug 2007 17:08:44 -0400 > Chris Snook <[EMAIL PROTECTED]> wrote: > > > Heiko Carstens wrote: > > > On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: > > >> From: Heiko Carstens <[EMAIL PROTECTED]> > > >> Date:

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Andrew Morton
On Wed, 08 Aug 2007 17:08:44 -0400 Chris Snook <[EMAIL PROTECTED]> wrote: > Heiko Carstens wrote: > > On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: > >> From: Heiko Carstens <[EMAIL PROTECTED]> > >> Date: Wed, 8 Aug 2007 11:33:00 +0200 > >> > >>> Just saw this while grepping for at

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Chris Snook
Heiko Carstens wrote: On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: From: Heiko Carstens <[EMAIL PROTECTED]> Date: Wed, 8 Aug 2007 11:33:00 +0200 Just saw this while grepping for atomic_reads in a while loops. Maybe we should re-add the volatile to atomic_t. Not sure. I think

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Heiko Carstens
On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: > From: Heiko Carstens <[EMAIL PROTECTED]> > Date: Wed, 8 Aug 2007 11:33:00 +0200 > > > Just saw this while grepping for atomic_reads in a while loops. > > Maybe we should re-add the volatile to atomic_t. Not sure. > > I think whatever

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread David Miller
From: Heiko Carstens <[EMAIL PROTECTED]> Date: Wed, 8 Aug 2007 11:33:00 +0200 > Just saw this while grepping for atomic_reads in a while loops. > Maybe we should re-add the volatile to atomic_t. Not sure. I think whatever the choice, it should be done consistently on every architecture. It's jus

Re: [patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Horms
On Wed, Aug 08, 2007 at 11:33:00AM +0200, Heiko Carstens wrote: > From: Heiko Carstens <[EMAIL PROTECTED]> > > For architectures that don't have a volatile atomic_ts constructs like > while (atomic_read(&something)); might result in endless loops since a > barrier() is missing which forces the com

[patch] ipvs: force read of atomic_t in while loop

2007-08-08 Thread Heiko Carstens
From: Heiko Carstens <[EMAIL PROTECTED]> For architectures that don't have a volatile atomic_ts constructs like while (atomic_read(&something)); might result in endless loops since a barrier() is missing which forces the compiler to generate code that actually reads memory contents. Fix this in ip