Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

Sasha Levin
2011-05-30T09:34:59Z

On Mon, 2011-05-30 at 12:29 +0300, Pekka Enberg wrote:
> On Mon, May 30, 2011 at 11:43 AM, Ingo Molnar <mingo@elte.hu> wrote:
> > Testing idea: for example 'make test locking' could do the bzImage
> > test-bootup, with rwlocks built instead of the brlocksj?
> >
> > Pekka might have more ideas about how a good locking test-suite
> > should be done, as JATO has one, right?
>
> The current users of brlocks won't actually cause the guest to be
> paused under load. That's the part I worry about breaking. So again,
> the test case can be a simple as firing up 100-1000 threads where most
> of them are taking the read lock but few of them racing to take the
> write lock.

It would mean we need that many VCPUs: current br_read_lock() doesn't
really do anything, which means that running these tests with dummy
threads won't work.

> It's usually pretty easy to make buggy suspend/locking implementation
> deadlock when run with more than one physical cores.
>
> Pekka

--

Sasha.