mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: Simon Derr <Simon.Derr@bull.net>
Cc: Paul Jackson <pj@sgi.com>, Andrew Morton <akpm@osdl.org>,
	Dinakar Guniguntala <dino@in.ibm.com>,
	Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.12-rc4] cpuset exit NULL dereference fix
Date: Thu, 26 May 2005 07:08:59 -0500	[thread overview]
Message-ID: <20050526120859.GD29852@lnx-holt.americas.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0505261050480.11050@openx3.frec.bull.fr>

On Thu, May 26, 2005 at 11:00:10AM +0200, Simon Derr wrote:
> 
> I'm a bit concerned about this. Since there might well be 
> 'notify_on_release' cpusets all over the system, and that there is only 
> one cpuset_sem semaphore, I feel like this 'scaling problem' still exists 
> even with:
> 
> if (notify_on_release(cs)) {
> 	down(&cpuset_sem);
> 	...
> 
> Maybe adding more per-cpuset data such as a per-cpuset removal_sem might 
> be worth it ?

Why not change the atomic into a lock and a refcount.  Grab the lock before
each increment/decrement of the refcount and only continue with the removal
code when the refcount reaches 0.  For a normal cpuset, the refcount could
be biased to 1.  Then child cpusets are created, they could increment their
parent cpuset's refcount.  When the notify_on_release flag used to be set,
we decrement the refcount by one.  Whenever the refcount reaches 0, we
automatically remove the cpuset.  Seems really clear, but would require
touching a larger chunk of the code.

Robin

  reply	other threads:[~2005-05-26 12:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-26  8:25 Paul Jackson
2005-05-26  9:00 ` Simon Derr
2005-05-26 12:08   ` Robin Holt [this message]
2005-05-26 15:44     ` Linus Torvalds
2005-05-26 18:46       ` Paul Jackson
2005-05-26 20:46     ` Paul Jackson
2005-05-26 13:54   ` Dinakar Guniguntala
2005-05-26 20:07   ` Paul Jackson
2005-05-27  0:24     ` Paul Jackson
2005-05-26 23:40   ` Paul Jackson
2005-05-27  8:07     ` Simon Derr
2005-05-27  8:44       ` Paul Jackson

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=20050526120859.GD29852@lnx-holt.americas.sgi.com \
    --to=holt@sgi.com \
    --cc=Simon.Derr@bull.net \
    --cc=akpm@osdl.org \
    --cc=dino@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®