From: john stultz <johnstul@us.ibm.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fast reader/writer lock for gettimeofday 2.5.30
Date: 12 Aug 2002 18:02:53 -0700 [thread overview]
Message-ID: <1029200573.1058.73.camel@cog> (raw)
In-Reply-To: <200208130054.g7D0s1N09420@eng2.beaverton.ibm.com>
> The following patch generalizes Andrea's trick of using sequence numbers
> to create a reader region/writer lock. It against the 2.5.30 kernel.
Ah! Very nice! I have hit the xtime_lock starvation issue, and was
looking to implement something like vxtime_lock to help it (I'm also
hoping to port the vsyscall gtod to i386 as well).
> A new composite primitive 'frlock' is defined in include/linux/frlock.h
> and used to replace the rwlock xtime_lock enforce consistent access to
> the clock time variables.
My only comment is that while you have wrapped it up nicely, I'm not
sure this locking algorithm is worth generalizing. While the vxtime_lock
implementation for x86-64 might take a bit to grasp, the macros are very
short, fairly straight forward, and difficult to confuse with a standard
spin/rw_lock. Additionally, the extra complexity of managing the
sequence number isn't really being hidden (and really, I'm not sure how
one would hide it).
Maybe I'm just partial to the way Andrea did it (especially considering
I'd like to use the lock from userspace as well), but regardless this
style of rwlock is definitely needed for the xtime_lock. Very cool!
thanks
-john
next parent reply other threads:[~2002-08-13 1:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200208130054.g7D0s1N09420@eng2.beaverton.ibm.com>
2002-08-13 1:02 ` john stultz [this message]
2002-08-12 23:39 [PATCH] fast reader/writer lock for gettimeofday 2.5.30 Stephen Hemminger
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=1029200573.1058.73.camel@cog \
--to=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@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