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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200813193307.d5597367b7964d95f63e4580@linux-foundation.org>
Date:   Thu, 13 Aug 2020 19:33:07 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Zhaoyang Huang <huangzhaoyang@...il.com>
Cc:     Matthew Wilcox <willy@...radead.org>,
        Roman Gushchin <klamm@...dex-team.ru>,
        Zhaoyang Huang <zhaoyang.huang@...soc.com>,
        "open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm : update ra->ra_pages if it's NOT equal to
 bdi->ra_pages

On Fri, 14 Aug 2020 10:20:11 +0800 Zhaoyang Huang <huangzhaoyang@...il.com> wrote:

> On Fri, Aug 14, 2020 at 10:07 AM Matthew Wilcox <willy@...radead.org> wrote:
> >
> > On Fri, Aug 14, 2020 at 02:43:55AM +0100, Matthew Wilcox wrote:
> > > On Fri, Aug 14, 2020 at 09:30:11AM +0800, Zhaoyang Huang wrote:
> > > > file->f_ra->ra_pages will remain the initialized value since it opend, which may
> > > > be NOT equal to bdi->ra_pages as the latter one is updated somehow(etc,
> > > > echo xxx > /sys/block/dm/queue/read_ahead_kb).So sync ra->ra_pages to the
> > > > updated value when sync read.
> > >
> > > It still ignores the work done by shrink_readahead_size_eio()
> > > and fadvise(POSIX_FADV_SEQUENTIAL).
> >
> > ... by the way, if you're trying to update one particular file's readahead
> > state, you can just call fadvise(POSIX_FADV_NORMAL) on it.
> >
> > If you want to update every open file's ra_pages by writing to sysfs,
> > then just no.  We don't do that.
> No, What I want to fix is the file within one process's context  keeps
> using the initialized value when it is opened and not sync with new
> value when bdi->ra_pages changes.

So you're saying that

	echo xxx > /sys/block/dm/queue/read_ahead_kb

does not affect presently-open files, and you believe that it should do
so?

I guess that could be a reasonable thing to want - it's reasonable for
a user to expect that writing to a global tunable will take immediate
global effect.  I guess.

But as Matthew says, it would help if you were to explain why this is
needed.  In full detail.  What operational problems is the present
implementation causing?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ