|
From: | Emanuele Giuseppe Esposito |
Subject: | Re: [RFC PATCH 4/6] job.h: categorize job fields |
Date: | Mon, 12 Jul 2021 10:43:36 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 08/07/2021 13:02, Stefan Hajnoczi wrote:
Maybe this is unnecessary, but from what I understand right now when we want to change the AioContext of a child node, we need to acquire its AioContext lock, and then we try to set it. Without AioContext locks, my understanding is that this has to be protected somehow. Therefore I thought of setting this pointer atomically (actual code that does this is in patch 5).On Wed, Jul 07, 2021 at 06:58:11PM +0200, Emanuele Giuseppe Esposito wrote:- /** AioContext to run the job coroutine in */ + /** + * AioContext to run the job coroutine in. + * Atomic. + */ AioContext *aio_context;This isn't accessed using atomic operations, so I'm not sure why it's documented as atomic?
Again same reasoning style applies here: this patch just adds a bounce of comments, but merging it with next one would just make it more unreadable.
Emanuele
[Prev in Thread] | Current Thread | [Next in Thread] |