Hi, > > Just look at the tasklet_disable() logic. > > Do not count this. > > Done this way because nobody needed that thing, except for _one_ place > in keyboard/console driver, which was very difficult to fix that time, > when vt code was utterly messy and not smp safe at all. > > start_bh_atomic() was successfully killed, but we had to preserve analogue > of disable_bh() with the same semantics for some time. > It is deliberately implemented in a way, which does not impact hot paths > and is easy to remove. > > It is sad that some usb drivers started to use this creepy and > useless thing.
the usbatm USB driver uses it in the methods for opening and closing a new network connection, and on device disconnect. Yes, tasklet_disable could be eliminated by adding a spinlock. However this would mean taking the lock every time a packet is received or transmitted. As it is, typically open occurs once, when the computer boots, and close and disconnect also occur once each, when the computer shuts down. I felt that three calls to tasklet_disable were better than a gazillion calls to spin_(un)lock. Please feel free to educate me :) Ciao, Duncan. - 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/