qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH RFC v2 05/22] block/pcache: add aio requests int


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH RFC v2 05/22] block/pcache: add aio requests into cache
Date: Tue, 6 Sep 2016 19:07:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 06.09.2016 um 18:54 hat Pavel Butsykin geschrieben:
> >>+        *out_node = found;
> >>+        return false;
> >>+    }
> >>+    atomic_add(&s->pcache.curr_size, new_node->cm.nb_sectors);
> >
> >atomic_add() implies that you have concurrent threads. I don't see any.
> >
> Yeah, but what about iothread? Doesn't presence of iothread lead to
> parallel handling of requests in multiple threads?

No, it doesn't. We're running under the AioContext lock.

If we were actually running in parallel threads, your locks might also
be needed, but then they would have to be real thread locks instead of
coroutine locks. But it doesn't happen today, so I think it's best to
ignore.

Kevin



reply via email to

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