From: Pavel Machek <pavel@ucw.cz>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Valentin Schneider <valentin.schneider@arm.com>,
Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 4.19 16/17] kthread: Extract KTHREAD_IS_PER_CPU
Date: Sun, 7 Feb 2021 00:25:08 +0100 [thread overview]
Message-ID: <20210206232508.GA27515@amd> (raw)
In-Reply-To: <20210205140650.464297049@linuxfoundation.org>
[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]
Hi!
> From: Peter Zijlstra <peterz@infradead.org>
>
> [ Upstream commit ac687e6e8c26181a33270efd1a2e2241377924b0 ]
>
> There is a need to distinguish geniune per-cpu kthreads from kthreads
> that happen to have a single CPU affinity.
>
> Geniune per-cpu kthreads are kthreads that are CPU affine for
> correctness, these will obviously have PF_KTHREAD set, but must also
> have PF_NO_SETAFFINITY set, lest userspace modify their affinity and
> ruins things.
>
> However, these two things are not sufficient, PF_NO_SETAFFINITY is
> also set on other tasks that have their affinities controlled through
> other means, like for instance workqueues.
>
> Therefore another bit is needed; it turns out kthread_create_per_cpu()
> already has such a bit: KTHREAD_IS_PER_CPU, which is used to make
> kthread_park()/kthread_unpark() work correctly.
>
> Expose this flag and remove the implicit setting of it from
> kthread_create_on_cpu(); the io_uring usage of it seems dubious at
> best.
AFAIK this should not be in 4.19/5.10 as it does not fix anything w/o
5ba2ffba13a1e. Nobody calls kthread_is_per_cpu() in those kernels.
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2021-02-06 23:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 14:07 [PATCH 4.19 00/17] 4.19.174-rc1 review Greg Kroah-Hartman
2021-02-05 14:07 ` [PATCH 4.19 01/17] net: dsa: bcm_sf2: put device node before return Greg Kroah-Hartman
2021-02-05 14:07 ` [PATCH 4.19 02/17] ibmvnic: Ensure that CRQ entry read are correctly ordered Greg Kroah-Hartman
2021-02-05 14:07 ` [PATCH 4.19 03/17] ACPI: thermal: Do not call acpi_thermal_check() directly Greg Kroah-Hartman
2021-02-05 14:07 ` [PATCH 4.19 04/17] sysctl: handle overflow in proc_get_long Greg Kroah-Hartman
2021-02-05 14:07 ` [PATCH 4.19 05/17] net_sched: gen_estimator: support large ewma log Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 06/17] phy: cpcap-usb: Fix warning for missing regulator_disable Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 07/17] platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on Estar Beauty HD tablet Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 08/17] platform/x86: intel-vbtn: Support for tablet mode on Dell Inspiron 7352 Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 09/17] x86: __always_inline __{rd,wr}msr() Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 10/17] scsi: scsi_transport_srp: Dont block target in failfast state Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 11/17] scsi: libfc: Avoid invoking response handler twice if ep is already completed Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 12/17] mac80211: fix fast-rx encryption check Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 13/17] scsi: ibmvfc: Set default timeout to avoid crash during migration Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 14/17] selftests/powerpc: Only test lwm/stmw on big endian Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 15/17] objtool: Dont fail on missing symbol table Greg Kroah-Hartman
2021-02-05 14:08 ` [PATCH 4.19 16/17] kthread: Extract KTHREAD_IS_PER_CPU Greg Kroah-Hartman
2021-02-06 23:25 ` Pavel Machek [this message]
2021-02-05 14:08 ` [PATCH 4.19 17/17] workqueue: Restrict affinity change to rescuer Greg Kroah-Hartman
2021-02-05 22:54 ` [PATCH 4.19 00/17] 4.19.174-rc1 review Pavel Machek
2021-02-06 14:43 ` Naresh Kamboju
2021-02-06 16:01 ` Guenter Roeck
2021-02-07 13:25 ` Jon Hunter
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=20210206232508.GA27515@amd \
--to=pavel@ucw.cz \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=valentin.schneider@arm.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;
as well as URLs for NNTP newsgroup(s).