Re: [RFC][PATCH] making vfree() safe from interrupt contexts

2013-03-03 Thread Linus Torvalds
On Sun, Mar 3, 2013 at 2:51 PM, Al Viro wrote: > > +struct vfree_deferred { > + spinlock_t lock; > + void *list; > + struct work_struct wq; > +}; Looking more at this, just get rid of the spinlock entirely, and use for the list. IRQ-safety without the locking. Because you got

Re: [RFC][PATCH] making vfree() safe from interrupt contexts

2013-03-03 Thread Al Viro
On Sun, Mar 03, 2013 at 02:34:00PM -0800, Linus Torvalds wrote: > On Sun, Mar 3, 2013 at 10:47 AM, Al Viro wrote: > > To bring back the thing discussed back in, IIRC, December: we have > > a bunch of places where inability to do vfree() from interrupt contexts > > (the most common case is

Re: [RFC][PATCH] making vfree() safe from interrupt contexts

2013-03-03 Thread Linus Torvalds
On Sun, Mar 3, 2013 at 10:47 AM, Al Viro wrote: > To bring back the thing discussed back in, IIRC, December: we have > a bunch of places where inability to do vfree() from interrupt contexts > (the most common case is doing that from RCU callback) leads to very > ugly open-coded schemes th

Re: [RFC][PATCH] making vfree() safe from interrupt contexts

2013-03-03 Thread Al Viro
On Sun, Mar 03, 2013 at 06:47:36PM +, Al Viro wrote: > To bring back the thing discussed back in, IIRC, December: we have > a bunch of places where inability to do vfree() from interrupt contexts > (the most common case is doing that from RCU callback) leads to very > ugly open-coded sche

[RFC][PATCH] making vfree() safe from interrupt contexts

2013-03-03 Thread Al Viro
To bring back the thing discussed back in, IIRC, December: we have a bunch of places where inability to do vfree() from interrupt contexts (the most common case is doing that from RCU callback) leads to very ugly open-coded schemes that delay it one way or another. We can let vfree() itsel