From: Barry Song <21cnbao@gmail.com>
To: Yosry Ahmed <yosryahmed@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Nhat Pham <nphamcs@gmail.com>,
Chengming Zhou <chengming.zhou@linux.dev>,
Chris Li <chrisl@kernel.org>,
David Hildenbrand <david@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] mm: zswap: rename is_zswap_enabled() to zswap_is_enabled()
Date: Tue, 11 Jun 2024 14:59:15 +1200 [thread overview]
Message-ID: <CAGsJ_4x7GjeeVpcjxxxeemgA9aKC2ZzFHR9r0Ang_-W2RQ2KAQ@mail.gmail.com> (raw)
In-Reply-To: <20240611024516.1375191-1-yosryahmed@google.com>
On Tue, Jun 11, 2024 at 2:45 PM Yosry Ahmed <yosryahmed@google.com> wrote:
>
> In preparation of introducing a similar function, rename
> is_zswap_enabled() to use zswap_* prefix like other zswap functions.
>
> Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Reviewed-by: Barry Song <baohua@kernel.org>
> ---
> include/linux/zswap.h | 4 ++--
> mm/memcontrol.c | 2 +-
> mm/zswap.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/zswap.h b/include/linux/zswap.h
> index 2a85b941db975..ce5e7bfe8f1ec 100644
> --- a/include/linux/zswap.h
> +++ b/include/linux/zswap.h
> @@ -35,7 +35,7 @@ void zswap_swapoff(int type);
> void zswap_memcg_offline_cleanup(struct mem_cgroup *memcg);
> void zswap_lruvec_state_init(struct lruvec *lruvec);
> void zswap_folio_swapin(struct folio *folio);
> -bool is_zswap_enabled(void);
> +bool zswap_is_enabled(void);
> #else
>
> struct zswap_lruvec_state {};
> @@ -60,7 +60,7 @@ static inline void zswap_memcg_offline_cleanup(struct mem_cgroup *memcg) {}
> static inline void zswap_lruvec_state_init(struct lruvec *lruvec) {}
> static inline void zswap_folio_swapin(struct folio *folio) {}
>
> -static inline bool is_zswap_enabled(void)
> +static inline bool zswap_is_enabled(void)
> {
> return false;
> }
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 1303ed01bb5e5..a811dfff10cda 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -8469,7 +8469,7 @@ void obj_cgroup_uncharge_zswap(struct obj_cgroup *objcg, size_t size)
> bool mem_cgroup_zswap_writeback_enabled(struct mem_cgroup *memcg)
> {
> /* if zswap is disabled, do not block pages going to the swapping device */
> - return !is_zswap_enabled() || !memcg || READ_ONCE(memcg->zswap_writeback);
> + return !zswap_is_enabled() || !memcg || READ_ONCE(memcg->zswap_writeback);
> }
>
> static u64 zswap_current_read(struct cgroup_subsys_state *css,
> diff --git a/mm/zswap.c b/mm/zswap.c
> index b9b35ef86d9be..a8c8dd8cfe6f5 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -131,7 +131,7 @@ static bool zswap_shrinker_enabled = IS_ENABLED(
> CONFIG_ZSWAP_SHRINKER_DEFAULT_ON);
> module_param_named(shrinker_enabled, zswap_shrinker_enabled, bool, 0644);
>
> -bool is_zswap_enabled(void)
> +bool zswap_is_enabled(void)
> {
> return zswap_enabled;
> }
> --
> 2.45.2.505.gda0bf45e8d-goog
>
next prev parent reply other threads:[~2024-06-11 2:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 2:45 Yosry Ahmed
2024-06-11 2:45 ` [PATCH v3 2/3] mm: zswap: add zswap_never_enabled() Yosry Ahmed
2024-06-11 16:32 ` Nhat Pham
2024-06-11 21:53 ` Barry Song
[not found] ` <CAJD7tkY6h1RkbYHbaQcTuVXOsY-t=arytf5HtcKfx7A75x06bg@mail.gmail.com>
2024-06-11 22:19 ` Barry Song
2024-06-11 23:37 ` Yosry Ahmed
2024-06-11 2:45 ` [PATCH v3 3/3] mm: zswap: handle incorrect attempts to load large folios Yosry Ahmed
2024-06-11 21:56 ` Barry Song
2024-06-11 2:59 ` Barry Song [this message]
2024-06-11 15:58 ` [PATCH v3 1/3] mm: zswap: rename is_zswap_enabled() to zswap_is_enabled() 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=CAGsJ_4x7GjeeVpcjxxxeemgA9aKC2ZzFHR9r0Ang_-W2RQ2KAQ@mail.gmail.com \
--to=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=willy@infradead.org \
--cc=yosryahmed@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