Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1556591ybz; Sat, 2 May 2020 02:33:06 -0700 (PDT) X-Google-Smtp-Source: APiQypKMg+AYV2RjBz/m9iwIvUYCMnEJSG95kX5l4Osw5UjJYEDJqIz/IY/cIiAmndhs8s8lG11M X-Received: by 2002:a50:e70a:: with SMTP id a10mr7182663edn.124.1588411986567; Sat, 02 May 2020 02:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588411986; cv=none; d=google.com; s=arc-20160816; b=dl82rOAd6tNLHwjOXzvzPB9nt7bTZ3T313Tpu8RQ6Q3OV21Bw/2gPz5C1YBtbAyOUm BG+X6qK4ic3Hh6OUk0olJsxNdoVLLANptjJeZHdYkdGRYR90DFc7FkU/T3blqBFInHyl BhRRrSVFAaw+PlcGmIgAMGaYCjeUn2YcbuTT1wJmY7CDuqlnywL1SaT8UUUa03DaFhlS ss1NyJ2LKObmJ7exo+4bsYH8h32JCTEyrQ5vohJyTwz0C1ndcMnPfLZrZ7fFr8h/NOFv DARHKBL6WBsUvz53tfuViEEEPnqCMhqye9rg7x0EJwC4HD3ZPTFKfKgNWWpoZ5kYCFLk cLkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=L5IU7gLDofU3mBI/dmON/IMvflnwzIVfMkww7fo2aHE=; b=G/EBFgOOEbqOL6PB3nKHfx8AlOQMkKZVOHcbKf3Kniaw5DpExLsssupncekayFrAaO PqyNxGx2rxfOfaFIJAImAmtIEHoyrg6mgXfYBpaJsv9Gillb49oHLucEsMJ/CKlWkTgN RgVXNR8np5EnCgaURYnDw9GfeS6vtb1+aPaqPnR9eOwjv6itlR/hI6Ex/iYuRZdooY7l gy3RbFP6nQHHPvSHFUfyniYIsGpE1vr1f1vNnQQ+Tj5iOQFk7WGf35FtwY8ss+O/zbs2 GOpHmKZTXYS3BEVafPyZnM5j9HCH/q3puByYjJe705alINy8xxIyjCt4fS2IacjudzsV 7WkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Gly6yMOZ; 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 a6si3134396ejx.373.2020.05.02.02.32.42; Sat, 02 May 2020 02:33:06 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Gly6yMOZ; 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 S1727092AbgEBJbT (ORCPT + 99 others); Sat, 2 May 2020 05:31:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgEBJbT (ORCPT ); Sat, 2 May 2020 05:31:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A019C061A0C for ; Sat, 2 May 2020 02:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=L5IU7gLDofU3mBI/dmON/IMvflnwzIVfMkww7fo2aHE=; b=Gly6yMOZa52CzInVASHDubUAAY WdAk+238+rlWHsbrbqhzDnWLMRlK9I5QqfimqlvI0CYyulDvRnJ6qBQ/reGqUxIdjXlvCrhd3tLU9 XRFj1F+K1aaWl6iAj1Gahc3uXz8uu3TDPg93CELlS4hDuqNct2Pmo8j7stk1AeFDbtMAq7X2p0uIe fzQIfG2mviyR5FjYQjD3bh/U7e49wE0y8V1Xjx9MBcM18qvgF6dM3KqQez4Y8p6AOXJ5/Ov18zO+K Z863d+ayxqNxqSGPado40BbYyJAUReqYhI44F5K5NHiTF6vu93hbu4Nqyk+gnURXL0lGp9CrPES4L 8umgopbw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUoUG-0004Ky-UN; Sat, 02 May 2020 09:31:09 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E3B4A300130; Sat, 2 May 2020 11:31:05 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CA3CD20AED123; Sat, 2 May 2020 11:31:05 +0200 (CEST) Date: Sat, 2 May 2020 11:31:05 +0200 From: Peter Zijlstra To: Davidlohr Bueso Cc: akpm@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, mgorman@techsingularity.net, bp@suse.de, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH] kernel/sys: do not use tasklist_lock to set/get scheduling priorities Message-ID: <20200502093105.GJ3762@hirez.programming.kicks-ass.net> References: <20200502030539.32581-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200502030539.32581-1-dave@stgolabs.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 01, 2020 at 08:05:39PM -0700, Davidlohr Bueso wrote: > For both setpriority(2) and getpriority(2) there's really no need > to be taking the tasklist_lock at all - for which both share it > for the entirety of the syscall. The tasklist_lock does not protect > reading/writing the p->static_prio and task lookups are already rcu > safe, providing a stable pointer. RCU-safe, as in, it will not crash.. However, without tasklist_lock the thread iterations (for PRIO_PGRP/PRIO_USER) now race against fork(). That is a user observable change in behaviour. Do we care about it? No idea, and your Changelog also doesn't provide clue.