Messages in this thread | | | Date | Mon, 17 Nov 2003 01:50:24 -0800 | From | William Lee Irwin III <> | Subject | Re: seq_file and exporting dynamically allocated data |
| |
On Mon, Nov 17, 2003 at 09:42:09AM +0000, Tigran Aivazian wrote: > Here are two files: simple.c kernel module and user.c user test program. > If you (or anyone) believe it is possible to return more than a single > page on a read(2) please change them accordingly and let me know.
Sorry, I needed to amend that. It's not a fixed PAGE_SIZE buffer; the buffer is only resized up to the point it allows a single ->show() call to succeed, and then you get short reads if you try to go beyond the buffer size in a single read.
You could (in theory) get this to succeed > PAGE_SIZE reads by doing the operation all in a single ->show() call, but that will have some large overheads and will also have a retry loop where the buffer size is doubled until the ->show() call succeeds incurred at least once per open() at the time of the first read().
-- wli - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |