linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Chao Yu <chao.yu@linux.dev>
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: fix wrong inflight page stats for directIO
Date: Thu, 22 Jul 2021 21:18:43 +0800	[thread overview]
Message-ID: <311ab257-2d67-fd73-8359-af5b44e1447c@kernel.org> (raw)
In-Reply-To: <YPjNGoFzQojO5Amr@sol.localdomain>

On 2021/7/22 9:42, Eric Biggers wrote:
> On Wed, Jul 21, 2021 at 05:46:26PM -0700, Eric Biggers wrote:
>> On Mon, Jul 19, 2021 at 04:45:48PM +0800, Chao Yu wrote:
>>> Previously, we use sbi->nr_pages[] to account direct IO, the count should
>>> be based on page granularity rather than bio granularity, fix it.
>>>
>>> Fixes: 02b16d0a34a1 ("f2fs: add to account direct IO")
>>> Signed-off-by: Chao Yu <chao@kernel.org>
> 
> Also, do we have to do this, as opposed to just moving F2FS_DIO_WRITE and
> F2FS_DIO_READ out of ->nr_pages[] and into separate counters that are clearly
> defined to be per-request?  As Christoph pointed out
> (https://lkml.kernel.org/r/YPU+3inGclUtcSpJ@infradead.org), these counters are
> only used to check whether there is any in-flight direct I/O at all.  (They're
> also shown in /sys/kernel/debug/f2fs/status, but that doesn't really matter.)
> 
> As Christoph mentioned, there is a way to avoid needing f2fs_dio_submit_bio()
> (which would save a memory allocation for every bio, which can fail).  But it
> will only work if the counters remain per-request.
> 
> Can we leave these as per-request?

I updated the patch, could you please check that?

Thanks,

> 
> - Eric
> 

      reply	other threads:[~2021-07-22 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19  8:45 [PATCH v2] f2fs: fix wrong inflight page stats for directIO Chao Yu
2021-07-22  0:46 ` [f2fs-dev] " Eric Biggers
2021-07-22  1:42   ` Eric Biggers
2021-07-22 13:18     ` Chao Yu [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=311ab257-2d67-fd73-8359-af5b44e1447c@kernel.org \
    --to=chao@kernel.org \
    --cc=chao.yu@linux.dev \
    --cc=ebiggers@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@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 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).