From mboxrd@z Thu Jan 1 00:00:00 1970 From: paulmck@linux.vnet.ibm.com (Paul E. McKenney) Date: Thu, 12 Feb 2009 13:59:59 -0800 Subject: [ltt-dev] [RFC git tree] Userspace RCU (urcu) for Linux (repost) In-Reply-To: References: <20090212023308.GA21157@linux.vnet.ibm.com> <20090212040824.GA12346@Krystal> <20090212050120.GA8317@linux.vnet.ibm.com> <20090212070539.GA15896@Krystal> <20090212164621.GC6759@linux.vnet.ibm.com> <20090212192941.GC2047@Krystal> <20090212200249.GG6759@linux.vnet.ibm.com> <20090212203924.GK6759@linux.vnet.ibm.com> Message-ID: <20090212215959.GN6759@linux.vnet.ibm.com> On Thu, Feb 12, 2009 at 01:15:08PM -0800, Linus Torvalds wrote: > > > On Thu, 12 Feb 2009, Paul E. McKenney wrote: > > > > In other words, you are arguing for using ACCESS_ONCE() in the loops, > > but keeping the old ACCESS_ONCE() definition, and declaring BF hardware > > broken? > > Well, I _also_ argue that if you have a busy loop, you'd better have a > cpu_relax() in there somewhere anyway. If you don't, you have a bug. > > So I think the BF approach is "borderline broken", but I think it should > work, if BF just has whatever appropriate cache flush in its cpu_relax. OK, got it. Keep ACCESS_ONCE() as is, make sure any busy-wait loops contain a cpu_relax(). A given busy loop might or might not need ACCESS_ONCE(), but that decision is independent of hardware considerations. Ah, and blackfin's cpu_relax() does seem to have migrated from barrier() to smp_mb() recently, so sounds good to me!!! Thanx, Paul