Re: [PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-21 Thread Sergey Senozhatsky
On (11/22/18 14:11), Minchan Kim wrote: > > It was a option when I imagined this idea first but problem from product > division was memory waste of ac_time for every zram table. OK, I see. -ss

Re: [PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-21 Thread Sergey Senozhatsky
On (11/22/18 14:11), Minchan Kim wrote: > > It was a option when I imagined this idea first but problem from product > division was memory waste of ac_time for every zram table. OK, I see. -ss

Re: [PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-21 Thread Minchan Kim
On Tue, Nov 20, 2018 at 11:46:59AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (11/16/18 16:20), Minchan Kim wrote: > [..] > > +static ssize_t idle_store(struct device *dev, > > + struct device_attribute *attr, const char *buf, size_t len) > > +{ > > + struct zram *zram =

Re: [PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-21 Thread Minchan Kim
On Tue, Nov 20, 2018 at 11:46:59AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (11/16/18 16:20), Minchan Kim wrote: > [..] > > +static ssize_t idle_store(struct device *dev, > > + struct device_attribute *attr, const char *buf, size_t len) > > +{ > > + struct zram *zram =

Re: [PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-19 Thread Sergey Senozhatsky
Hello, On (11/16/18 16:20), Minchan Kim wrote: [..] > +static ssize_t idle_store(struct device *dev, > + struct device_attribute *attr, const char *buf, size_t len) > +{ > + struct zram *zram = dev_to_zram(dev); > + unsigned long nr_pages = zram->disksize >> PAGE_SHIFT; > +

Re: [PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-19 Thread Sergey Senozhatsky
Hello, On (11/16/18 16:20), Minchan Kim wrote: [..] > +static ssize_t idle_store(struct device *dev, > + struct device_attribute *attr, const char *buf, size_t len) > +{ > + struct zram *zram = dev_to_zram(dev); > + unsigned long nr_pages = zram->disksize >> PAGE_SHIFT; > +

[PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-15 Thread Minchan Kim
To support idle page writeback with upcoming patches, this patch introduces a new ZRAM_IDLE flag. Userspace can mark zram slots as "idle" via "echo 1 > /sys/block/zramX/idle" which marks every allocated zram slot as ZRAM_IDLE. User could see it by /sys/kernel/debug/zram/zram0/block_state.

[PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-15 Thread Minchan Kim
To support idle page writeback with upcoming patches, this patch introduces a new ZRAM_IDLE flag. Userspace can mark zram slots as "idle" via "echo 1 > /sys/block/zramX/idle" which marks every allocated zram slot as ZRAM_IDLE. User could see it by /sys/kernel/debug/zram/zram0/block_state.