From: Tejun Heo <htejun@gmail.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: ntl@pobox.com, viro@ftp.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] big reader semaphore take#2
Date: Sat, 05 Nov 2005 10:18:17 +0900 [thread overview]
Message-ID: <436C0859.6050806@gmail.com> (raw)
In-Reply-To: <436BF961.9070402@yahoo.com.au>
Nick Piggin wrote:
> Tejun Heo wrote:
>
>> Tejun Heo wrote:
>>
>>> Hello guys,
>>>
>>> This is the second take of brsem (big reader semaphore).
>>>
>>> Nick, unfortunately, simple array of rwsem's does not work as lock
>>> holders are not pinned down to cpus and may release locks on other
>>> cpus.
>>>
>
> [...]
>
>>
>> (Nick, what do you think about the new implementation?)
>>
>
> As I said, I think I'd prefer to see an implementation that returns
> a token from down_read to be used in up_read (ie. the slot # of the
> counter which has been downed).
>
Oh... I read your response but thought that was only response to 'that
wouldn't work' part.
> This obviously no longer makes it a drop in replacement for an rwsem.
> But could such a beast ever be considered so? Would that make your
> VFS patches really ugly?
I think Al Viro is on that now.
> The upshot of that would be that you could build the whole thing
> from rwsem infrastructure and have basically zero other locking
> mechanisms or complexity that you don't want in a synchronisation
> primitive.
>
To certain extent, I do agree with you - it's safer/simpler..., but on
the other hand, new brsem isn't that more complex and would perform
almost identically without extra semantical baggage. So, I thought it
might be worth a bit more effort.
Hmm... So, array of rwsem's, it should be.
Thanks.
--
tejun
next prev parent reply other threads:[~2005-11-05 1:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 10:44 [PATCH RFC] big reader semaphore take#2 Tejun Heo
2005-10-28 11:06 ` Nick Piggin
2005-11-04 15:09 ` Tejun Heo
2005-11-05 0:14 ` Nick Piggin
2005-11-05 1:18 ` Tejun Heo [this message]
2005-11-05 1:29 ` Nick Piggin
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=436C0859.6050806@gmail.com \
--to=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=ntl@pobox.com \
--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