[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v4 15/15] slirp: use lock to protect the sli
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH v4 15/15] slirp: use lock to protect the slirp_instances |
Date: |
Thu, 18 Apr 2013 10:16:27 -0400 (EDT) |
> grep'ing for slirp_instances points to more spots that work with that
> list (QTAILQ_FOREACH, QTAILQ_EMPTY, ...). So the same question here:
> What are the usage rules? When do I _not_ need it when touching the list
> of instances, and why?
>
> Well, I started reading at the top, but there are more lock-adding
> patches in this series. And the more locks we have, the higher the
> probability of ABBA gets. Therefore, please document from the beginning
> the lock order rules that shall prevent it (which may also be "never
> take other locks while holding this one" or "never hold other locks when
> taking this one").
Yeah, the only sane ordering rules should be "hold nothing or just
the BQL when taking this one". Everything else needs a very good
justification...
Paolo
- [Qemu-devel] [RFC PATCH v4 12/15] slirp: make timeout local, (continued)
[Qemu-devel] [RFC PATCH v4 15/15] slirp: use lock to protect the slirp_instances, Liu Ping Fan, 2013/04/17