linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
To: Kevin Hao <haokexin@gmail.com>
Cc: linux-nilfs@vger.kernel.org,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	 Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH] nilfs2: Add missing set_freezable() for freezable kthread
Date: Mon, 18 Dec 2023 00:49:58 +0900	[thread overview]
Message-ID: <CAKFNMonsfd1wm2EtWJAQi0o5deBB_2U3US=yVOZVU9oMXH0ixA@mail.gmail.com> (raw)
In-Reply-To: <20231217135024.3116955-1-haokexin@gmail.com>

On Sun, Dec 17, 2023 at 10:50 PM Kevin Hao wrote:
>
> The kernel thread function nilfs_segctor_thread() invokes
> the try_to_freeze() in its loop. But all the kernel threads are
> non-freezable by default. So if we want to make a kernel thread to be
> freezable, we have to invoke set_freezable() explicitly.
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> ---
>  fs/nilfs2/segment.c | 1 +
>  1 file changed, 1 insertion(+)

Thank you!
I'll grab this and send it upstream.

Ryusuke Konishi

>
> diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
> index 52995838f2de..2590a0860eab 100644
> --- a/fs/nilfs2/segment.c
> +++ b/fs/nilfs2/segment.c
> @@ -2588,6 +2588,7 @@ static int nilfs_segctor_thread(void *arg)
>                    "segctord starting. Construction interval = %lu seconds, CP frequency < %lu seconds",
>                    sci->sc_interval / HZ, sci->sc_mjcp_freq / HZ);
>
> +       set_freezable();
>         spin_lock(&sci->sc_state_lock);
>   loop:
>         for (;;) {
> --
> 2.39.2
>

  reply	other threads:[~2023-12-17 15:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-17 13:50 [PATCH] nilfs2: Add missing set_freezable() for freezable kthread Kevin Hao
2023-12-17 15:49 ` Ryusuke Konishi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-19  9:09 Ryusuke Konishi

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='CAKFNMonsfd1wm2EtWJAQi0o5deBB_2U3US=yVOZVU9oMXH0ixA@mail.gmail.com' \
    --to=konishi.ryusuke@gmail.com \
    --cc=haokexin@gmail.com \
    --cc=linux-nilfs@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).