[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120623203800.GA10306@redhat.com>
Date: Sat, 23 Jun 2012 22:38:00 +0200
From: Oleg Nesterov <oleg@...hat.com>
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>
Subject: Re: deferring __fput()
On 06/23, Al Viro wrote:
>
> BTW, I really wonder why do we need to have that void *data in task_work; we can
> always embed the sucker into a bigger struct (if nothing else, task_work +
> void *data) and get to it via container_of(). And in quite a few cases we don't
> want that data thing at all.
Yes, it is not strictly needed. From the changelog:
"struct task_work" can be embedded in another struct, still it has "void
*data" to handle the most common/simple case.
Namely, for keyctl_session_to_parent(). Probably it has ->data just because
I failed to invent the good name for the struct with task_work + cred.
> Moreover, the reasons to use hlist_head instead of
> a single forward pointer are very thin on the ground:
Oh, yes, there is no any reason. Except the code looks a bit simpler.
> Oleg, do you see any reasons why trimming it down to forward pointer + callback
> pointer wouldn't work?
OK. will do.
> Matter of fact, it would become identical to struct rcu_head
> after that...
This is not clear to me... Why this is good?
I understand that sizeof(task_work) == sizeof(rcu_head) would be
nice, probably you meant just this?
Oleg.
--
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