LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Jan Beulich <jbeulich@novell.com>
Cc: Paul Jackson <pj@sgi.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] add task handling notifier: base definitions
Date: Wed, 23 Jan 2008 11:11:25 -0800	[thread overview]
Message-ID: <1201115485.5443.41.camel@localhost.localdomain> (raw)
In-Reply-To: <4784A601.76E4.0078.0@novell.com>


On Wed, 2008-01-09 at 09:46 +0000, Jan Beulich wrote:
> >> +BLOCKING_NOTIFIER_HEAD(task_notifier_list);
> >> +EXPORT_SYMBOL_GPL(task_notifier_list);
> >> +ATOMIC_NOTIFIER_HEAD(atomic_task_notifier_list);
> >> +EXPORT_SYMBOL_GPL(atomic_task_notifier_list);
> >> +
> >
> >When these global notifier lists were proposed years ago folks at SGI
> >loudly objected with concerns over anticipated cache line bouncing on
> >512+ cpu machines. Is that no longer a concern?
> 
> I can't see an alternative, since the serialization is unavoidable.

There are definitely alternatives. Naturally they are all much more
complex than using a single notifier chain. You could do per-cpu chains
for example (ugly, I know..).

> >> @@ -121,6 +127,9 @@ void __put_task_struct(struct task_struc
> >>  	WARN_ON(atomic_read(&tsk->usage));
> >>  	WARN_ON(tsk == current);
> >> 
> >> +	atomic_notifier_call_chain(&atomic_task_notifier_list,
> >> +				   TASK_DELETE, tsk);
> >> +
> >>  	security_task_free(tsk);
> >>  	free_uid(tsk->user);
> >>  	put_group_info(tsk->group_info);
> >
> >Would the atomic notifier call chain be necessary if you hooked into an
> >earlier section of do_exit() instead?
> 
> I'm afraid it is, as I was told that sleeping in the do_exit() path is not
> generally possible.
> 
> Jan

Odd. Last I checked I thought I saw a bunch of calls in do_exit() that
could sleep. Only in certain sections and at the end did it appear to
prevent sleeping.

Sorry for the late reply.

Cheers,
	-Matt Helsley


      reply	other threads:[~2008-01-23 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20 13:12 [PATCH 1/4] add task handling notifier: base definitions Jan Beulich
2007-12-21 23:32 ` Andi Kleen
2008-01-09  4:28 ` Matthew Helsley
2008-01-09  9:46   ` Jan Beulich
2008-01-23 19:11     ` Matt Helsley [this message]

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=1201115485.5443.41.camel@localhost.localdomain \
    --to=matthltc@us.ibm.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.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;
as well as URLs for NNTP newsgroup(s).