lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200918165434.GG32101@casper.infradead.org>
Date:   Fri, 18 Sep 2020 17:54:34 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
Cc:     Joe Perches <joe@...ches.com>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "pali@...nel.org" <pali@...nel.org>,
        "dsterba@...e.cz" <dsterba@...e.cz>,
        "aaptel@...e.com" <aaptel@...e.com>,
        "rdunlap@...radead.org" <rdunlap@...radead.org>,
        "mark@...mstone.com" <mark@...mstone.com>,
        "nborisov@...e.com" <nborisov@...e.com>
Subject: Re: [PATCH v5 03/10] fs/ntfs3: Add bitmap

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ