Re: [PATCH v4 0/4] zram memory tracking
On Mon, Apr 16, 2018 at 04:42:18PM +0900, Sergey Senozhatsky wrote: > On (04/16/18 12:31), Minchan Kim wrote: > > Minchan Kim (4): > > zram: correct flag name of ZRAM_ACCESS > > zram: mark incompressible page as ZRAM_HUGE > > zram: record accessed second > > zram: introduce zram memory tracking > > Looks OK to me. After Randy's comments addressed: > > Reviewed-by: Sergey SenozhatskyThanks for the review, Sergey!
Re: [PATCH v4 0/4] zram memory tracking
On Mon, Apr 16, 2018 at 04:42:18PM +0900, Sergey Senozhatsky wrote: > On (04/16/18 12:31), Minchan Kim wrote: > > Minchan Kim (4): > > zram: correct flag name of ZRAM_ACCESS > > zram: mark incompressible page as ZRAM_HUGE > > zram: record accessed second > > zram: introduce zram memory tracking > > Looks OK to me. After Randy's comments addressed: > > Reviewed-by: Sergey Senozhatsky Thanks for the review, Sergey!
Re: [PATCH v4 0/4] zram memory tracking
On (04/16/18 12:31), Minchan Kim wrote: > Minchan Kim (4): > zram: correct flag name of ZRAM_ACCESS > zram: mark incompressible page as ZRAM_HUGE > zram: record accessed second > zram: introduce zram memory tracking Looks OK to me. After Randy's comments addressed: Reviewed-by: Sergey Senozhatsky-ss
Re: [PATCH v4 0/4] zram memory tracking
On (04/16/18 12:31), Minchan Kim wrote: > Minchan Kim (4): > zram: correct flag name of ZRAM_ACCESS > zram: mark incompressible page as ZRAM_HUGE > zram: record accessed second > zram: introduce zram memory tracking Looks OK to me. After Randy's comments addressed: Reviewed-by: Sergey Senozhatsky -ss
[PATCH v4 0/4] zram memory tracking
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. As well, it's pointless to store incompressible pages to zram so better idea is app developers manages them directly like free or mlock rather than remaining them on heap. This patch provides a debugfs /sys/kernel/debug/zram/zram0/block_state to represent each block's state so admin can investigate what memory is cold|incompressible|same page with using pagemap once the pages are swapped out. The output is as follows, 30075.033841 .wh 30163.806904 s.. 30263.806919 ..h First column is zram's block index and 3rh one represents symbol (s: same page w: written page to backing store h: huge page) of the block state. Second column represents usec time unit of the block was last accessed. So above example means the 300th block is accessed at 75.033851 second and it was huge so it was written to the backing store. * from v3: * use depends on selecting DEBUG_FS - Greg KH * Add acked-by from Greg * Fix null ptr access at module unload - Sergey * warning fix from copy_to_user - Sergey * From v2: * debugfs and Kconfig cleanup - Greg KH * Remove unnecesarry buffer - Sergey * Change timestamp from sec to usec * From v1: * Do not propagate error number for debugfs fail - Greg KH * Add writeback and hugepage information - Sergey Minchan Kim (4): zram: correct flag name of ZRAM_ACCESS zram: mark incompressible page as ZRAM_HUGE zram: record accessed second zram: introduce zram memory tracking Documentation/blockdev/zram.txt | 25 + drivers/block/zram/Kconfig | 10 ++ drivers/block/zram/zram_drv.c | 173 +--- drivers/block/zram/zram_drv.h | 14 ++- 4 files changed, 205 insertions(+), 17 deletions(-) -- 2.17.0.484.g0c8726318c-goog
[PATCH v4 0/4] zram memory tracking
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. As well, it's pointless to store incompressible pages to zram so better idea is app developers manages them directly like free or mlock rather than remaining them on heap. This patch provides a debugfs /sys/kernel/debug/zram/zram0/block_state to represent each block's state so admin can investigate what memory is cold|incompressible|same page with using pagemap once the pages are swapped out. The output is as follows, 30075.033841 .wh 30163.806904 s.. 30263.806919 ..h First column is zram's block index and 3rh one represents symbol (s: same page w: written page to backing store h: huge page) of the block state. Second column represents usec time unit of the block was last accessed. So above example means the 300th block is accessed at 75.033851 second and it was huge so it was written to the backing store. * from v3: * use depends on selecting DEBUG_FS - Greg KH * Add acked-by from Greg * Fix null ptr access at module unload - Sergey * warning fix from copy_to_user - Sergey * From v2: * debugfs and Kconfig cleanup - Greg KH * Remove unnecesarry buffer - Sergey * Change timestamp from sec to usec * From v1: * Do not propagate error number for debugfs fail - Greg KH * Add writeback and hugepage information - Sergey Minchan Kim (4): zram: correct flag name of ZRAM_ACCESS zram: mark incompressible page as ZRAM_HUGE zram: record accessed second zram: introduce zram memory tracking Documentation/blockdev/zram.txt | 25 + drivers/block/zram/Kconfig | 10 ++ drivers/block/zram/zram_drv.c | 173 +--- drivers/block/zram/zram_drv.h | 14 ++- 4 files changed, 205 insertions(+), 17 deletions(-) -- 2.17.0.484.g0c8726318c-goog