From: Roman Gushchin <klamm@yandex-team.ru>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-mm <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
Jan Kara <jack@suse.cz>, Wu Fengguang <fengguang.wu@intel.com>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: use only per-device readahead limit
Date: Fri, 21 Aug 2015 23:21:21 +0300 [thread overview]
Message-ID: <197171440188481@webcorp01e.yandex-team.ru> (raw)
In-Reply-To: <CA+55aFyc8bb=ASmQbhk72cFOOmGpNhowdWGtSn+biog69_f+LA@mail.gmail.com>
21.08.2015, 21:17, "Linus Torvalds" <torvalds@linux-foundation.org>:
> On Fri, Aug 21, 2015 at 10:12 AM, Roman Gushchin <klamm@yandex-team.ru> wrote:
>> ?There are devices, which require custom readahead limit.
>> ?For instance, for RAIDs it's calculated as number of devices
>> ?multiplied by chunk size times 2.
>
> So afaik, the default read-ahead size is 128kB, which is actually
> smaller than the old 512-page limit.
>
> Which means that you probably changed "ra_pages" somehow. Is it some
> system tool that does that automatically, and if so based on what,
> exactly?
It's just a raid driver. For instance, drivers/ms/raid5.c:6898 .
On my setup I got unexpectedly even slight perfomance increase
over O_DIRECT case and over old memory-based readahead limit,
as you can see from numbers in the commit message (1.2GB/s vs 1.1 GB/s).
So, I like an idea to delegate the readahead limit calculation to the underlying i/o level.
> I'm also slightly worried about the fact that now the max read-ahead
> may actually be zero,
For "normal" readahead nothing changes. Only readahead syscall and
madvise(MADV_WILL_NEED) cases are affected.
I think, it's ok to do nothing, if readahead was deliberately disabled.
> and/or basically infinite (there's a ioctl to
> set it that only tests that it's not negative). Does everything react
> ok to that?
It's an open question, if we have to add some checks to avoid miss-configuration.
In any case, we can check the limit on setting rather then adjust them dynamically.
--
Roman
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-08-21 20:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 16:19 [PATCH] mm/readahead.c: fix regression caused by small " Roman Gushchin
2015-08-20 19:23 ` Linus Torvalds
2015-08-21 17:12 ` [PATCH] mm: use only per-device " Roman Gushchin
2015-08-21 18:17 ` Linus Torvalds
2015-08-21 20:21 ` Roman Gushchin [this message]
2015-08-21 20:44 ` Linus Torvalds
2015-08-24 11:57 ` [PATCH v2] " Roman Gushchin
2015-08-24 12:41 ` Konstantin Khlebnikov
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=197171440188481@webcorp01e.yandex-team.ru \
--to=klamm@yandex-team.ru \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=raghavendra.kt@linux.vnet.ibm.com \
--cc=rientjes@google.com \
--cc=torvalds@linux-foundation.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