Re: [PATCH v16.1 0/9] mm / virtio: Provide support for free page reporting

From: Alexander Graf
Date: Fri Jan 24 2020 - 11:41:09 EST




On 24.01.20 14:23, Hillf Danton wrote:

On Thu, 23 Jan 2020 11:20:07 +0100 Alexander Graf wrote:

The big problem I see is that what I really want from a user's point of
view is a tuneable that says "Automatically free clean page cache pages
that were not accessed in the last X minutes".

A diff is made on top of 1a4e58cce84e ("mm: introduce MADV_PAGEOUT") without
test in any form, assuming it goes in line with the tunable above but without
"X minutes" taken into account.

[BTW, please take a look at
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: base64
Thanks, looks like Exchange doesn't pass 8bit data on, I've changed the default to ascii now, please just notify me in private if you see it broken again.


and ensure pure text message.]


--- a/include/uapi/asm-generic/mman-common.h
+++ b/include/uapi/asm-generic/mman-common.h
@@ -69,6 +69,7 @@
#define MADV_COLD 20 /* deactivate these pages */
#define MADV_PAGEOUT 21 /* reclaim these pages */
+#define MADV_CCPC 22 /* reclaim cold & clean page cache pages */

This patch adds a new madvise flag. I have a hard time seeing how that would help with the "full system expiry" of pages?

The basic point that I tried to make above was that I would ideally like to have a coldness cutoff date at which you can be pretty confident that page cache data is no longer needed.

To work properly, this needs to be transparent to any normal process on the system :).


Alex



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879