From: Matt Helsley <matthltc@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Shailabh Nagar <nagar@watson.ibm.com>,
Balbir Singh <balbir@in.ibm.com>
Subject: Re: 2.6.18-rc2-mm1
Date: Fri, 28 Jul 2006 11:49:27 -0700 [thread overview]
Message-ID: <1154112567.21787.2522.camel@stark> (raw)
In-Reply-To: <20060728013442.6fabae54.akpm@osdl.org>
On Fri, 2006-07-28 at 01:34 -0700, Andrew Morton wrote:
> On Fri, 28 Jul 2006 10:17:44 +0200
> "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
>
> > Matt, can you look at this?
> >
> > My hunt file shows me, that this patches are causing oops.
> > GOOD
> > #
> > #
> > task-watchers-task-watchers.patch
> > task-watchers-register-process-events-task-watcher.patch
> > task-watchers-refactor-process-events.patch
> > task-watchers-make-process-events-configurable-as.patch
> > task-watchers-allow-task-watchers-to-block.patch
> > task-watchers-register-audit-task-watcher.patch
> > task-watchers-register-per-task-delay-accounting.patch
> > task-watchers-register-profile-as-a-task-watcher.patch
> > task-watchers-add-support-for-per-task-watchers.patch
> > task-watchers-register-semundo-task-watcher.patch
> > task-watchers-register-per-task-semundo-watcher.patch
> > BAD
>
> Thanks for working that out.
I noticed the delay accounting functions in the stack trace. Perhaps
task-watchers-register-per-task-delay-accounting.patch is causing the
problem. With all of the recent churn in per-task delay accounting I'm
wondering if that patch is still correct. Balbir, Shailabh, what do you
think?
> I've actually been thinking that we shouldn't proceed with those patches.
>
> They're a nice cleanup and make the kernel code _look_ better and I really
> like them because of this. But the cost is potentially significant. We
> replace N direct calls with a walk of a notifier chain, more than N
> indirect calls, demultiplexing at the other end and then a direct call.
> That's a significant amount of additional overhead to make the kernel
> source look nicer.
OK. The multiple notifier chain approach you suggested gets rid of
demultiplexing. We'd replace N direct calls with a walk of a notifier
chain and (more than??) N indirect calls.
An alternative suggested to me by Al Viro is to handle these functions
much like the *_initcall() macros in include/linux/init.h. This replaces
N direct calls with an array walk and N indirect calls. Unfortunately,
this does not work for modules.
> Plus, ugly though it is, you can look at the current code and see what it's
> doing. With a notifier chain you have to grep around the tree and work out
> what might be hooking into the chain, which is harder.
The same is true when using function pointers in other areas of the
kernel. They make the code harder to trace but have advantages you can't
get by simply pasting the function call into the path.
That said, I think walking the code is a bit easier with the multichain
approach. Lastly, at each invocation I could put in a comment explaining
how to find users of the chain.
> Finally, the consolidation into a notifier chain forces all the
> fork/exit/exec hooks into an one-size-fits-all model. What happens if one
> subsystem wants to hook in before exit_mmap() and another one wants to hook
> in after exit_mmap() (for example)?
As I see it there's not much I can do about the one-size-fits-all
model. So I tried to find the one size that fits most.
I think many systems that place calls in these paths aren't as
sensitive to their precise location as you might imagine. Many need to
initialize their per-task data and clean it up. They tend to depend on a
valid task structure and little else. Fewer systems -- profile for
instance -- have very specific requirements for when/where they get
called. Yet even profile can use some of task watchers.
I considered some obvious alternatives but they had worse problems.
Adding more notifications will run into naming problems. Using notifier
block priorities would have similar problems and be even harder to trace
by hand.
For those special systems that don't fit this "size" I think leaving
them in these paths is the best approach.
Cheers,
-Matt Helsley
next prev parent reply other threads:[~2006-07-28 18:53 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-27 8:56 2.6.18-rc2-mm1 Andrew Morton
2006-07-27 10:27 ` [PATCH] Require mmap handler for a.out executables (was Re: 2.6.18-rc2-mm1) Eugene Teo
2006-07-27 11:40 ` [patch -mm] s390: remove s390 touch_nmi_watchdog() define Heiko Carstens
2006-07-27 12:26 ` 2.6.18-rc2-mm1 Frederik Deweerdt
2006-07-27 12:39 ` [patch] fix "efi_init_e820_map undefined" warning Frederik Deweerdt
2006-07-27 13:12 ` Should cpuset ABBA deadlock fix be in 2.6.18-rc2-mmx? Paul Jackson
2006-07-27 18:22 ` Andrew Morton
2006-07-27 19:32 ` Paul Jackson
2006-07-27 13:32 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-27 18:59 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-29 12:15 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-29 12:17 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-28 8:17 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-28 8:34 ` 2.6.18-rc2-mm1 Andrew Morton
2006-07-28 18:49 ` Matt Helsley [this message]
2006-07-28 19:53 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-28 20:39 ` 2.6.18-rc2-mm1 Matt Helsley
2006-07-28 21:34 ` 2.6.18-rc2-mm1 Andrew Morton
2006-07-29 2:04 ` 2.6.18-rc2-mm1 Valdis.Kletnieks
2006-07-29 22:34 ` 2.6.18-rc2-mm1 Shailabh Nagar
2006-07-29 23:38 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-28 17:57 ` 2.6.18-rc2-mm1 Matt Helsley
2006-07-27 14:04 ` 2.6.18-rc2-mm1 Andy Whitcroft
2006-07-27 14:48 ` 2.6.18-rc2-mm1 Andy Whitcroft
2006-07-27 15:37 ` [PATCH] highmem: fixed ip27-memory.c build error Yoichi Yuasa
2006-07-27 18:16 ` [-mm patch] arch/i386/pci/mmconfig.c: fixes Adrian Bunk
2006-07-28 8:09 ` 2.6.18-rc2-mm1 Reuben Farrelly
2006-07-28 8:35 ` [mm-patch] bluetooth: use GFP_ATOMIC in *_sock_create's sk_alloc Frederik Deweerdt
2006-07-28 9:00 ` Marcel Holtmann
2006-07-28 12:36 ` Frederik Deweerdt
2006-07-28 9:17 ` Masatake YAMATO
2006-07-28 12:32 ` Frederik Deweerdt
2006-07-28 13:12 ` Masatake YAMATO
2006-07-28 16:15 ` [01/04 mm-patch, rfc] Add lightweight rwlock (was Re: [mm-patch] bluetooth: use GFP_ATOMIC in *_sock_create's sk_alloc) Frederik Deweerdt
2006-07-28 16:23 ` [02/04 " Frederik Deweerdt
2006-07-28 16:28 ` [03/04 mm-patch, rfc] Add lightweight rwlock to net/dccp/ccid.c " Frederik Deweerdt
2006-07-28 16:33 ` [04/04 mm-patch, rfc] Add lightweight rwlock to net/bluetooth/af_bluetooth.c " Frederik Deweerdt
2006-07-31 7:06 ` [01/04 mm-patch, rfc] Add lightweight rwlock Masatake YAMATO
2006-08-01 9:06 ` Frederik Deweerdt
2006-07-28 8:56 ` 2.6.18-rc2-mm1 Michal Piotrowski
2006-07-28 9:23 ` 2.6.18-rc2-mm1 Andrew Morton
2006-07-28 15:53 ` [PATCH] 2.6.18-rc2-mm1 i386 add_memory_region undefined Valdis.Kletnieks
2006-07-28 18:20 ` 2.6.18-rc2-mm1 - hard lockups on Dell C840 Valdis.Kletnieks
2006-07-28 18:44 ` 2.6.18-rc2-mm1 timer int 0 doesn't work Paul Fulghum
2006-07-28 21:48 ` Andrew Morton
2006-07-28 22:10 ` Paul Fulghum
2006-07-28 23:38 ` Andi Kleen
2006-07-29 0:15 ` Paul Fulghum
2006-07-29 1:16 ` Paul Fulghum
2006-07-29 1:24 ` Andrew Morton
2006-07-29 2:37 ` Paul Fulghum
2006-07-29 2:58 ` Eric W. Biederman
2006-07-29 4:03 ` Ingo Molnar
2006-07-30 23:00 ` Steven Rostedt
2006-07-29 2:36 ` Andi Kleen
2006-07-29 15:33 ` Paul Fulghum
2006-07-29 19:50 ` Eric W. Biederman
2006-07-29 22:05 ` Paul Fulghum
2006-07-31 5:31 ` Andi Kleen
2006-07-31 13:32 ` Paul Fulghum
2006-07-28 19:46 ` Kubuntu's udev broken with 2.6.18-rc2-mm1 Andrew James Wade
2006-07-27 19:56 ` Andrew Morton
2006-07-27 20:12 ` Greg KH
2006-07-28 14:33 ` Andrew James Wade
2006-07-30 14:01 ` Laurent Riffard
2006-07-31 0:03 ` Greg KH
2006-07-31 2:27 ` Andrew James Wade
2006-07-31 3:37 ` Greg KH
2006-07-31 4:22 ` Andrew Morton
2006-07-31 4:35 ` Greg KH
2006-07-31 4:50 ` Andrew Morton
2006-07-31 5:15 ` Greg KH
2006-07-31 6:00 ` Andrew Morton
2006-07-31 7:54 ` bert hubert
2006-07-31 8:30 ` Jesper Juhl
2006-07-31 11:14 ` Alan Cox
2006-07-31 8:10 ` Laurent Riffard
2006-08-01 3:01 ` Andrew James Wade
2006-07-27 21:28 ` Valdis.Kletnieks
2006-07-29 17:48 ` [-mm patch] security/selinux/hooks.c: make 4 functions static Adrian Bunk
2006-07-30 0:37 ` James Morris
2006-07-29 17:58 ` swsusp regression (s2dsk) [Was: 2.6.18-rc2-mm1] Jiri Slaby
2006-07-29 18:59 ` Rafael J. Wysocki
2006-07-29 23:06 ` Jiri Slaby
2006-07-29 23:10 ` Rafael J. Wysocki
2006-07-29 23:59 ` Jiri Slaby
2006-07-30 0:03 ` Jiri Slaby
2006-07-29 23:22 ` Pavel Machek
2006-07-29 23:58 ` Jiri Slaby
2006-07-30 0:06 ` Pavel Machek
2006-07-30 7:31 ` Rafael J. Wysocki
2006-07-30 8:08 ` Jiri Slaby
2006-07-30 9:28 ` Rafael J. Wysocki
2006-07-30 10:54 ` Jiri Slaby
2006-07-30 11:08 ` Pavel Machek
2006-07-30 11:34 ` Rafael J. Wysocki
2006-07-31 13:59 ` [Alsa-devel] " Takashi Iwai
2006-07-31 14:03 ` Pavel Machek
2006-07-30 11:36 ` James Courtier-Dutton
2006-07-30 11:35 ` 2.6.18-rc2-mm1 fails to reboot properly on Dell Latitude CPiA Christian Trefzer
2006-07-31 4:42 ` 2.6.18-rc2-mm1 Reuben Farrelly
2006-07-31 4:57 ` 2.6.18-rc2-mm1 Andrew Morton
2006-07-31 5:25 ` 2.6.18-rc2-mm1 Andi Kleen
2006-08-03 15:59 ` [2.6 patch] DVB_CORE must select I2C Adrian Bunk
2006-08-03 16:10 ` [v4l-dvb-maintainer] " Manu Abraham
2006-08-03 16:30 ` Trent Piepho
2006-08-03 19:13 ` Mauro Carvalho Chehab
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=1154112567.21787.2522.camel@stark \
--to=matthltc@us.ibm.com \
--cc=akpm@osdl.org \
--cc=balbir@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.com \
--cc=nagar@watson.ibm.com \
/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