Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:I really don't see what the point of the barrier would be here. Barriers are generally useless unless you have a counter-part on the other side. The counterpart here is presumably the interrupt handler, which should be terminated by the IO write above regardless of the memory barrier. Of course I might have missed your point. If so please give a description like this for the race that you see: CPU1 CPU2 disable IRQ whatever the race is synchronize_irq While in general I'd agree with you about give latitude to drivers, memory barriers I think is something that we can't afford to. The reason is that memory barries tend to come in pairs, e.g., CPU1 CPU2 write A wmb write B read B rmb read A Taking away either barrier would render the other useless. So whenever we add only one barrier for the benefit of driver writers who don't bother to think about barriers we may not be helping them at all. In any case, such writers should use easier tools like spin locks rather than trying to go lockless. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Jeff Garzik | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Paul E. McKenney | [PATCH RFC 3/9] RCU: Preemptible RCU |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Gerrit Renker | [PATCH 13/37] dccp: Deprecate Ack Ratio sysctl |
| Patrick McHardy | Re: [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
