lkml.org 
[lkml]   [2018]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] zram: idle memory tracking
On Tue, Mar 27, 2018 at 10:47:34AM +0900, Sergey Senozhatsky wrote:
> On (03/27/18 10:13), Sergey Senozhatsky wrote:
> > On (03/27/18 10:03), Minchan Kim wrote:
> > > On Tue, Mar 27, 2018 at 09:49:11AM +0900, Sergey Senozhatsky wrote:
> > > > On (03/26/18 15:49), 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 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 tell us last accesss time of each block of zram via
> > > > > "cat /sys/kernel/debug/zram/zram0/access_time".
> > > > >
> > > > > The output is as follows,
> > > > >
> > > > > 276 1250
> > > > > 277 1800
> > > > > .. ..
> > > > > .. ..
> > > >
> > > > So can we just use CONFIG_IDLE_PAGE_TRACKING + CONFIG_PAGE_OWNER?
> > >
> > > The goal is not mapped memory tracking but one swapped out.
> > > Can we do it by above two combination?
> >
> > Ah, you are right. page_idle tracks only pages which are on LRU lists.
>
> Can a universal (not specific to zram) idle swapped out page tracking
> be of interest to MM people? With the exactly same motivation. Some
> swaps use nfs, for instance, so idle swap pages tracking can be helpful
> not only in embedded domain.

If somebody outside of embedded has an interest in, sometime, he could.
However, I doubt because swap is really hard part to get review because
many people on current MM seem to not care. I guess they don't use swap
heavily compared to old. That's why swap code is really horrible these days. :/

Anyway, I don't want to be stuck because zram has more own attributes
generic cannot cover.

\
 
 \ /
  Last update: 2018-03-27 04:06    [W:0.046 / U:16.452 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site