[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] vhost-user spec: Clarify policy on setting log_

From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH] vhost-user spec: Clarify policy on setting log_base
Date: Wed, 29 Nov 2017 10:08:46 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 2017年11月29日 02:06, Michael S. Tsirkin wrote:
On Tue, Nov 28, 2017 at 03:46:44PM +0200, Victor Kaplansky wrote:
From: Victor Kaplansky<address@hidden>

If we allow qemu to change logging area after it was already established,
it may require from the backend to acquire a lock on each access to
the log_base, which has a potential quite a big performance hit.

Thus we would like to clarify in the spec, that qemu is not expected
to resize or remap the logging area, and backend implementations
can safely ignore subsequent requests to log_base modifications.

Signed-off-by: Victor Kaplansky<address@hidden>
Suggested-by: Maxime Coquelin<address@hidden>
I'm not sure we can do this.

Log resizing as a result of memory hotplug might force
log base changes.

Backends need to use something like
rcu to avoid need for locking.

Apropos I wonder whether it's a bug that vhost_dev_start
calls vhost_set_log_base after starting rings.

Same question for the iotlb callback.

At least for kernel vhost-net, it doesn't since the backend won't start to work until SET_BACKEND which is done in vhost_net_start_one() after vhost_dev_start().


reply via email to

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