From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Tejun Heo <htejun@gmail.com>
Cc: zwane@linuxpower.ca, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-2.6 01/04] brsem: implement big reader semaphore
Date: Sun, 25 Sep 2005 19:24:10 +1000 [thread overview]
Message-ID: <43366CBA.5010306@yahoo.com.au> (raw)
In-Reply-To: <433665A4.6010400@gmail.com>
Tejun Heo wrote:
> Other than local_bh_disable/enable(), all brsem read ops do are
>
> 1. accessing sem->idx
> 2. calculate per-cpu rcnt address from sem->idx
> 3. do one branch on the value of per-cpu rcnt
> 4. inc/dec per-cpu rcnt
>
> So, it does access one more cachline and, yeap, there is one branch for
> bh enabling and several more inside local_bh_enable. I'll try to get
> some benchmark numbers for comparison.
>
Well local_bh_disable touches the preempt count too, although we
can probably assume that's hot in cache.
You might also find yours has a bigger icache footprint as well.
> I'm thinking about adding down_read(&xxx->s_umount) to write(2) and
> compare normal rwsem and brsem performance by repeitively writing short
> data into a file on a UP machine. Do you have better ideas?
>
To be honest I'd say that you wouldn't be able to measure it if
you're going through a regular system call path, although such
a measurement certainly won't hurt.
I don't have a better idea though. I don't think a busy loop
microbenchmark is going to be very informative either, it might
actually give a measurable difference but that difference
probably won't be too representitive of real use :\
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2005-09-25 9:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-25 6:43 [PATCH linux-2.6 00/04] brsem: [RFC] big reader semaphore Tejun Heo
2005-09-25 6:43 ` [PATCH linux-2.6 01/04] brsem: implement " Tejun Heo
2005-09-25 7:19 ` Nick Piggin
2005-09-25 8:03 ` Nick Piggin
2005-09-25 8:11 ` Tejun Heo
2005-09-25 8:27 ` Nick Piggin
2005-09-25 8:53 ` Tejun Heo
2005-09-25 9:24 ` Nick Piggin [this message]
2005-09-25 10:05 ` Tejun Heo
2005-09-25 11:22 ` Nick Piggin
2005-09-25 6:43 ` [PATCH linux-2.6 02/04] brsem: convert super_block->s_umount to brsem Tejun Heo
2005-09-25 6:43 ` [PATCH linux-2.6 03/04] brsem: fix ro-remount <-> open race condition Tejun Heo
2005-09-25 6:43 ` [PATCH linux-2.6 04/04] brsem: convert cpucontrol to brsem Tejun Heo
2005-09-25 7:39 ` Nick Piggin
2005-09-25 8:03 ` Tejun Heo
2005-09-25 23:46 ` Nathan Lynch
2005-09-26 1:11 ` Nick Piggin
2005-09-26 4:05 ` Tejun Heo
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=43366CBA.5010306@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zwane@linuxpower.ca \
/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