All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com,
	Bryan Rosenburg <rosnbrg@us.ibm.com>,
	Michael Hohnbaum <hohnbaum@us.ibm.com>,
	Orran Krieger <okrieg@us.ibm.com>, Ryan Harper <ryanh@us.ibm.com>
Subject: Re: [PATCH] Yield to VCPU hcall, spinlock yielding
Date: Fri, 3 Jun 2005 15:59:06 -0500	[thread overview]
Message-ID: <20050603205905.GF14871@us.ibm.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D282064@liverpoolst.ad.cl.cam.ac.uk>

* Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> [2005-06-03 15:41]:
> > I've not recieved any feedback on this.  Following this patch 
> > up with one that applies against current.  Builds, but 
> > haven't tested it since current SMP domains don't run.  
> 
> Steven Smith has been experimenting with and benchmarking a number of
> different variants of this approach, testing a range of different
> preemption mitigation and avoidance techniques. I'm sure we'll hear more
> next week...

Great.  I'm looking forward to seeing how this turns out.

> My gut feeling is that we can get away with something simpler than the
> confer technique as we only need it as a hint. Anyhow, lets see.
> 
> Have you any suggestions for metrics for comparing the schemes? lmbench
> is quite good for assessing the no contenion case. Perhaps doing a
> kernel build on a guest with VCPUs > phy CPUs is a reasonable way of
> assesing the benefit.

We have currently been using a lock-intensive program, [1]pft as a
benchmark.  I patched in lockmeter to measure the 'lockiness' of various
benchmarks, and even with 8 VCPUS on backed on a single cpu doesn't
generate a large number of lock contentions.  pft is far more lock
intensive.

However, one of our concerns with confer/directed yielding is that the
lock holder vcpu doesn't know that it was given a time-slice and that
it should voluntarily yield giving other vcpus get a chance at the lock.
With out such a mechanism, one can imagine that the lock holder would
continue on and possibly grab the lock yet again before being preempted
to which another vcpu will then yield, etc.  We could add something
in the vcpu_info array indicating that it was given a slice and in
_raw_spin_unlock() check and call do_yield().  These spinlock changes
certainly affect the speed of the spinlocks in Linux which is one of the
reasons we wanted to avoid directed yielding or any other  mechanism
that required spinlock accounting.

I don't know if you had a chance to see my status on the [2]preemption
notification from about a month ago.  I'm going to bring that patch up
to current and re-run the tests to see where things are again.  Please
take a look at the original results.


1. http://k42.ozlabs.org/wikiattach/PftPerformanceK42/attachments/pft.c.txt
2. http://lists.xensource.com/archives/html/xen-devel/2005-05/msg00139.html

Thanks,
Ryan

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@us.ibm.com

  reply	other threads:[~2005-06-03 20:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-03 20:41 [PATCH] Yield to VCPU hcall, spinlock yielding Ian Pratt
2005-06-03 20:59 ` Ryan Harper [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-08 21:29 Ian Pratt
2005-06-09 12:37 ` Bryan S Rosenburg
2005-06-09 18:13 ` Orran Y Krieger
2005-06-09 18:59   ` Andrew Theurer
2005-06-09 19:49     ` Orran Y Krieger
2005-06-08 18:25 Ian Pratt
2005-06-08 18:40 ` Bryan S Rosenburg
2005-06-08 19:11   ` Andrew Theurer
2005-06-08 20:49     ` Bryan S Rosenburg
2005-06-08 19:17   ` Ryan Harper
2005-06-07 10:38 Ian Pratt
2005-06-08 15:19 ` Bryan S Rosenburg
2005-06-09 12:54 ` Orran Y Krieger
2005-06-03 22:06 Ian Pratt
2005-06-03 22:52 ` Ryan Harper
2005-06-04  6:55 ` Keir Fraser
2005-06-03 21:17 Ian Pratt
2005-06-03 21:48 ` Ryan Harper
2005-06-06 13:14 ` Orran Y Krieger
2005-05-20 16:54 [PATCH] xen, xen-sparse: modify spinlocks to use directed yield Ryan Harper
2005-06-03 19:40 ` [PATCH] Yield to VCPU hcall, spinlock yielding Ryan Harper

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=20050603205905.GF14871@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=hohnbaum@us.ibm.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=okrieg@us.ibm.com \
    --cc=rosnbrg@us.ibm.com \
    --cc=xen-devel@lists.xensource.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 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.