[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADyq12wo_LS3v44Fs4R68hZAcmM4YVZ=17Vfyo+SECX15Y9LXg@mail.gmail.com>
Date: Mon, 3 Oct 2022 10:46:43 -0400
From: Brian Geffon <bgeffon@...gle.com>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>,
LKML <linux-kernel@...r.kernel.org>,
Suleiman Souhlal <suleiman@...gle.com>,
Rom Lemarchand <romlem@...gle.com>,
linux-mm <linux-mm@...ck.org>
Subject: Re: [PATCH] zram: Always expose rw_page
On Sun, Oct 2, 2022 at 10:59 PM Sergey Senozhatsky
<senozhatsky@...omium.org> wrote:
>
> On (22/09/30 15:52), Brian Geffon wrote:
> > Currently zram will adjust its fops to a version which does not
> > contain rw_page when a backing device has been assigned. This is
> > done to prevent upper layers from assuming a synchronous operation
> > when a page may have been written back. This forces every operation
> > through bio which has overhead associated with bio_alloc/frees.
> >
> > The code can be simplified to always expose a rw_page method and
> > only in the rare event that a page is written back we instead will
> > return -EOPNOTSUPP forcing the upper layer to fallback to bio.
>
> Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>
Thank you.
>
> > @@ -1267,6 +1253,9 @@ static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index,
> > struct bio_vec bvec;
> >
> > zram_slot_unlock(zram, index);
> > + /* If we don't have a bio we came via rw_page, we must fallback to bio */
> > + if (!bio)
> > + return -EOPNOTSUPP;
>
> The comment is above 80 cols.
Fixed in a new patch.
Powered by blists - more mailing lists