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

Ingo Molnar
2011-05-29T19:55:03Z

* Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

> And the other reason that you want to mark the readers is for debug
> purposes. Murphy being who he is, you will some day need to check
> for someone calling the "OK to update" function while they are
> acting as a reader.

Correct. In one of the previous mails i suggested a debug mode that
switches it all to pthread rwlocks.

We do not want to lose the identify of what the read paths are: this
could grow into a BKL-alike nasty-to-fix assumption over a couple of
years! Then if someone finds a usecase that intensifies the frequency
of one of the key writepaths, we'll be in trouble ...

Thanks,

Ingo