Thread (26 messages) 26 messages, 6 authors, 2007-09-03

Re: wmb vs mmiowb

From: Jesse Barnes <hidden>
Date: 2007-08-23 17:06:29

quoted
Yeah, they keep threatening to use this instead, but I'm not sure
how easy it would be.  Also they may have more devices/drivers to
worry about than sn2, so maybe changing over would mean too much
driver debugging (well auditing really since it's not that hard to
know where to put them).  Irix actually had an io_unlock() routine
that did this implicitly, but iirc that was shot down for Linux...
Why was it shot down? Seems like a pretty good idea to me ;)
Well, like Linus said, it had some significant downsides (though I think 
Irix had fewer lock types, so the multiplicative effect wasn't so bad 
there).
I'm clueless when it comes to drivers, but I see a lot of mmiowb()
that are not paired with spin_unlock. How are these obvious? (ie.
what is the pattern?) It looks like some might be lockless FIFOs (or
maybe I'm just not aware of where the locks are). Can you just
quickly illustrate the problem being solved?
Wow, it certainly has proliferated since it was added to the tree. :)

I didn't audit all the uses, but it seems like many of them get it 
right, i.e. mmiowb() before spin_unlock() where PIO has been done.  I'd 
have to look carefully to see whether lockless usages are correct, it's 
likely they're not.

Jesse
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help