From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Convert namespace_sem to a mutex
Date: Thu, 17 May 2007 12:47:20 +0530 [thread overview]
Message-ID: <20070517071720.GC4462@in.ibm.com> (raw)
In-Reply-To: <20070517050046.GM4095@ftp.linux.org.uk>
On Thu, May 17, 2007 at 06:00:46AM +0100, Al Viro wrote:
> On Thu, May 17, 2007 at 10:20:41AM +0530, Bharata B Rao wrote:
> > From: Bharata B Rao <bharata@linux.vnet.ibm.com>
> >
> > namespace_sem is a rwsem. It is acquired as read sem at only one place(used
> > by /proc/mounts, /proc/<pid>/mounts and /proc/<pid>/mountstats). In all other
> > cases it is acquired as a write sem. So, as there is not more than one reader
> > for this sem, this can be a generic sem (and not rwsem) and if so it can be
> > a mutex.
>
> Except that read accesses outnumber write ones by far and we have no reason
> for serializing them against each other. NAK.
Ok, I wasn't aware that this rwsem had many concurrent readers. From whatever
little I could see (during system boot and during kernel compilation with
make -j), the number of concurrent readers very rarely touched 3 and was 1
mostly. May be there are other concurrent readers of this sem. Any idea
from where they could be coming from ?
Regards,
Bharata.
next prev parent reply other threads:[~2007-05-17 7:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 4:50 Convert namespace_sem to a mutex Bharata B Rao
2007-05-17 5:00 ` Satyam Sharma
2007-05-17 5:00 ` Al Viro
2007-05-17 7:17 ` Bharata B Rao [this message]
2007-05-17 7:22 ` Al Viro
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=20070517071720.GC4462@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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