qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] net: introduce lock to protect NetClientSta


From: liu ping fan
Subject: Re: [Qemu-devel] [PATCH 2/3] net: introduce lock to protect NetClientState's send_queue
Date: Tue, 5 Mar 2013 10:45:08 +0800

On Mon, Mar 4, 2013 at 11:04 PM, Paolo Bonzini <address@hidden> wrote:
> Il 04/03/2013 15:49, Stefan Hajnoczi ha scritto:
>> > Use nc->transfer_lock to protect the nc->peer->send_queue. All of the
>>
>> Please use consistent names: the lock protects ->send_queue so it's best
>> called send_queue_lock or send_lock.
>
> In fact, it's a bit strange to use nc->something_lock to lock something
> in nc->peer.  Please add the lock to NetQueue and include/net/queue.h.
>
The lock also servers as exclusion between NetClientState's sender and
remover.  So if we apply lock on NetQueue, it can not achieve the
goal.

> nc->peer shouldn't need a lock.  It is immutable, isn't it?
>
The sender should run against hot-uplug.

Thanks and regards,
Pingfan
> Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]