All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeel.butt@linux.dev>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: brauner@kernel.org, djwong@kernel.org, cem@kernel.org,
	 akpm@linux-foundation.org, vbabka@kernel.org, surenb@google.com,
	mhocko@suse.com,  brendan.jackman@linux.dev, hannes@cmpxchg.org,
	ziy@nvidia.com, david@kernel.org,  qi.zheng@linux.dev,
	ljs@kernel.org, linux-xfs@vger.kernel.org,
	 linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 0/4] mm: replace PF_KCOMPACTD/PF_KSWAPD with kthread_func()
Date: Wed, 2 Sep 2026 08:31:44 -0700	[thread overview]
Message-ID: <aphBHnm7ejNM3aNR@linux.dev> (raw)
In-Reply-To: <20260902131653.1338227-1-wangkefeng.wang@huawei.com>

On Wed, Sep 02, 2026 at 09:16:49PM +0800, Kefeng Wang wrote:
> The task_struct->flags field is a limited 32-bit resource. Two flag bits,
> PF_KCOMPACTD and PF_KSWAPD, are used to identify whether a kernel thread
> is kcompactd or kswapd. Converting these to use kthread_func() frees up
> two valuable flag bits for future use.

I wouldn't call it a limited resource. We can have more fields in task_struct
but I like the cleanups.

> 
> Kefeng Wang (4):
>   xfs: remove dead kswapd flag inheritance from btree split worker
>   iomap: simplify writepages reclaim guard
>   mm: replace PF_KSWAPD flag with kthread_func() check
>   mm: replace PF_KCOMPACTD flag with kthread_func() check
> 
>  fs/iomap/buffered-io.c                   |  3 +--
>  fs/xfs/libxfs/xfs_btree.c                | 18 +-----------------
>  fs/xfs/xfs_platform.h                    |  4 ----
>  include/linux/compaction.h               | 11 ++++++-----
>  include/linux/sched.h                    |  4 ++--
>  include/linux/swap.h                     |  7 +------
>  mm/compaction.c                          |  9 ++++++---
>  mm/vmscan.c                              | 10 ++++++++--
>  tools/sched_ext/include/scx/common.bpf.h |  2 --
>  9 files changed, 25 insertions(+), 43 deletions(-)
> 
> -- 
> 2.55.0
> 

  parent reply	other threads:[~2026-09-02 15:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 13:16 [PATCH 0/4] mm: replace PF_KCOMPACTD/PF_KSWAPD with kthread_func() Kefeng Wang
2026-09-02 13:16 ` [PATCH 1/4] xfs: remove dead kswapd flag inheritance from btree split worker Kefeng Wang
2026-09-02 14:32   ` Christoph Hellwig
2026-09-02 15:33   ` Shakeel Butt
2026-09-02 13:16 ` [PATCH 2/4] iomap: simplify writepages reclaim guard Kefeng Wang
2026-09-02 14:32   ` Christoph Hellwig
2026-09-03 13:46     ` Kefeng Wang
2026-09-02 15:34   ` Shakeel Butt
2026-09-02 13:16 ` [PATCH 3/4] mm: replace PF_KSWAPD flag with kthread_func() check Kefeng Wang
2026-09-02 15:36   ` Shakeel Butt
2026-09-02 16:35   ` Vlastimil Babka (SUSE)
2026-09-02 16:39   ` Zi Yan
2026-09-10 11:56   ` David Hildenbrand (Arm)
2026-09-02 13:16 ` [PATCH 4/4] mm: replace PF_KCOMPACTD " Kefeng Wang
2026-09-02 15:37   ` Shakeel Butt
2026-09-02 16:36   ` Vlastimil Babka (SUSE)
2026-09-02 16:40   ` Zi Yan
2026-09-10 11:57   ` David Hildenbrand (Arm)
2026-09-02 15:31 ` Shakeel Butt [this message]
2026-09-02 20:44 ` [PATCH 0/4] mm: replace PF_KCOMPACTD/PF_KSWAPD with kthread_func() Andrew Morton
2026-09-03 13:37   ` [PATCH] xfs: fix NOFS state corruption in btree split worker Kefeng Wang
2026-09-03 13:52     ` Brian Foster
2026-09-04  0:41       ` Kefeng Wang
2026-09-04 11:57         ` Brian Foster
2026-09-10  5:47     ` Christoph Hellwig
2026-09-10  6:07       ` Darrick J. Wong
     [not found]     ` <20260910140742.833170-1-wangkefeng.wang@huawei.com>
     [not found]       ` <aqLqeTsbKBMEsl-G@bfoster>
2026-09-11  0:57         ` [PATCH] xfs: kill xfs_trans_set/clear_context() helpers Kefeng Wang
2026-09-11  7:12           ` Christoph Hellwig
2026-09-11 10:51             ` Kefeng Wang
2026-09-03 13:40   ` [PATCH 0/4] mm: replace PF_KCOMPACTD/PF_KSWAPD with kthread_func() Kefeng Wang

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=aphBHnm7ejNM3aNR@linux.dev \
    --to=shakeel.butt@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=brendan.jackman@linux.dev \
    --cc=cem@kernel.org \
    --cc=david@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=qi.zheng@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    --cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.