mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
block: Generalise and optimise COR serialisation
Change the API so that specific requests can be marked serialising. Only these requests are checked for overlaps then. This means that during a Copy on Read operation, not all requests overlapping other requests are serialised any more, but only those that actually overlap with the specific COR request. Also remove COR from function and variable names because this functionality can be useful in other contexts. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net>
This commit is contained in:
parent
ec746e10cb
commit
2dbafdc012
2 changed files with 32 additions and 21 deletions
|
@ -60,6 +60,7 @@ typedef struct BdrvTrackedRequest {
|
|||
int64_t offset;
|
||||
unsigned int bytes;
|
||||
bool is_write;
|
||||
bool serialising;
|
||||
QLIST_ENTRY(BdrvTrackedRequest) list;
|
||||
Coroutine *co; /* owner, used for deadlock detection */
|
||||
CoQueue wait_queue; /* coroutines blocked on this request */
|
||||
|
@ -302,8 +303,8 @@ struct BlockDriverState {
|
|||
/* Callback before write request is processed */
|
||||
NotifierWithReturnList before_write_notifiers;
|
||||
|
||||
/* number of in-flight copy-on-read requests */
|
||||
unsigned int copy_on_read_in_flight;
|
||||
/* number of in-flight serialising requests */
|
||||
unsigned int serialising_in_flight;
|
||||
|
||||
/* I/O throttling */
|
||||
ThrottleState throttle_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue