From: Oleg Nesterov <oleg@redhat.com>
To: Zihuan Zhang <zhangzihuan@kylinos.cn>
Cc: Peter Zijlstra <peterz@infradead.org>,
"rafael J . wysocki" <rafael@kernel.org>,
len brown <len.brown@intel.com>, pavel machek <pavel@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] PM / Freezer: Skip zombie/dead processes to reduce freeze latency
Date: Thu, 17 Jul 2025 03:43:57 +0200 [thread overview]
Message-ID: <20250717014356.GG16401@redhat.com> (raw)
In-Reply-To: <f5985910-d175-4c51-90b6-9d087a59936b@kylinos.cn>
On 07/17, Zihuan Zhang wrote:
>
> The main reason we didn’t rely directly on PF_NOFREEZE is that it’s a
> mutable flag — in some cases, it can be cleared later, which makes early
> skipping potentially unsafe.
Afaics userspace tasks can only set PF_NOFREEZE in do_task_dead() and never
clear it.
Apart from lock_system_sleep(). That is why (I think) Peter rightly suggests
to take system_transition_mutex in this function earlier.
> In contrast, exit_state is stable and skipping tasks based on it is safe.
I don't think it is really safe...
Oleg.
next prev parent reply other threads:[~2025-07-17 1:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 6:26 [PATCH v4 0/1] PM / Freezer: Skip zombie/dead processes to reduce Zihuan Zhang
2025-07-16 6:26 ` [PATCH v4] PM / Freezer: Skip zombie/dead processes to reduce freeze latency Zihuan Zhang
2025-07-16 16:38 ` Oleg Nesterov
2025-07-16 18:36 ` Peter Zijlstra
2025-07-17 1:30 ` Zihuan Zhang
2025-07-17 1:43 ` Oleg Nesterov [this message]
2025-07-17 1:16 ` Zihuan Zhang
2025-07-17 1:31 ` Oleg Nesterov
2025-07-17 8:45 ` Zihuan Zhang
2025-07-16 12:26 ` [PATCH v4 0/1] PM / Freezer: Skip zombie/dead processes to reduce Rafael J. Wysocki
2025-07-17 1:02 ` Zihuan Zhang
2025-07-17 9:50 ` Rafael J. Wysocki
2025-07-21 10:39 ` Zihuan Zhang
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=20250717014356.GG16401@redhat.com \
--to=oleg@redhat.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=zhangzihuan@kylinos.cn \
/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.