[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1340630396.2507.66.camel@laptop>
Date: Mon, 25 Jun 2012 15:19:56 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Mimi Zohar <zohar@...ux.vnet.ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
". James Morris" <jmorris@...ei.org>,
linux-security-module@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>,
David Miller <davem@...emloft.net>
Subject: Re: deferring __fput()
On Mon, 2012-06-25 at 13:14 +0100, Al Viro wrote:
> You mean, doing that from RCU callbacks?
Indirectly, yeah, but the RCU callback would schedule it or whatever.
> Still a bad idea, IMO; you will end up with a context
> switch and unpleasantness with delayed user-visible effects of syscalls. With aio we did have
> a delayed execution of fput() anyway; all that has changed there is that we use generic
> mechanism instead of home-grown analog thereof.
Right, the delayed effect is the main concern. The example in the
referred thread was unmount() returning -EBUSY after the last
close()/munmap().
> I'll need to reread that thread to comment on the specifics (had been too long ago; I don't
> remember the details), but... See Linus' objections to full-async fput() circa this April
> or March. There's a reason why this patchset uses task_work_add() whenever possible.
Ok, I'll try and find that thread, so the advantage of task_work_add()
is that you'll keep the work in the task that caused it wherever
possible, right -- provided its actually sitll around.
If we make fput() deferable in general we'll be sure to grow some 'fun'
cases. So are we going to add a sync against unmount someplace to avoid
these un-expected -EBUSY things?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists