linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Geffon <bgeffon@google.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Suleiman Souhlal <suleiman@google.com>,
	Rom Lemarchand <romlem@google.com>, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] zram: Always expose rw_page
Date: Mon, 3 Oct 2022 10:46:43 -0400	[thread overview]
Message-ID: <CADyq12wo_LS3v44Fs4R68hZAcmM4YVZ=17Vfyo+SECX15Y9LXg@mail.gmail.com> (raw)
In-Reply-To: <YzpQBqwET9bTEsoU@google.com>

On Sun, Oct 2, 2022 at 10:59 PM Sergey Senozhatsky
<senozhatsky@chromium.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@chromium.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.

  reply	other threads:[~2022-10-03 14:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 12:50 [RESEND RFC] zram: Allow rw_page when page isn't written back Brian Geffon
2022-09-09  8:30 ` Sergey Senozhatsky
2022-09-12  4:37   ` Sergey Senozhatsky
2022-09-12  6:07     ` Sergey Senozhatsky
2022-09-23 19:31 ` Minchan Kim
2022-09-30 19:33   ` Brian Geffon
2022-09-30 19:52   ` [PATCH] zram: Always expose rw_page Brian Geffon
2022-10-03  2:59     ` Sergey Senozhatsky
2022-10-03 14:46       ` Brian Geffon [this message]
2022-10-03 14:48   ` [PATCH v2] " Brian Geffon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADyq12wo_LS3v44Fs4R68hZAcmM4YVZ=17Vfyo+SECX15Y9LXg@mail.gmail.com' \
    --to=bgeffon@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=romlem@google.com \
    --cc=senozhatsky@chromium.org \
    --cc=suleiman@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).