linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yosry Ahmed <yosryahmed@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Barry Song <21cnbao@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 Barry Song <v-songbaohua@oppo.com>,
	Nhat Pham <nphamcs@gmail.com>,
	 Chengming Zhou <chengming.zhou@linux.dev>,
	Chris Li <chrisl@kernel.org>,
	 David Hildenbrand <david@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] mm: zswap: fix zswap_never_enabled() for CONFIG_ZSWAP==N
Date: Tue, 2 Jul 2024 04:58:05 -0700	[thread overview]
Message-ID: <CAJD7tkYJwRF5B2-vQGkmEhgw9t20OcVbB7MNrQqvmTor8Vjptw@mail.gmail.com> (raw)
In-Reply-To: <20240701235210.5c187c85aa225292d034cafc@linux-foundation.org>

On Mon, Jul 1, 2024 at 11:52 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Sun, 30 Jun 2024 11:22:31 +1200 Barry Song <21cnbao@gmail.com> wrote:
>
> > From: Barry Song <v-songbaohua@oppo.com>
> >
> > If CONFIG_ZSWAP is set to N, it means zswap cannot be enabled.
> > zswap_never_enabled() should return true.
> >
> > ...
> >
> > --- a/include/linux/zswap.h
> > +++ b/include/linux/zswap.h
> > @@ -68,7 +68,7 @@ static inline bool zswap_is_enabled(void)
> >
> >  static inline bool zswap_never_enabled(void)
> >  {
> > -     return false;
> > +     return true;
> >  }
>
> Well, that code was as wrong as it's possible to get.
>
> But what effect does this have?  Seems "not much"?  Perhaps we'll
> attempt a zswap_load() which later fails for other reasons?

Actually zswap_load() is a noop with !CONFIG_ZSWAP, so it doesn't have
an effect there. The only effect is that with Barry's latest large
folio swapin patches for zram, we will always fallback to order-0
swapin, even mistakenly when !CONFIG_ZSWAP.

Basically the bug just makes Barry's in progress patches not work at all.


  parent reply	other threads:[~2024-07-02 11:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-29 23:22 Barry Song
2024-07-01  2:54 ` Chengming Zhou
2024-07-01 13:32 ` Yosry Ahmed
2024-07-01 17:58 ` Chris Li
2024-07-02  6:52 ` Andrew Morton
2024-07-02  7:00   ` Barry Song
2024-07-02 11:58   ` Yosry Ahmed [this message]
2024-07-03  2:02     ` Andrew Morton
2024-07-02  6:58 ` David Hildenbrand
2024-07-03 23:22 ` Nhat Pham

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=CAJD7tkYJwRF5B2-vQGkmEhgw9t20OcVbB7MNrQqvmTor8Vjptw@mail.gmail.com \
    --to=yosryahmed@google.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=v-songbaohua@oppo.com \
    --cc=willy@infradead.org \
    /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