qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 0/3] move global bdrv_states out of block.c


From: Wenchao Xia
Subject: Re: [Qemu-devel] [RFC PATCH 0/3] move global bdrv_states out of block.c
Date: Fri, 20 Sep 2013 14:24:44 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 09/18/2013 10:03 PM, Stefan Hajnoczi wrote:
On Tue, Aug 27, 2013 at 03:49:22PM +0800, Wenchao Xia wrote:
In order to support multiple caller from different thread, global
inside block layer should be carefully treated. bdrv_states represent
a group of bds* which is now used by qemu, so it is a user concept which
should be managed by user. This series tries to move it out, so later
different thread can feed the API with its own bds* group.

This is a RFC series which does not completely convert the API, the missing
part is adding parameter *l in all API which uses bdrv_states, then move
bdrv_states to caller. About 10 functions need to be converted, so hope to
get comments before that, to see if this is the right direction.
The global bdrv_states list needs to stay, I don't think we should try
to remove it.

The list is used to drain and flush all devices so that we can safely
shut down or live migrate.  If we give each thread their own list then
there's no way to globally drain and flush.

The invalidate function that you modified is another example: we *must*
invalidate all BDS instances across all threads.  Failure to invalidate
all instances could mean inconsistencies or data loss.

So in the end I think we need to keep bdrv_states.
  I am OK to keep bdrv_states now, after the talk about AioContext
in IRC. I think it is related with thread model, and, If we find drain a subset
of BDS is needed, such as per AioContext drain, it is no late to change
at that time, after the programming model is built. Looking forward to your
next series for AioContext.


Stefan





reply via email to

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