login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
August
»
8
Re: [patch] ipvs: force read of atomic_t in while loop
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: Chris Snook <csnook@...>
Cc: Heiko Carstens <heiko.carstens@...>, <andi@...>, David Miller <davem@...>, <linux-kernel@...>, <netdev@...>, <schwidefsky@...>, <wensong@...>, <horms@...>
Subject:
Re: [patch] ipvs: force read of atomic_t in while loop
Date: Wednesday, August 8, 2007 - 5:31 pm
On Wed, 08 Aug 2007 17:08:44 -0400 Chris Snook <csnook@redhat.com> wrote:
quoted text
> Heiko Carstens wrote: > > On Wed, Aug 08, 2007 at 03:21:31AM -0700, David Miller wrote: > >> From: Heiko Carstens <heiko.carstens@de.ibm.com> > >> 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 just asking for trouble if your arch does it differently from > >> every other. > > > > Well..currently it's i386/x86_64 and s390 which have no volatile > > in atomic_t. And yes, of course I agree it should be consistent > > across all architectures. But it isn't. > > Based on recent discussion, it's pretty clear that there's a lot of > confusion about this. A lot of people (myself included, until I thought > about it long and hard) will reasonably assume that calling > atomic_read() will actually read the value from memory. Leaving out the > volatile declaration seems like a pessimization to me. If you force > people to use barrier() everywhere they're working with atomic_t, it > will force re-reads of all the non-atomic data in use as well, which > will cause more memory fetches of things that generally don't need > barrier(). That and it's a bug waiting to happen. > > Andi -- your thoughts on the matter?
I'm not Andi, but this not-Andi thinks that permitting the compiler to cache the results of atomic_read() is dumb. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[patch] ipvs: force read of atomic_t in while loop
, Heiko Carstens
, (Wed Aug 8, 5:33 am)
Re: [patch] ipvs: force read of atomic_t in while loop
, David Miller
, (Wed Aug 8, 6:21 am)
Re: [patch] ipvs: force read of atomic_t in while loop
, Heiko Carstens
, (Wed Aug 8, 6:28 am)
Re: [patch] ipvs: force read of atomic_t in while loop
, Chris Snook
, (Wed Aug 8, 5:08 pm)
Re: [patch] ipvs: force read of atomic_t in while loop
, Andi Kleen
, (Wed Aug 8, 8:15 pm)
Re: [patch] ipvs: force read of atomic_t in while loop
, Michael Buesch
, (Thu Aug 9, 8:35 am)
Re: [patch] ipvs: force read of atomic_t in while loop
, Andi Kleen
, (Thu Aug 9, 9:36 am)
Re: [patch] ipvs: force read of atomic_t in while loop
, Chris Snook
, (Thu Aug 9, 8:40 am)
Re: [patch] ipvs: force read of atomic_t in while loop
, Martin Schwidefsky
, (Thu Aug 9, 8:49 am)
Re: [patch] ipvs: force read of atomic_t in while loop
, Andrew Morton
, (Wed Aug 8, 5:31 pm)
Re: [patch] ipvs: force read of atomic_t in while loop
, Heiko Carstens
, (Wed Aug 8, 6:27 pm)
Re: [patch] ipvs: force read of atomic_t in while loop
, Chris Snook
, (Wed Aug 8, 6:38 pm)
Re: [patch] ipvs: force read of atomic_t in while loop
, Horms
, (Wed Aug 8, 5:45 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Jeremy Fitzhardinge
Re: [RFC 00/15] x86_64: Optimize percpu accesses
Vladislav Bolkhovitin
Re: Integration of SCST in the mainstream Linux kernel
Mike Galbraith
Re: regression: CD burning (k3b) went broke
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Linus Torvalds
Re: [GIT]: Networking
Michael Grollman
Re: 8169 Intermittent ifup Failure Issue With RTL8102E Chipset in Intel's New D945...
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
683 guests
online.
Online users
prepackeron
Syndicate