lkml.org 
[lkml]   [2022]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 1/1] zram: Allow rw_page when page isn't written back.
Thanks Sergey,

On Mon, Aug 8, 2022 at 9:38 PM Sergey Senozhatsky
<senozhatsky@chromium.org> wrote:
>
> On (22/08/08 12:50), Brian Geffon wrote:
> [..]
> >
> > pr_info("setup backing device %s\n", file_name);
> > @@ -722,7 +707,8 @@ static ssize_t writeback_store(struct device *dev,
> >
> > if (zram_test_flag(zram, index, ZRAM_WB) ||
> > zram_test_flag(zram, index, ZRAM_SAME) ||
> > - zram_test_flag(zram, index, ZRAM_UNDER_WB))
> > + zram_test_flag(zram, index, ZRAM_UNDER_WB) ||
> > + zram_test_flag(zram, index, ZRAM_NO_WB))
> > goto next;
>
> mark_idle() probably should also test ZRAM_NO_WB bit.

While we definitely can add that check in mark_idle() it actually
doesn't hurt to allow marking the page as idle as NO_WB only controls
the writeback aspect and as long as the page is marked NO_WB it won't
be written back, idle or not. Definitely happy to add it in later
versions if people like this approach in general.

\
 
 \ /
  Last update: 2022-08-10 21:20    [W:0.072 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site