From: "Ahmed S. Darwish" <darwish.07@gmail.com> To: "Christoph Hellwig" <hch@infradead.org> Cc: "Jonathan Corbet" <corbet@lwn.net>, linux-kernel@vger.kernel.org, "Casey Schaufler" <casey@schaufler-ca.com> Subject: Re: [PATCH] de-semaphorize smackfs Date: Tue, 18 Mar 2008 14:01:27 +0200 Message-ID: <1865922a0803180501g1f3b270bm7034fc0fc826a108@mail.gmail.com> (raw) In-Reply-To: <20080318073503.GA25958@infradead.org> Hi!, On Tue, Mar 18, 2008 at 9:35 AM, Christoph Hellwig <hch@infradead.org> wrote: > On Mon, Mar 17, 2008 at 05:14:40PM -0600, Jonathan Corbet wrote: > > While looking at the generic semaphore patch, I came to wonder what the > > remaining semaphore users in the kernel were actually doing. After a > > quick grep for down_interruptible(), smackfs remained at the bottom of > > my screen. It seems like a straightforward mutex case - low-hanging > > fruit. So here's a conversion patch; compile-tested only, but what > > could go wrong? > I have a feeling that a very nice LWN article is under the way :). > > The lock is kept while returning to userspace and could potentially > be release by another process. This is not allowed for mutexes. > Yes, this was an artifact of an old design where different processes write _sessions_ were not allowed to interleave, thus locking them in the very beginning (open). Since now those sessions can be interleaved safely, I'll modify this issue today to move the locking to each write() call instead. Thanks Jonathan/Cristoph -- Ahmed S. Darwish Homepage: http://darwish.07.googlepages.com Blog: http://darwish-07.blogspot.com
next prev parent reply index Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-03-17 23:14 Jonathan Corbet 2008-03-18 7:35 ` Christoph Hellwig 2008-03-18 12:01 ` Ahmed S. Darwish [this message] 2008-03-18 15:41 ` Daniel Walker
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=1865922a0803180501g1f3b270bm7034fc0fc826a108@mail.gmail.com \ --to=darwish.07@gmail.com \ --cc=casey@schaufler-ca.com \ --cc=corbet@lwn.net \ --cc=hch@infradead.org \ --cc=linux-kernel@vger.kernel.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
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lkml.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lkml.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lkml.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lkml.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lkml.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lkml.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lkml.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lkml.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lkml.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lkml.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lkml.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git