Re: [patch 6/12] hold atomic kmaps across generic_file_read

Linus Torvalds
2002-08-10T17:41:30Z

On Sat, 10 Aug 2002, Jamie Lokier wrote:
>
> This will only provide the performance benefic when `aligned_malloc'
> return "fresh" memory, i.e. memory that has never been written to.

Absolutely.

Think o fthe optimization as a way to give application writers a new way
of being efficient.

In particular, I remember when the gcc people were worried about the most
efficient way to read in a file for preprocessing (Neil Booth, mainly).
Neil did all these timings on where the cut-off point was for using mmap
vs just using read().

For people like that, wouldn't it be nice to just be able to tell them: if
you do X, we guarantee that you'll get optimal zero-copy performance for
reading a file.

> But it's a nice way to optimise if you are _deliberately_ optimising a
> user space program.

Exactly.

Linus