Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Xen balloon driver rewrite



On Thu, Apr 07, 2011 at 04:33:42PM +0100, Jean-Yves Migeon wrote:
> On Thu, 7 Apr 2011 20:22:58 +0530, "Cherry G. Mathew"
> <cherry.g.mathew%gmail.com@localhost> wrote:
> >>If you ask for inflate then a deflate of 256MiB, or the other
> >>way around,
> >>you will effectively spawn two workers. Both will work towards
> >>the same
> >>target though, and in this case, will rapidly exit.
> >
> >I'm curious about the effect of lock contention in the case of many
> >outstanding threads reading/writing to the same shared variable. Also
> >the load on the scheduler / thread manager for multiple outstanding
> >requests.
> 
> More than lock contention, it's the concurrent access to
> balloon_inflate and balloon_deflate that is problematic :)
> 
> Although this is a rare situation, it can happen: one worker is
> currently executing a balloon_inflate, while another is created to
> handle a deflate. Ouch. Linux fixes that by having a "biglock" mutex
> wrapping the balloon handler loop, but I'd like to avoid going down
> that route.

Well, workqueue already does it for you: a workqueue can have only one worker
at a time.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index