Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1199642lqs; Fri, 14 Jun 2024 21:12:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKpPsSMKHxmmrN+zht7ENQ9893DT7sf6F5zIEfFUp2u/hg5/YadabGkhFym9ySP3fvwaqHPRyn0IxGK+9sXHSVCZ71P4pQUQBKkKO/RQ== X-Google-Smtp-Source: AGHT+IHVwgQywzWKGvEuiQreYVoU/ASgeB4rQ5GIJqoGj/amUP7NLSlkGwu/XJEv8Derh7cRfiNT X-Received: by 2002:a50:871c:0:b0:57c:8065:4aa5 with SMTP id 4fb4d7f45d1cf-57cbd6c6f4dmr2810006a12.28.1718424778338; Fri, 14 Jun 2024 21:12:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718424778; cv=pass; d=google.com; s=arc-20160816; b=QIXEZjwAFT9CLjfNe4d26AnL+mS5bSX+hWjwNArI5IcOyKENzpSxUCL64XexOivYL1 ObKy7x4bfMa71XXSlWKBxHDepig5GAN0NEI33HI2VO2bqrUF5ZGpXIvdp45/czVVqlxR RmhDS8R1QuKqvBMxPIUbX6wytuv4MPSRoboJm1GwqDxmWfBxZ5HhFTRkcPncNHq86zy3 r5I3sy9lS8zOlz5Jf5/q86LnKlWzaEKOAd2djvyUy41gz42us12URcrkBPe24VQsc1uU PYiLl++nBdynsD849cLnVpTplr869umwDFFl8LiG715FIu7+ACeGhzTv1QeyYwrT4mQu Yj+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Cmiivs9+4WenC6OP/1ZCnI/gkKg1dnHA0OIU4ZJ3byg=; fh=G4FFSJd6CSxc+T4H7vsajHHHsOkBtz8Mkgjx5h2rpNs=; b=ouEzA3DK/AAGj+puGrUYnFCvhsXqxXn09+uOXCn5j49rQcWV+nAWEXHvT8oXXCb+VS zdPciiS9Gi/a4lKREyTKa70tJTVg6CKs35vO+dlZ4242XcNWJ5oDFBkYsw16dHjLLV0W 8ocX/wPstRMRjDPCovyKhpFyTsDV/M4p2+KKnxTpPfi06GbN0fekriqcCjox47ZgyUA7 dvL7tfj58sO0RcO4ARahJcnlXTq1O9JRk34coVhcIrPPGHmLdMxhjFmndXw8eo66kgwu 2G3jD7CZBOi/UtnDgiLi9ek3dFaH1jau0oyt736Wh5DS2nH/91nqR5DgLigE4asS65AG jPmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PYbWvkuc; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-215638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215638-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb74fb524si2472219a12.378.2024.06.14.21.12.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 21:12:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PYbWvkuc; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-215638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215638-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B46151F23654 for ; Sat, 15 Jun 2024 01:45:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE3EB53BE; Sat, 15 Jun 2024 01:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PYbWvkuc" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FB761C2E; Sat, 15 Jun 2024 01:45:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718415927; cv=none; b=C2Pc4O2PytQ45JESGspuXf2SjWwRp0PpFjt58KMjbp6m1afuI66lDvABiottkPPGIezuksg75Zi0EE+NT6AAoGHdk62wcJjyYCuSOMtdF2cRTlp7TuHY1nfCEdi0cKdJrSe4QfBQvb5nr6BSlTbo4XAkS4GLsgE3h2shEoFt4v4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718415927; c=relaxed/simple; bh=7dVfBiT/JJ48FsOEeTVREWgxZ1AuTVYFkWiXwbQLL/Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J03OjpTt8iP8aCNc10zJuJa1Bm0w5ZRHK5XBvXeJSJR3nh4hIDtuBg2X6UKrrc8Y0CmJmEvbse0WxXHF0kb5EclH4l1d7jMNoYJpvYn8yQbTKsRoGKkM2Mm3N/NbLyGx6diyDIAgKTHm2+E+DeBrp1sB62A0kzqCG0je6p9tEHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=PYbWvkuc; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=Cmiivs9+4WenC6OP/1ZCnI/gkKg1dnHA0OIU4ZJ3byg=; b=PYbWvkucSg2aBQezLwmo+Qcd5e buXI3jXr9trafbVS5gAryDT/g51ZN2ZBHJAxUbhpaC2hB7zEs07wi7VegkBqFt449VYmSdHx7elSe WogNyhroF0DK54iaxAW50jWdlZDahTiZV5+Ls5WFRE8mrzX+a1Gce1UfgRgk+LFUxWnqraMHJ82U+ fjuNuq9GYv6VpVV9TPpSg4O/DlYpC/xa6zQU7QS5onXdbc6AjTRUO7+Q+u9isTmIEj0KMnjFgqrDf ebusEVDAofzzEFgSzUfwc/6aFrS74znvLxdtqTdMPASh9jObHTMaQX2D8eISlHn4iq1vMo6HzZ/MT vTtCcWSw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIITp-0000000HUbC-2ox1; Sat, 15 Jun 2024 01:45:21 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 38AF1300886; Sat, 15 Jun 2024 03:45:21 +0200 (CEST) Date: Sat, 15 Jun 2024 03:45:21 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: K Prateek Nayak , linux-kernel@vger.kernel.org, "Gautham R. Shenoy" , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Guo Ren , Michal Simek , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N. Rao" , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Andreas Larsson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , "Rafael J. Wysocki" , Daniel Lezcano , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Andrew Donnellan , Benjamin Gray , Frederic Weisbecker , Xin Li , Kees Cook , Rick Edgecombe , Tony Battersby , Bjorn Helgaas , Brian Gerst , Leonardo Bras , Imran Khan , "Paul E. McKenney" , Rik van Riel , Tim Chen , David Vernet , Julia Lawall , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-pm@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 00/14] Introducing TIF_NOTIFY_IPI flag Message-ID: <20240615014521.GR8774@noisy.programming.kicks-ass.net> References: <20240613181613.4329-1-kprateek.nayak@amd.com> <20240614092801.GL8774@noisy.programming.kicks-ass.net> <20240615012814.GP8774@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240615012814.GP8774@noisy.programming.kicks-ass.net> On Sat, Jun 15, 2024 at 03:28:14AM +0200, Peter Zijlstra wrote: > On Fri, Jun 14, 2024 at 12:48:37PM +0200, Vincent Guittot wrote: > > The main problem is that need_resched becomes somewhat meaningless > > because it doesn't only mean "I need to resched a task" and we have > > to add more tests around even for those not using polling > > True, however we already had some of that by having the wakeup list, > that made nr_running less 'reliable'. Doesn't using !idle_cpu() instead of need_resched() in those balance paths already do the right thing? Checking need_resched() as an indicator of it getting work is already a bit an assumption. Also, Ingo, idle_cpu() and friends don't really belong in syscalls.c...