summaryrefslogtreecommitdiff
path: root/drivers/block/zram/zram_drv.h
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2018-06-08 03:05:45 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-08 03:34:34 +0300
commitd7eac6b6e1838ef1a1400df4ec55daa34bbc855e (patch)
treec909e5c21f836908a88de0fcc8cce881eec5842a /drivers/block/zram/zram_drv.h
parent89e85bce4b02edb7408aebf69d5d1a6692a05f4f (diff)
downloadlinux-d7eac6b6e1838ef1a1400df4ec55daa34bbc855e.tar.xz
zram: record accessed second
zRam as swap is useful for small memory device. However, swap means those pages on zram are mostly cold pages due to VM's LRU algorithm. Especially, once init data for application are touched for launching, they tend to be not accessed any more and finally swapped out. zRAM can store such cold pages as compressed form but it's pointless to keep in memory. Better idea is app developers free them directly rather than remaining them on heap. This patch records last access time of each block of zram so that With upcoming zram memory tracking, it could help userspace developers to reduce memory footprint. Link: http://lkml.kernel.org/r/20180416090946.63057-4-minchan@kernel.org Signed-off-by: Minchan Kim <minchan@kernel.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/zram/zram_drv.h')
-rw-r--r--drivers/block/zram/zram_drv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index ff0547bdb586..1075218e88b2 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -61,6 +61,7 @@ struct zram_table_entry {
unsigned long element;
};
unsigned long value;
+ u64 ac_time;
};
struct zram_stats {