On Fri, Aug 17, 2007 at 12:49:00PM -0700, Arjan van de Ven wrote: > > On Fri, 2007-08-17 at 12:49 -0700, Paul E. McKenney wrote: > > > > What about reading values modified in interrupt handlers, as in your > > > > "random" case? Or is this a bug where the user of atomic_read() is > > > > invalidly expecting a read each time it is called? > > > > > > the interrupt handler case is an SMP case since you do not know > > > beforehand what cpu your interrupt handler will run on. > > > > With the exception of per-CPU variables, yes. > > if you're spinning waiting for a per-CPU variable to get changed by an > interrupt handler... you have bigger problems than "volatile" ;-) That would be true, if you were doing that. But you might instead be simply making sure that the mainline actions were seen in order by the interrupt handler. My current example is the NMI-save rcu_read_lock() implementation for realtime. Not the common case, I will admit, but still real. ;-) Thanx, Paul - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Nick Piggin <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Satyam Sharma <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Nick Piggin <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Satyam Sharma <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Nick Piggin <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: "Chris Friesen" <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: "Paul E. McKenney" <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- Prev by Date: Re: [PATCH 02/12] Blackfin arch: Add label to call new GPIO API
- Next by Date: [PATCH 0/6] Use one zonelist per node instead of multiple zonelists v4
- Previous by thread: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- Next by thread: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- Index(es):