Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2988978pxb; Sat, 6 Feb 2021 15:27:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZGJxxEaY0rimNkw3Qro3WV8PMFSPKD9XuDf5LhiGD1Q31RSgm1IejAHHhLB6vjZZbth3k X-Received: by 2002:aa7:c94c:: with SMTP id h12mr10489774edt.40.1612654040140; Sat, 06 Feb 2021 15:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612654040; cv=none; d=google.com; s=arc-20160816; b=bSX1f7l7T7wW+z0P/1iXCO2/twmFch8yaxOPXr9Y1YEeJubIJODTb4bQEz8zzB9Mbl 6zRMYt43HT3bHtKcuUzr6cJBBOdhmx3tb+zCqfD9t5VqxORC/Qtz8n1PwXRKqWIQdufN kP+268OEBt8QSxbnHnYbU94nXAlZaeP8r8rI1eFKNo0tUoii990CUhzUFhs/CcWR/i+B KP8cQTDUBXNxVEMyAJ/SKDFbyfSIcGSnnwmd/jYnOfw5m5iMlVmxK/AlFM+xEaqJYwxK xRjs91u2u73/nbJUgMb26eA5NLzaLwef8Bf8/8klivRyY3XZAMrrfSHcBawprNeWNYyb YUWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=O2eaWIWs0UeI4ZGN8G/QxWzdDtDa046Z6nOuyzNEtwc=; b=BNcOGI3dY6aW8hgfzR+Z1kDQtzm6Mp+8UABwIcaGvmEuqSs2Uo0JNvtvMfzz8R/ipO AdihesPvQDPLPKIr6CNHjXNRfhiY92ljZOScFO4xadsLuDP7rxHJSo2C7fivzNRmZDKB xzfsV+Gu61272KdMe0H7F7r2DUnS1LBONc5uT8SEKHzBMSpG3QODlODN6C0dtmLnAKj3 vxtuFvwpyAf1jehlhs4BbRzSt6LWkEeiumhxdHrEI4ypCFiioxLDcfZ1RDu1BfJhAWBY wdOC1+4wY7BcM3NHDd6Vyni9WEJHq3gtH7P/LOxxOEShc9IXXJa6wtvgi/0rdGMV2uaI gkfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si163368edn.127.2021.02.06.15.26.56; Sat, 06 Feb 2021 15:27:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbhBFXZx (ORCPT + 99 others); Sat, 6 Feb 2021 18:25:53 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:56442 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbhBFXZw (ORCPT ); Sat, 6 Feb 2021 18:25:52 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 0B03E1C0B7C; Sun, 7 Feb 2021 00:25:09 +0100 (CET) Date: Sun, 7 Feb 2021 00:25:08 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Valentin Schneider , Sasha Levin Subject: Re: [PATCH 4.19 16/17] kthread: Extract KTHREAD_IS_PER_CPU Message-ID: <20210206232508.GA27515@amd> References: <20210205140649.825180779@linuxfoundation.org> <20210205140650.464297049@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <20210205140650.464297049@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Peter Zijlstra >=20 > [ Upstream commit ac687e6e8c26181a33270efd1a2e2241377924b0 ] >=20 > There is a need to distinguish geniune per-cpu kthreads from kthreads > that happen to have a single CPU affinity. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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 --=20 http://www.livejournal.com/~pavelmachek --/04w6evG8XlLl3ft Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmAfJVQACgkQMOfwapXb+vKIbgCgwhgFHYtEbIGxwQEqO/Hz8Nej 1QUAoIFCgZXOVP0o3W2xNOFMbJpI8S+q =T/1f -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--