All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] block: fix -EAGAIN IOPOLL task/vm accounting
Date: Tue, 1 Sep 2020 08:01:53 -0600	[thread overview]
Message-ID: <56eaae8a-5743-8a59-bcf1-47c550bbd25f@kernel.dk> (raw)
In-Reply-To: <20200901054235.GA29886@infradead.org>

On 8/31/20 11:42 PM, Christoph Hellwig wrote:
> On Mon, Aug 31, 2020 at 08:18:48AM -0600, Jens Axboe wrote:
>>> We'll still need a flag with the above to skip the submit_bio_noacct
>>> bios.  But I think it is the right way to go.  Eventually we'll also
>>> need to push the accounting down into the individual bio based drivers.
>>
>> For the iocb propagation, we'd really need the caller to mark the iocb
>> as IOCB_ACCOUNTED (or whatever) if BIO_ACCOUNTED is set, since we can't
>> do that further down the stack as we really don't know if we hit -EAGAIN
>> before or after the bio was accounted... Which kind of sucks, as it'll
>> be hard to contain in a generic fashion.
> 
> Well, that's why I think the only proper fix is to only account a bio
> when we know the driver is actually going to submit it.

Yeah I agree, it's a lot less code too. Which is basically back to my
original RFC, I'll see if I can clean it up a bit.

-- 
Jens Axboe


      reply	other threads:[~2020-09-01 14:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-29 16:51 [PATCH] block: fix -EAGAIN IOPOLL task/vm accounting Jens Axboe
2020-08-30  6:26 ` Christoph Hellwig
2020-08-30 15:09   ` Jens Axboe
2020-08-30 15:28     ` Christoph Hellwig
2020-08-31  3:12       ` Ming Lei
2020-08-31 14:02       ` Jens Axboe
2020-08-31 14:12         ` Christoph Hellwig
2020-08-31 14:18           ` Jens Axboe
2020-09-01  5:42             ` Christoph Hellwig
2020-09-01 14:01               ` Jens Axboe [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=56eaae8a-5743-8a59-bcf1-47c550bbd25f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    /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.