lkml.org 
[lkml]   [2013]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC][PATCH] making vfree() safe from interrupt contexts
From
On Sun, Mar 3, 2013 at 10:47 AM, Al Viro <viro@zeniv.linux.org.uk> 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 that delay it one way or another. We can let vfree()
> itself do that instead. AFAICS, it works; the diff below covers several
> obvious cases found just by grep. I'm fairly sure that there's more code
> that could benefit from that...

I have nothing against the patch, but I hate seeing it just before I
am getting ready to close the merge window.

And I'm not willing to apply it, since I think it's buggy: the whole
point of deferred_vfree() is that it is for irq context, yet it's not
using an irq-safe lock. So nested interrupts can deadlock.

So I think the concept is fine, the patch is probably fine after just
changing the spinlock to be irq-safe, but the timing is horrible. It
doesn't seem to be *that* urgent, so maybe you could just put it in
your queue for 3.10 after fixing the irq locking?

Linus


\
 
 \ /
  Last update: 2013-03-04 00:21    [W:0.051 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site