Re: [PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Sergey Senozhatsky
On (03/27/18 15:50), Minchan Kim wrote: [..] > > + char flags[__NR_ZRAM_PAGEFLAGS - ZRAM_FLAG_SHIFT]; > Technically, you don't need this buffer... > + snprintf(flags, sizeof(flags), "%c%c%c", > + zram_test_flag(zram, index, ZRAM_SAME) ? 's' : '.', > +

Re: [PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Sergey Senozhatsky
On (03/27/18 15:50), Minchan Kim wrote: [..] > > + char flags[__NR_ZRAM_PAGEFLAGS - ZRAM_FLAG_SHIFT]; > Technically, you don't need this buffer... > + snprintf(flags, sizeof(flags), "%c%c%c", > + zram_test_flag(zram, index, ZRAM_SAME) ? 's' : '.', > +

Re: [PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Minchan Kim
Hi Greg, On Tue, Mar 27, 2018 at 09:12:38AM +0200, Greg KH wrote: > On Tue, Mar 27, 2018 at 03:50:33PM +0900, Minchan Kim wrote: > > 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

Re: [PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Minchan Kim
Hi Greg, On Tue, Mar 27, 2018 at 09:12:38AM +0200, Greg KH wrote: > On Tue, Mar 27, 2018 at 03:50:33PM +0900, Minchan Kim wrote: > > 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

Re: [PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Greg KH
On Tue, Mar 27, 2018 at 03:50:33PM +0900, Minchan Kim wrote: > 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

Re: [PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Greg KH
On Tue, Mar 27, 2018 at 03:50:33PM +0900, Minchan Kim wrote: > 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

[PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Minchan Kim
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

[PATCH v2 4/4] zram: introduce zram memory tracking

2018-03-27 Thread Minchan Kim
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