linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: John Stoffel <john@stoffel.org>
Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Fengguang Wu <fengguang.wu@intel.com>,
	David Cohen <david.a.cohen@linux.intel.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Damien Ramonda <damien.ramonda@intel.com>,
	Jan Kara <jack@suse.cz>, David Rientjes <rientjes@google.com>,
	Nishanth Aravamudan <nacc@linux.vnet.ibm.com>,
	linux-mm <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm readahead: Fix sys_readahead breakage by reverting 2MB limit (bug 79111)
Date: Thu, 3 Jul 2014 14:58:54 -0700	[thread overview]
Message-ID: <CA+55aFwhpaTPm+mok0VmypU2T2yvYX=E4hnQwPC4NVdxEzfh0Q@mail.gmail.com> (raw)
In-Reply-To: <21429.45664.255694.85431@quad.stoffel.home>

On Thu, Jul 3, 2014 at 12:43 PM, John Stoffel <john@stoffel.org> wrote:
>
> This is one of those perenial questions of how to tune this.  I agree
> we should increase the number, but shouldn't it be based on both the
> amount of memory in the machine, number of devices (or is it all just
> one big pool?) and the speed of the actual device doing readahead?

Sure. But I don't trust the throughput data for the backing device at
all, especially early at boot. We're supposed to work it out for
writeback over time (based on device contention etc), but I never saw
that working, and for reading I don't think we have even any code to
do so.

And trying to be clever and basing the read-ahead size on the node
memory size was what caused problems to begin with (with memory-less
nodes) that then made us just hardcode the maximum.

So there are certainly better options - in theory. In practice, I
think we don't really care enough, and the better options are
questionably implementable.

I _suspect_ the right number is in that 2-8MB range, and I would
prefer to keep it at the low end at least until somebody really has
numbers (and preferably from different real-life situations).

I also suspect that read-ahead is less of an issue with non-rotational
storage in general, since the only real reason for it tends to be
latency reduction (particularly the "readahead()" kind of big-hammer
thing that is really just useful for priming caches). So there's some
argument to say that it's getting less and less important.

            Linus

--
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>

  reply	other threads:[~2014-07-03 21:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 13:02 Raghavendra K T
2014-07-03 15:41 ` Linus Torvalds
2014-07-03 18:11   ` Raghavendra K T
2014-07-03 18:22     ` Linus Torvalds
2014-07-03 18:29       ` Linus Torvalds
2014-07-03 18:38         ` Raghavendra K T
2014-07-03 18:50           ` Raghavendra K T
2014-07-03 18:53           ` Linus Torvalds
2014-07-03 18:56             ` Raghavendra K T
2014-07-03 19:05             ` Dave Jones
2014-07-03 19:43         ` John Stoffel
2014-07-03 21:58           ` Linus Torvalds [this message]
2014-10-03 20:57             ` Rafael Aquini
2014-07-03 18:35       ` Raghavendra K T

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='CA+55aFwhpaTPm+mok0VmypU2T2yvYX=E4hnQwPC4NVdxEzfh0Q@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=damien.ramonda@intel.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=jack@suse.cz \
    --cc=john@stoffel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nacc@linux.vnet.ibm.com \
    --cc=raghavendra.kt@linux.vnet.ibm.com \
    --cc=rientjes@google.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox