All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org, den@openvz.org,
	mreitz@redhat.com, el13635@mail.ntua.gr
Subject: Re: [Qemu-devel] [Qemu-block] [RFC] block-backend: fix double inc/dec inflight requests number
Date: Mon, 29 Jan 2018 16:30:17 +0100	[thread overview]
Message-ID: <20180129153017.GH6141@localhost.localdomain> (raw)
In-Reply-To: <20180125113724.GA28396@stefanha-x1.localdomain>

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

Am 25.01.2018 um 12:37 hat Stefan Hajnoczi geschrieben:
> On Mon, Jan 22, 2018 at 05:45:49PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> > Is it a bug or a feature? Why do we call inc/dec twice for read/write?
> > We don't do this for flush and discard..
> 
> It's non-obvious and I asked Paolo the same question previously.
> 
> > -    bdrv_inc_in_flight(bs);
> > -
> >      /* throttling disk I/O */
> >      if (blk->public.throttle_group_member.throttle_state) {
> >          throttle_group_co_io_limits_intercept(&blk->public.throttle_group_member,
> >                  bytes, false);
> >      }
> 
> ^^^ HINT HINT HINT ^^^
> 
> >  
> > -    ret = bdrv_co_preadv(blk->root, offset, bytes, qiov, flags);
> > -    bdrv_dec_in_flight(bs);
> > -    return ret;
> > +    return bdrv_co_preadv(blk->root, offset, bytes, qiov, flags);
> 
> The problem is what happens if the request is throttled?
> 
> Even throttled requests must be counted so that bdrv_drain() and friends
> work.
> 
> It may be possible to eliminate this now that throttling is a BDS node.
> It used to be implemented as a completely separate API outside the BDS
> node graph.  Now there is a throttling node in the graph, so maybe we
> can stop taking the extra reference but some refactoring may be
> necessary.

The patches to use a throttling node even when the legacy options are
used have not been merged yet.

Kevin

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

      reply	other threads:[~2018-01-29 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 14:45 [Qemu-devel] [RFC] block-backend: fix double inc/dec inflight requests number Vladimir Sementsov-Ogievskiy
2018-01-25 11:37 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2018-01-29 15:30   ` Kevin Wolf [this message]

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=20180129153017.GH6141@localhost.localdomain \
    --to=kwolf@redhat.com \
    --cc=den@openvz.org \
    --cc=el13635@mail.ntua.gr \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.