From: Linus Torvalds Date: Mon, 19 Aug 2013 22:51:41 GMT Subject: Re: [PATCH v4] compat: Fix read() of 2GB and more on Mac OS X Message-ID: In-Reply-To: <7E527329-230E-4954-9942-8BB0935ACE4D@gmail.com> On Mon, Aug 19, 2013 at 2:56 PM, Kyle J. McKay 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