Re: [PATCH v4] compat: Fix read() of 2GB and more on Mac OS X
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Aug 19, 2013, 22:51 UTC
- Message-ID
- <CA+55aFzAQjxB7HkDqR6_3wdex1t1Tbrf5CeUVyiVm=DRyDVhhQ@mail.gmail.com>
- In-Reply-To
- <7E527329-230E-4954-9942-8BB0935ACE4D@gmail.com>
On Mon, Aug 19, 2013 at 2:56 PM, Kyle J. McKay <mackyle@gmail.com> wrote:
> > The fact that the entire file is read into memory when applying the filter > does not seem like a good thing (see #7-#10 above).
Yeah, that's horrible. Its likely bad for performance too, because even if you have enough memory, it blows everything out of the L2/L3 caches, and if you don't have enough memory it obviously causes other problems.
So it would probably be a great idea to make the filtering code able to do things in smaller chunks, but I suspect that the patch to chunk up xread/xwrite is the right thing to do anyway.
Linus