qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Emanuele Giuseppe Esposito" <eesposit@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	qemu-block@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
	"John Snow" <jsnow@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, "Hanna Reitz" <hreitz@redhat.com>,
	"Fam Zheng" <fam@euphon.net>, "Eric Blake" <eblake@redhat.com>
Subject: Re: [RFC PATCH 0/4] block layer: split block APIs in graph and I/O
Date: Wed, 15 Sep 2021 15:43:35 +0100	[thread overview]
Message-ID: <YUIGlyfL+SleHCAc@stefanha-x1.localdomain> (raw)
In-Reply-To: <916c8456-9433-42a0-df2d-3e62ced283fd@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]

On Wed, Sep 15, 2021 at 02:11:41PM +0200, Paolo Bonzini wrote:
> On 13/09/21 15:10, Stefan Hajnoczi wrote:
> > On Wed, Sep 08, 2021 at 09:10:17AM -0400, Emanuele Giuseppe Esposito wrote:
> > > Currently, block layer APIs like block-backend.h contain a mix of
> > > functions that are either running in the main loop and under the
> > > BQL, or are thread-safe functions and run in iothreads performing I/O.
> > > The functions running under BQL also take care of modifying the
> > > block graph, by using drain and/or aio_context_acquire/release.
> > > This makes it very confusing to understand where each function
> > > runs, and what assumptions it provided with regards to thread
> > > safety.
> > > 
> > > We call the functions running under BQL "graph API", and
> > > distinguish them from the thread-safe "I/O API".
> > 
> > Maybe "BQL" is clearer than "graph" because not all functions classified
> > as "graph" need to traverse/modify the graph.
> 
> Bikeshedding, I like it! :)
> 
> ... on the other hand, qemu-storage-daemon does not have a BQL (see patch
> 1); "graph API" functions run from the main (monitor) thread.
> 
> The characteristic of the "graph API" is that they affect global state, so
> another possibility could be "global state API".  But is there any global
> state apart from the BlockDriverState graph and the associated
> BlockBackends?

I would be happy with that name too.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-09-15 14:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 13:10 [RFC PATCH 0/4] block layer: split block APIs in graph and I/O Emanuele Giuseppe Esposito
2021-09-08 13:10 ` [RFC PATCH 1/4] main-loop.h: introduce qemu_in_main_thread() Emanuele Giuseppe Esposito
2021-09-13 13:15   ` Stefan Hajnoczi
2021-09-08 13:10 ` [RFC PATCH 2/4] migration: block-dirty-bitmap: add missing qemu_mutex_lock_iothread Emanuele Giuseppe Esposito
2021-09-13 13:19   ` Stefan Hajnoczi
2021-09-08 13:10 ` [RFC PATCH 3/4] include/sysemu/block-backend: split header into I/O and graph API Emanuele Giuseppe Esposito
2021-09-13 13:27   ` Stefan Hajnoczi
2021-09-15 12:14     ` Paolo Bonzini
2021-09-15 14:38       ` Stefan Hajnoczi
2021-09-13 13:41   ` Stefan Hajnoczi
2021-09-08 13:10 ` [RFC PATCH 4/4] block/block-backend.c: assertions for block-backend Emanuele Giuseppe Esposito
2021-09-13 13:38   ` Stefan Hajnoczi
2021-09-13 13:10 ` [RFC PATCH 0/4] block layer: split block APIs in graph and I/O Stefan Hajnoczi
2021-09-15 12:11   ` Paolo Bonzini
2021-09-15 14:43     ` Stefan Hajnoczi [this message]
2021-09-16 14:03       ` Emanuele Giuseppe Esposito
2021-09-16 19:49         ` Paolo Bonzini
2021-09-13 13:39 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YUIGlyfL+SleHCAc@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eesposit@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).