From: "Huang, Kai" <kai.huang@intel.com>
To: "linux-sgx@vger.kernel.org" <linux-sgx@vger.kernel.org>,
"haokexin@gmail.com" <haokexin@gmail.com>,
"x86@kernel.org" <x86@kernel.org>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"pavel@ucw.cz" <pavel@ucw.cz>,
"mingo@redhat.com" <mingo@redhat.com>,
"jarkko@kernel.org" <jarkko@kernel.org>,
"rafael@kernel.org" <rafael@kernel.org>,
"bp@alien8.de" <bp@alien8.de>
Subject: Re: [PATCH] x86/sgx: Remove unnecessary try_to_freeze()
Date: Wed, 13 Dec 2023 11:52:49 +0000 [thread overview]
Message-ID: <300f4f5aac293a843fcffca2ff6154edfe16ad69.camel@intel.com> (raw)
In-Reply-To: <20231213090343.1070577-1-haokexin@gmail.com>
On Wed, 2023-12-13 at 17:03 +0800, Kevin Hao wrote:
> A freezable kernel thread can enter frozen state during freezing by
> either calling try_to_freeze() or using wait_event_freezable() and its
> variants. However, there is no need to use both methods simultaneously.
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> ---
> arch/x86/kernel/cpu/sgx/main.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
> index 166692f2d501..318165b3ff78 100644
> --- a/arch/x86/kernel/cpu/sgx/main.c
> +++ b/arch/x86/kernel/cpu/sgx/main.c
> @@ -404,9 +404,6 @@ static int ksgxd(void *p)
> WARN_ON(__sgx_sanitize_pages(&sgx_dirty_page_list));
>
> while (!kthread_should_stop()) {
> - if (try_to_freeze())
> - continue;
> -
> wait_event_freezable(ksgxd_waitq,
> kthread_should_stop() ||
> sgx_should_reclaim(SGX_NR_HIGH_PAGES));
Reviewed-by: Kai Huang <kai.huang@intel.com>
prev parent reply other threads:[~2023-12-13 11:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 9:03 [PATCH] x86/sgx: Remove unnecessary try_to_freeze() Kevin Hao
2023-12-13 11:52 ` Huang, Kai [this message]
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=300f4f5aac293a843fcffca2ff6154edfe16ad69.camel@intel.com \
--to=kai.huang@intel.com \
--cc=bp@alien8.de \
--cc=haokexin@gmail.com \
--cc=jarkko@kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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).