Re: [PATCH] Remove certain calls for releasing page cache

From: Josef Bacik
Date: Wed Jul 30 2014 - 19:18:27 EST

So I'm going to list all the things that are wrong with this in the off chance that you will actually improve and then go back to ignoring your emails.

1) You test your patches before you send them. Xfstests is how you test.

2) You seem to think page_cache_release releases the page cache. It doesn't, it releases a ref on the page, we take a ref while we are doing IO and then drop it when we are done. It is not evicted from cache until the VM decides to do it at some point in the future, so all your patch does is make us leak page cache.

3) You don't free the compressed pages. This leaks memory. These pages are only used for writing out, there is absolutely no reason to keep them around after the IO is complete, we have the actual page with the real data still in cache.

4) You also made it so we don't free the the struct we use to track the compressed IO, which is just as useless as the compressed pages now, causing another memory leak.

Had you tested this patch it would have killed the box pretty quickly and you would have known all of this. But you didn't, and wasted a lot of much smarter peoples time. This is not OK, this gets you ignored. Do not do it again. Thanks,


Nick Krause <xerofoify@xxxxxxxxx> wrote:

On Wed, Jul 30, 2014 at 4:51 PM, Zach Brown <zab@xxxxxxxxx> wrote:
> On Wed, Jul 30, 2014 at 04:47:12PM -0400, Josef Bacik wrote:
>> On 07/30/2014 04:42 PM, Nicholas Krause wrote:
>> >This patch removes the lines for releasing the page cache in certain
>> >files as this may aid in perfomance with writes in the compression
>> >rountines of btrfs. Please note that this patch has not been tested
>> >on my own hardware due to no compression based btrfs volumes of my
>> >own.
>> >
> - z

Is there a reason for freeing the page cache as I seem to be missing why?
Regards Nick
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at