Received: by 2002:aa6:c46f:0:b029:96:faae:e639 with SMTP id i15csp333676lkq; Thu, 5 Nov 2020 03:48:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+XISsJUfQQIs9UT5zKQX4M29aE2DrDFfGEbSBG3H9oZOQean2N+aD4Ru23Elw+1sAxIcT X-Received: by 2002:a17:906:7e55:: with SMTP id z21mr299697ejr.154.1604576883728; Thu, 05 Nov 2020 03:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604576883; cv=none; d=google.com; s=arc-20160816; b=01npdQRf9TfIbgJWCMjXoxUX8+q43GCYbNjmHosC6yB39QimirW8Hzk5uuLNnXa8oL 1WnMByVD/whk0cKw8lwHSI4MuCW4ar5xmKj152fiOU36OpcClmbud64g+MdJj6loDx2f Sj5PYwRreUykiNUgO7uevLDgusCoVz1pZPYRC8gq0qNQ5EqTQ8B3euSt5n5V39HA9FCn Ef71jDZniGNAYCYQSDph8w+gefJBPnhk8Zx1vVBBx9J254L3+fCKVnDcW1LsunNinKo3 /7dJbuJ4xQbfLaxnJQn1hWE/L8cayWgi4Tu4Cut/yBTDHSh0GBAnwj/iPqgXrhtY9iMG 78VA== 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=/sdn4G2f/yZT2/k7J2ab0Uru29WRG8aauKbEsZBSG+Q=; b=MQs7d5TiO/wr52Kc/IuFx0g8J0ay6iCnEALKfYCft7tYje5OpxyjQNHYJPpsA5EhDh qL0Yf2iLTHCqrP08jff8xDkvBYiw4P4M7+koUXTTJUJB1/V27I15jmjjh4uoGYsbPnb1 2isarQw50RGJqrMjtnftrl9CTKIel0mhAh5ldOjNgvlQmNW1BCC6IsgmtVeRp++Xqraa nJbUSLDQ8qEcRUTj4T8fZLdSYSJZ0BFUHa73poqcSk1cL27/1ljN+9YCcGNYo+lSRGZp g/T9RfQCN7JBGj7lR2WYC51H9l4jjDPVtHfzTtfQ404bGlL+mISZoqLHh8ltlXPoMwa8 SLuw== 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 lz6si886662ejb.116.2020.11.05.03.47.40; Thu, 05 Nov 2020 03:48:03 -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 S1730069AbgKELoS (ORCPT + 99 others); Thu, 5 Nov 2020 06:44:18 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:59150 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726665AbgKELoN (ORCPT ); Thu, 5 Nov 2020 06:44:13 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id B120A1C0B82; Thu, 5 Nov 2020 12:44:08 +0100 (CET) Date: Thu, 5 Nov 2020 12:44:08 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Nicholas Piggin , "David S. Miller" , Michael Ellerman , Sasha Levin Subject: Re: [PATCH 4.19 057/191] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race Message-ID: <20201105114408.GA9009@duo.ucw.cz> References: <20201103203232.656475008@linuxfoundation.org> <20201103203240.110227839@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <20201103203240.110227839@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Nicholas Piggin >=20 > [ Upstream commit bafb056ce27940c9994ea905336aa8f27b4f7275 ] =2E.. > io_uring 2b188cc1bb857 ("Add io_uring IO interface") added code which > does a kthread_use_mm() from a mmget_not_zero() refcount. =2E.. > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The > optimisation could be effectively restored by sending IPIs to mm_cpumask > members and having them remove themselves from mm_cpumask. This is more > tricky so I leave it as an exercise for someone with a sparc64 SMP. > powerpc has a (currently similarly broken) example. So this removes optimalization from Sparc, because it clashes with 2b188cc1bb857 ("Add io_uring IO interface"). But that commit is not present in 4.19... so this probably is not good idea. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCX6PliAAKCRAw5/Bqldv6 8n98AJ9Uc+NmgNmzCQI3QdHmr+ziaK4ztwCfUlXuJoy1lBQzAM9E15amAF34hYU= =m0CZ -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--