All of lore.kernel.org
 help / color / mirror / Atom feed
* lock contention measuring code?
@ 2009-04-07 15:56 Dan Magenheimer
  2009-04-07 17:11 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Magenheimer @ 2009-04-07 15:56 UTC (permalink / raw)
  To: Xen-Devel (E-mail)

Do I remember that there was a patch for the spinlock
code to allow measuring lock contention?  Maybe from
Jan?  If so, where might I find it?

Thanks,
Dan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lock contention measuring code?
  2009-04-07 15:56 lock contention measuring code? Dan Magenheimer
@ 2009-04-07 17:11 ` Keir Fraser
  2009-04-07 18:41   ` Dan Magenheimer
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2009-04-07 17:11 UTC (permalink / raw)
  To: Dan Magenheimer, Xen-Devel (E-mail)

I don't remember such a patch. Depending on what stats you want, it probably
wouldn't be hard to knock something up?

 -- Keir

On 07/04/2009 16:56, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:

> Do I remember that there was a patch for the spinlock
> code to allow measuring lock contention?  Maybe from
> Jan?  If so, where might I find it?
> 
> Thanks,
> Dan
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: lock contention measuring code?
  2009-04-07 17:11 ` Keir Fraser
@ 2009-04-07 18:41   ` Dan Magenheimer
  2009-04-07 21:35     ` Keir Fraser
  2009-04-08  0:25     ` Jeremy Fitzhardinge
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Magenheimer @ 2009-04-07 18:41 UTC (permalink / raw)
  To: Keir Fraser, Xen-Devel (E-mail)

> I don't remember such a patch.

Hmmm... maybe it was a patch in xenlinux?

> probably wouldn't be hard to knock something up?

Maybe if I were an x86 assembly guru ;-)

> Depending on what stats you want

Maybe incrementing a (64-bit) counter, some debug
key to print out all counters, and some way to
register a lock to put it in the debug-key list?
Maybe enable this code by default whenever debug
is enabled (but it might be useful data in the
wild too).

> -----Original Message-----
> From: Keir Fraser [mailto:keir.fraser@eu.citrix.com]
> Sent: Tuesday, April 07, 2009 11:11 AM
> To: Dan Magenheimer; Xen-Devel (E-mail)
> Subject: Re: [Xen-devel] lock contention measuring code?
> 
> 
> I don't remember such a patch. Depending on what stats you 
> want, it probably
> wouldn't be hard to knock something up?
> 
>  -- Keir
> 
> On 07/04/2009 16:56, "Dan Magenheimer" 
> <dan.magenheimer@oracle.com> wrote:
> 
> > Do I remember that there was a patch for the spinlock
> > code to allow measuring lock contention?  Maybe from
> > Jan?  If so, where might I find it?
> > 
> > Thanks,
> > Dan
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> 
> 
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lock contention measuring code?
  2009-04-07 18:41   ` Dan Magenheimer
@ 2009-04-07 21:35     ` Keir Fraser
  2009-04-08  0:25     ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2009-04-07 21:35 UTC (permalink / raw)
  To: Dan Magenheimer, Xen-Devel (E-mail)

On 07/04/2009 19:41, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:

>> I don't remember such a patch.
> 
> Hmmm... maybe it was a patch in xenlinux?
> 
>> probably wouldn't be hard to knock something up?
> 
> Maybe if I were an x86 assembly guru ;-)

It doesn't need to be done in assembly code. The spinlock C functions are
all in C file common/spinlock.c and all the try-and-spin logic is
implemented in C now. Only try-to-take-lock and unlock are in asm.

 -- Keir

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lock contention measuring code?
  2009-04-07 18:41   ` Dan Magenheimer
  2009-04-07 21:35     ` Keir Fraser
@ 2009-04-08  0:25     ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2009-04-08  0:25 UTC (permalink / raw)
  To: Dan Magenheimer; +Cc: Xen-Devel (E-mail), Keir Fraser

Dan Magenheimer wrote:
>> I don't remember such a patch.
>>     
>
> Hmmm... maybe it was a patch in xenlinux?
>   

Aside from all the normal tools in mainline (which are extensive), the 
Xen PV spinlock code is also well instrumented.

    J

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-08  0:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07 15:56 lock contention measuring code? Dan Magenheimer
2009-04-07 17:11 ` Keir Fraser
2009-04-07 18:41   ` Dan Magenheimer
2009-04-07 21:35     ` Keir Fraser
2009-04-08  0:25     ` Jeremy Fitzhardinge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.