linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why does __do_page_cache_readahead submit READ, not READA?
@ 2009-07-29 16:14 Lars Ellenberg
  2009-07-29 21:18 ` Jens Axboe
  0 siblings, 1 reply; 16+ messages in thread
From: Lars Ellenberg @ 2009-07-29 16:14 UTC (permalink / raw)
  To: linux-kernel, linux-mm, linux-fsdevel, dm-devel, Neil Brown

I naively assumed, from the "readahead" in the name, that readahead
would be submitting READA bios. It does not.

I recently did some statistics on how many READ and READA requests
we actually see on the block device level.
I was suprised that READA is basically only used for file system
internal meta data (and not even for all file systems),
but _never_ for file data.

A simple
	dd if=bigfile of=/dev/null bs=4k count=1
will absolutely cause readahead of the configured amount, no problem.
But on the block device level, these are READ requests, where I'd
expected them to be READA requests, based on the name.

This is because __do_page_cache_readahead() calls read_pages(),
which in turn is mapping->a_ops->readpages(), or, as fallback,
mapping->a_ops->readpage().

On that level, all variants end up submitting as READ.

This may even be intentional.
But if so, I'd like to understand that.

Please, anyone in the know, enlighten me ;)


	Lars

Annecdotical: I've seen an oracle being killed by OOM, because someone
did a grep -r . while accidentally having a bogusly huge readahead set.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-08-03 21:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 16:14 Why does __do_page_cache_readahead submit READ, not READA? Lars Ellenberg
2009-07-29 21:18 ` Jens Axboe
2009-07-29 22:55   ` Chris Mason
2009-07-30  6:06     ` Jens Axboe
2009-07-30 14:34       ` Chris Mason
2009-07-30 16:47         ` Jeff Moyer
2009-07-30 16:56           ` Chris Mason
2009-08-03  7:52       ` Wu Fengguang
2009-08-03  7:59         ` Jens Axboe
2009-08-03  8:23           ` Wu Fengguang
2009-08-03  9:25             ` Jens Axboe
2009-08-03  9:34               ` Wu Fengguang
2009-08-03  9:37                 ` Jens Axboe
2009-08-03  9:44                   ` Wu Fengguang
2009-08-03 14:26           ` [dm-devel] " James Bottomley
2009-08-03 21:03             ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).