From: Matt Helsley <matthltc@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Shailabh Nagar <nagar@watson.ibm.com>,
"Chandra S. Seetharaman" <sekharan@us.ibm.com>,
"John T. Kohl" <jtk@us.ibm.com>, Balbir Singh <balbir@in.ibm.com>,
Jes Sorensen <jes@sgi.com>, LKML <linux-kernel@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
LSE <lse-tech@lists.sourceforge.net>
Subject: Re: [Lse-tech] [PATCH 00/11] Task watchers: Introduction
Date: Wed, 21 Jun 2006 02:13:05 -0700 [thread overview]
Message-ID: <1150881185.21787.980.camel@stark> (raw)
In-Reply-To: <20060621020754.59dd42c6.akpm@osdl.org>
On Wed, 2006-06-21 at 02:07 -0700, Andrew Morton wrote:
> On Wed, 21 Jun 2006 01:35:29 -0700
> Matt Helsley <matthltc@us.ibm.com> wrote:
>
> > On Mon, 2006-06-19 at 03:24 -0700, Andrew Morton wrote:
> > > On Tue, 13 Jun 2006 16:52:01 -0700
> > > Matt Helsley <matthltc@us.ibm.com> wrote:
> > >
> > > > Task watchers is a notifier chain that sends notifications to registered
> > > > callers whenever a task forks, execs, changes its [re][ug]id, or exits.
> > >
> > > Seems a reasonable objective - it'll certainly curtail (indeed, reverse)
> > > the ongoing proliferation of little subsystem-specific hooks all over the
> > > core code, will allow us to remove some #includes from core code and should
> > > permit some more things to be loaded as modules.
> > >
> > > But I do wonder if it would have been better to have separate chains for
> > > each of WATCH_TASK_INIT, WATCH_TASK_EXEC, WATCH_TASK_UID, WATCH_TASK_GID,
> > > WATCH_TASK_EXIT. That would reduce the number of elements which need to be
> > > traversed at each event and would eliminate the need for demultiplexing at
> > > each handler.
> >
> > It's a good idea, and should have the advantages you cited. My only
> > concern is that each task watcher would have to (un)register multiple
> > notifier blocks. I expect that in most cases there would only be two.
>
> OK.
>
> > Also, if we apply this to per-task notifiers it would mean that we'd
> > have a 6 raw notifier heads per-task.
>
> hm, that's potentially a problem.
>
> It's a lock and a pointer. 72 bytes in the task_struct. I guess we can
> live with that.
Happily the per-task chains are raw so each should be just a pointer
making the total 24 or 48 bytes (on 32 or 64-bit platforms
respectively).
> An alternatve would be to dynamically allocate it, but that'll hurt code
> which uses the feature, and will be fiddly.
>
> Perhaps six struct notifier_block *'s, which share a lock? Dunno.
>
> > Would you like me to redo the patches as multiple chains?
>
> Well, how about you see how it looks, decide whether this is worth
> pursuing.
OK. Should be interesing.
> It's hard to predict the eventual typical length of these chains.
That's understandable.
> > Alternately,
> > I could produce patches that apply on top of the current set.
>
> It depends on how many of the existing patches are affected. If it's just
> one or two then an increment would be fine. If it's everything then a new
> patchset I guess.
It would affect most of them -- I'd need to change the bits that
register a notifier block. So I'll make a separate series.
Cheers,
-Matt Helsley
next prev parent reply other threads:[~2006-06-21 9:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-13 23:52 [PATCH 00/11] Task watchers: Introduction Matt Helsley
2006-06-19 10:24 ` Andrew Morton
2006-06-21 8:35 ` Matt Helsley
2006-06-21 9:07 ` Andrew Morton
2006-06-21 9:13 ` Matt Helsley [this message]
2006-06-21 10:40 ` [Lse-tech] " Peter Williams
2006-06-21 21:32 ` Matt Helsley
2006-06-21 5:41 ` Peter Williams
2006-06-21 7:51 ` Matt Helsley
2006-06-21 11:34 ` Peter Williams
2006-06-21 11:41 ` Peter Williams
2006-06-21 21:29 ` Matt Helsley
2006-06-21 23:04 ` Peter Williams
2006-06-22 0:32 ` Matt Helsley
2006-06-22 1:11 ` Peter Williams
2006-06-22 3:46 ` Matt Helsley
2006-06-22 4:26 ` Peter Williams
2006-06-22 5:37 ` [Lse-tech] " Matt Helsley
2006-06-22 6:29 ` Peter Williams
2006-06-22 19:53 ` Chandra Seetharaman
2006-06-22 22:46 ` Peter Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1150881185.21787.980.camel@stark \
--to=matthltc@us.ibm.com \
--cc=akpm@osdl.org \
--cc=balbir@in.ibm.com \
--cc=jes@sgi.com \
--cc=jtk@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=nagar@watson.ibm.com \
--cc=sekharan@us.ibm.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox