From: Paul Jackson <pj@sgi.com>
To: Paul Menage <menage@google.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
menage@google.com
Subject: Re: [PATCH] Reduce cpuset.c write_lock_irq() to read_lock()
Date: Wed, 23 May 2007 18:35:52 -0700 [thread overview]
Message-ID: <20070523183552.e0ae95db.pj@sgi.com> (raw)
In-Reply-To: <20070524012316.98BFB3D65BA@localhost>
Paul M wrote:
> cpuset.c:update_nodemask() uses a write_lock_irq() on tasklist_lock to
> block concurrent forks; a read_lock() suffices and is less intrusive.
Seems reasonable to me - thanks.
> - write_lock_irq(&tasklist_lock); /* block fork */
> + read_lock(&tasklist_lock); /* block fork */
> if (atomic_read(&cs->count) <= ntasks)
> break; /* got enough */
> - write_unlock_irq(&tasklist_lock); /* try again */
> + read_unlock(&tasklist_lock); /* try again */
Too bad you didn't keep the nicely aligned comments aligned ;).
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
prev parent reply other threads:[~2007-05-24 1:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-24 1:23 [PATCH] Reduce cpuset.c write_lock_irq() to read_lock() Paul Menage
2007-05-24 1:35 ` Paul Jackson [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=20070523183552.e0ae95db.pj@sgi.com \
--to=pj@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.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