Re: [PATCH]generic usb serial driver

Greg KH <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, Mar 30, 2007 at 10:38:01AM -0700, Pete Zaitcev wrote:
> On Fri, 30 Mar 2007 11:17:28 +0200, Oliver Neukum <[email protected]> wrote:
> 
> > This can'be solved with a simple spinlock, as wait_event() can sleep.
> 
> That's because wait_event() and its ilk make a bad API. I mentioned it
> many times before, and the answer by its pushers was "make the condition
> to be a function call and take locks inside it". That's just dumb,
> because it works around the silly design. The correct answer is not
> to use wait_event ever.

Agreed.

> > Really somebody went to some effort to find a lockless solution and
> > did well, he just didn't figure out of order execution units. You'd destroy
> > that.
> 
> That somebody obviously needs a girlfriend. Lockless execution in a
> printer driver, that's awesome.
> 
> The bottom line is, there's no excuse for using any kind of smp_mb()
> in USB drivers. None at all. When we have 100Gbit/s USB, then perhaps
> we can talk about it.

Perhaps then, but even then, I doubt it...

I really don't want the "normal" driver developer to have to worry about
things like smp_mb() in their code.  We have a hard enough time dealing
with other, more basic race condition issues :)

thanks,

greg k-h

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.