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

Pekka Enberg
2011-05-30T09:40:13Z

Hi Sasha,

On Mon, May 30, 2011 at 12:34 PM, Sasha Levin <levinsasha928@gmail.com> wrote:
> 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.

Heh, sure they're doing something - they're burning CPU. You assume
that br_write_unlock() will actually resume all of them but I'd really
like to see a reproducible test case for that. ;-)

Do you think it's a bad idea? I don't quite see why - as I've said
before, this is something we learned the hard way when we implemented
our own locking primitives and stop-the-world for Jato. Those are just
so damn easy to break accidentally so having some safety net is
definitely worth it.

Also, didn't Paul suggest some debugging magic to detect errors?

Pekka