From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Yang Xi <yangxilkm@gmail.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, chyyuu <chyyuu@gmail.com>
Subject: Re: [PATCH 2.6.28-rc4]lock_stat: Add "con-hungry" to show that how many person-time fight for the ticket spinlock
Date: Sun, 23 Nov 2008 02:40:26 +0100 [thread overview]
Message-ID: <1227404426.7685.19975.camel@twins> (raw)
In-Reply-To: <d36bb30d0811200009j742416a6nbc0519ff8d95970b@mail.gmail.com>
On Thu, 2008-11-20 at 16:09 +0800, Yang Xi wrote:
> > I of course meant folding cpu and isspinlock into a combined bitfield
> > (sorry for not being more clear), thereby saving space, this still takes
> > 2*sizeof(int).
> >
> > We can safely take some bits from the cpu number as there currently are
> > no plans for a 2g cpu machine, right SGI? :-)
> Thanks, ok, 31bits enough for cpu at now stage. 1bit for isticketspinlock.
> Here is the new one. Welcome more comments :).
Looks good, one more question :-)
> --- a/include/linux/spinlock.h
> +++ b/include/linux/spinlock.h
> @@ -127,6 +127,12 @@ do {
> \
> #define spin_is_contended(lock)
> __raw_spin_is_contended(&(lock)->raw_lock)
> #endif
>
> +#ifdef CONFIG_HAVE_TICKET_SPINLOCK
> +#define spin_nr_contended(lock) __ticket_spin_nr_contended(&(lock)->raw_lock)
> +#else
> +#define spin_nr_contended(lock) (0)
> +#endif
> +
Does it make sense to make the alternative case return
spin_is_contended()?
next prev parent reply other threads:[~2008-11-23 1:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 11:00 [PATCH 2.6.28-rc4]lock_stat: Add "con-hungry" to show that how many person-time fight for the ticket spinlock Yang Xi
2008-11-18 16:20 ` Peter Zijlstra
2008-11-19 5:18 ` Yang Xi
2008-11-19 16:39 ` Peter Zijlstra
2008-11-20 8:09 ` Yang Xi
2008-11-23 1:40 ` Peter Zijlstra [this message]
2008-11-23 8:23 ` Yang Xi
2008-12-26 7:24 ` Yang Xi
2008-12-26 8:34 ` Ingo Molnar
2008-12-26 13:13 ` Yang Xi
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=1227404426.7685.19975.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=chyyuu@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yangxilkm@gmail.com \
/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