Skip to contentSkip to conversation

random AIO reads (do_generic_mapping_read)

DISCUSSION Michael R. Hines 1 participant 1 message May 9, 2007

lore
Share & tools
lore
#0 lore raw

Howdy (please CC replies directly),

I have a very specific question regarding the behavior of do_generic_mapping_read().

Here's my 2.6.20 setup: I have a stable block device driver that has random-access style latencies (around 80 microseconds. zero seek-time).

From userland: I have a simple AIO io_submit/io_suspend program that repeatedly fires off *hundreds random AIO reads*

Here's what I would like to happen:

Since my driver does not seek (i.e. I/O not helped by mm/readahead.c) I would like my AIOs to be *overlapped* when sent to my driver. Currently, do_generic_mapping_read() will block on every read, one-by-one. Instead I want the bio's to be fired off to my driver as fast as possible without calling lock_page(). Rather the read should return and allow io_submit_one to fire off more reads without waiting for the userspace-copy - it would instead happen later in the future.

Furthermore: I *do not* want to avoid the page cache (which temporarily solves the problem). I still want the support of the page-cache, I just instead need those I/Os to not block or sleep while waiting for a single I/O to complete.

Obviously if this were a disk, such a requirement would be very stupid (and useless). But without it, my low-latency driver is under-utilized.

Is this possible right now?

Signature · 5 lines
/**************************************/
Michael R. Hines
Grad Student, SUNY Binghamton
http://www.cs.binghamton.edu/~mhines
/ *************************************/