From: Matthew Wilcox <willy@infradead.org>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] mm: Define VM_(MAX|MIN)_READAHEAD via sizes.h constants
Date: Fri, 21 Dec 2018 05:24:23 -0800 [thread overview]
Message-ID: <20181221132423.GA10600@bombadil.infradead.org> (raw)
In-Reply-To: <20181221125314.5177-1-nborisov@suse.com>
On Fri, Dec 21, 2018 at 02:53:14PM +0200, Nikolay Borisov wrote:
> All users of the aformentioned macros convert them to kbytes by
> multplying. Instead, directly define the macros via the aptly named
> SZ_16K/SZ_128K ones. Also remove the now redundant comments explaining
> that VM_* are defined in kbytes it's obvious. No functional changes.
Actually, all users of these constants convert them to pages!
> + q->backing_dev_info->ra_pages = VM_MAX_READAHEAD / PAGE_SIZE;
> + sb->s_bdi->ra_pages = VM_MAX_READAHEAD / PAGE_SIZE;
> + sb->s_bdi->ra_pages = VM_MAX_READAHEAD / PAGE_SIZE;
> + sb->s_bdi->ra_pages = VM_MAX_READAHEAD / PAGE_SIZE;
> + sb->s_bdi->ra_pages = VM_MAX_READAHEAD / PAGE_SIZE;
> -#define VM_MAX_READAHEAD 128 /* kbytes */
> -#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */
> +#define VM_MAX_READAHEAD SZ_128K
> +#define VM_MIN_READAHEAD SZ_16K /* includes current page */
So perhaps:
#define VM_MAX_READAHEAD (SZ_128K / PAGE_SIZE)
VM_MIN_READAHEAD isn't used, so just delete it?
next prev parent reply other threads:[~2018-12-21 13:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 12:53 Nikolay Borisov
2018-12-21 13:24 ` Matthew Wilcox [this message]
2018-12-21 14:06 ` Nikolay Borisov
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=20181221132423.GA10600@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nborisov@suse.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