[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120623211139.GL14083@ZenIV.linux.org.uk>
Date: Sat, 23 Jun 2012 22:11:39 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Oleg Nesterov <oleg@...hat.com>
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>
Subject: Re: deferring __fput()
On Sat, Jun 23, 2012 at 10:01:41PM +0100, Al Viro wrote:
> On Sat, Jun 23, 2012 at 10:38:00PM +0200, Oleg Nesterov wrote:
>
> > > Matter of fact, it would become identical to struct rcu_head
> > > after that...
> >
> > This is not clear to me... Why this is good?
>
> Occam's Razor.
>
> > I understand that sizeof(task_work) == sizeof(rcu_head) would be
> > nice, probably you meant just this?
>
> More than that - the callback type is also the same (pointer to such
> struct -> void). IOW, they both look like two instances of the
> same thing ("list of callbacks"), differing only in what and
> when does calling.
BTW, scratch that "task_work + cred" - cred has rcu_head in it.
So we can put a union in there and slap the trimmed task_work into
it. Voila - there goes separate allocation and *any* need for ->data.
It's just container_of(), in that case as well.
--
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