public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Zhihao Cheng <chengzhihao1@huawei.com>,
	Ingo Molnar <mingo@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	yukuai3@huawei.com
Subject: Re: [PATCH v2] fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
Date: Tue, 19 Apr 2022 10:17:55 +0200	[thread overview]
Message-ID: <20220419081755.GN2731@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <CAHk-=wh7CqEu+34=jUsSaMcMHe4Uiz7JrgYjU+eE-SJ3MPS-Gg@mail.gmail.com>

On Mon, Apr 18, 2022 at 12:43:43PM -0700, Linus Torvalds wrote:
> Which all brings us back to how we have that hacky thing in
> writeback_sb_inodes() that does
> 
>         if (need_resched()) {
>                 /*
>                  * We're trying to balance between building up a nice
>                  * long list of IOs to improve our merge rate, and
>                  * getting those IOs out quickly for anyone throttling
>                  * in balance_dirty_pages().  cond_resched() doesn't
>                  * unplug, so get our IOs out the door before we
>                  * give up the CPU.
>                  */
>                 blk_flush_plug(current->plug, false);
>                 cond_resched();
>         }

Yeah, that's horribly broken for PREEMPT=y.

  parent reply	other threads:[~2022-04-19  8:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  9:28 [PATCH v2] fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages Zhihao Cheng
2022-04-18 19:43 ` Linus Torvalds
2022-04-18 21:16   ` Jens Axboe
2022-04-18 22:01     ` Linus Torvalds
2022-04-18 22:12       ` Jens Axboe
2022-04-18 22:20         ` Jens Axboe
2022-04-19  0:24           ` Linus Torvalds
2022-04-19  0:19         ` Linus Torvalds
2022-04-19  0:30           ` Jens Axboe
2022-04-19  8:16             ` Peter Zijlstra
2022-04-19  8:10   ` Peter Zijlstra
2022-04-19  8:17   ` Peter Zijlstra [this message]
     [not found] <20220418112745.1761-1-hdanton@sina.com>
2022-04-18 13:27 ` [PATCH v2] fs-writeback: writeback_sb_inodes: Recalculate " Zhihao Cheng

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=20220419081755.GN2731@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=chengzhihao1@huawei.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yukuai3@huawei.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