All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: Joe Perches <joe@perches.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pali@kernel.org" <pali@kernel.org>,
	"dsterba@suse.cz" <dsterba@suse.cz>,
	"aaptel@suse.com" <aaptel@suse.com>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	"mark@harmstone.com" <mark@harmstone.com>,
	"nborisov@suse.com" <nborisov@suse.com>
Subject: Re: [PATCH v5 03/10] fs/ntfs3: Add bitmap
Date: Fri, 18 Sep 2020 17:54:34 +0100	[thread overview]
Message-ID: <20200918165434.GG32101@casper.infradead.org> (raw)
In-Reply-To: <1cb55e79c5a54feb82cf4850486890df@paragon-software.com>

On Fri, Sep 18, 2020 at 04:35:11PM +0000, Konstantin Komarov wrote:
> > That was only just renamed.  More concerningly, the documentation is
> > quite unambiguous:
> > 
> >  * This function is for filesystems to call when they want to start
> >  * readahead beyond a file's stated i_size.  This is almost certainly
> >  * not the function you want to call.  Use page_cache_async_readahead()
> >  * or page_cache_sync_readahead() instead.
> 
> Hi Matthew! it's not so clear for us by several reasons (please correct
> if this is wrong):
> page_cache_sync_readahead() seems applicable as a replacement, but
> it doesn't seem to be reasonable as readahead in this case gives perf
> improvement because of it's async nature. The 'async' function is incompatible
> replacement based on the arguments list.

I think the naming has confused you (so I need to clarify the docs).
The sync function is to be called when you need the page which is being
read, and you might want to take the opportunity to read more pages.
The async version is to be called when the page you need is in cache,
but you've noticed that you're getting towards the end of the readahead
window.  Neither version waits for I/O to complete; you have to wait for
the page to become unlocked and then you can check PageUptodate.

Looking at what you're doing, you don't have a file_ra_state because
you're just trying to readahead fs metadata, right?  I think you want
to call force_page_cache_readahead(mapping, NULL, start, nr_pages);
The prototype for it is in mm/internal.h, but I think moving it to
include/linux/pagemap.h is justifiable.

  reply	other threads:[~2020-09-18 16:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 14:10 [PATCH v5 00/10] NTFS read-write driver GPL implementation by Paragon Software Konstantin Komarov
2020-09-11 14:10 ` [PATCH v5 01/10] fs/ntfs3: Add headers and misc files Konstantin Komarov
2020-09-12  2:28   ` Joe Perches
2020-09-11 14:10 ` [PATCH v5 02/10] fs/ntfs3: Add initialization of super block Konstantin Komarov
2020-09-11 16:18   ` Mark Harmstone
2020-09-18 16:39     ` Konstantin Komarov
2020-09-11 16:49   ` Mark Harmstone
2020-09-18 16:43     ` Konstantin Komarov
2020-09-11 14:10 ` [PATCH v5 03/10] fs/ntfs3: Add bitmap Konstantin Komarov
2020-09-13 18:43   ` Joe Perches
2020-09-14  2:38     ` Matthew Wilcox
2020-09-18 16:35       ` Konstantin Komarov
2020-09-18 16:54         ` Matthew Wilcox [this message]
2020-09-25 16:04           ` Konstantin Komarov
2020-09-18 16:29     ` Konstantin Komarov
2020-09-18 16:38       ` Matthew Wilcox
2020-09-11 14:10 ` [PATCH v5 04/10] fs/ntfs3: Add file operations and implementation Konstantin Komarov
2020-09-11 14:10 ` [PATCH v5 05/10] fs/ntfs3: Add attrib operations Konstantin Komarov
2020-09-11 14:10 ` [PATCH v5 06/10] fs/ntfs3: Add compression Konstantin Komarov
2020-09-11 14:10 ` [PATCH v5 07/10] fs/ntfs3: Add NTFS journal Konstantin Komarov
2020-09-11 14:10 ` [PATCH v5 08/10] fs/ntfs3: Add Kconfig, Makefile and doc Konstantin Komarov
2020-09-21 13:26   ` Pali Rohár
2020-09-25 16:30     ` Konstantin Komarov
2020-09-26  8:23       ` Pali Rohár
2020-10-09 15:31         ` Konstantin Komarov
2020-10-09 15:47           ` Pali Rohár
2020-09-11 14:10 ` [PATCH v5 09/10] fs/ntfs3: Add NTFS3 in fs/Kconfig and fs/Makefile Konstantin Komarov
2020-09-11 14:10 ` [PATCH v5 10/10] fs/ntfs3: Add MAINTAINERS Konstantin Komarov

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=20200918165434.GG32101@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=aaptel@suse.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=dsterba@suse.cz \
    --cc=joe@perches.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@harmstone.com \
    --cc=nborisov@suse.com \
    --cc=pali@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.