lkml.org 
[lkml]   [2008]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2.6.28-rc4]lock_stat: Add "con-hungry" to show that how many person-time fight for the ticket spinlock
From
Date
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()?



\
 
 \ /
  Last update: 2008-11-23 02:43    [W:0.076 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site