Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp748872lql; Mon, 11 Mar 2024 17:04:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtGql86xLDR5vABCkfIBZRACtjPT+5vJJuUVQ3F6YUfS7NnpkqBN60bOjKfbRn6IxByAK1hsv0WmrM93WhmQ23CYtqMWmdo/s/EnANDA== X-Google-Smtp-Source: AGHT+IHN4nRSKXXulGTT0LbU+Zp97KVWgW1ineP0Ow3Ryk9AZa61GQT9KK4zAnQNThv82GaNfge3 X-Received: by 2002:a17:907:8906:b0:a46:2754:dbc2 with SMTP id rs6-20020a170907890600b00a462754dbc2mr2545196ejc.14.1710201845434; Mon, 11 Mar 2024 17:04:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710201845; cv=pass; d=google.com; s=arc-20160816; b=c82+LiuJ4Ti3YsOMkBhqCtkhSuTXGlmgDTO5MrhMMRap4LhkKxjSnra/yr9EREj8sc ZhX5CMLrxWy6gutsflKWWvh+OpvKpzg/gTg15A3Kmjolk+AYJ4tiw/0+cat2W5XbE6Zl 6qbmj0QgqfkMxFqOaoEKdIhxJKgc695jITSH1Ip4vC17fu4lnMUCIQrSg9C22m5wN4o3 PY4CIabJLApJ6FqiCkc8CP8tQDPzOqSKI+q8E8mp2LWPWn1a0yHasrl5m4wPJ4PC4a47 HgnPtaE896omJU/am0seq0WuAMFU0mrkjMVnyESKu1j2aFgEOWDrOSJiMn4OGcYWBwCP kpow== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Fl5tdNFezuEPgCP/q7C30x45x4KUnUoE+p13NifR4lY=; fh=HjYmoREdBztn4LRI9+nEzyITGEaCsD5J3tZMdJogcCQ=; b=ViGiU9ne4dTJYc+ig9snNdUa0PyN0DufhB9cvpEtBtddWQmfeh4pqM/2zP4Y1SJAZv Kj8sKaE9M38sRHlaiUWnKQlQWlJmEuj4xRdGSzR/rD9Gm+TbJPL52jj8cZCv9e6ErLu8 6x4vK1UHcsTQIdpZyTVH1rBkt+DIhi9gD4/s8rHAUniFL0AMgI3LEsJdDJhT77W1rtkl CGm73LEqJPaXszZIVOED/35Zszg6tA2y18lgzmvblGMz7tn32tQdI9ikyaEhZ5YPZ7n8 uDi45EJUhOWysQV6LpMBHCVXWqgitGCiDgVDZeGbu3jQuFfEIaPHkX+uRRUlQJPLR4nN Q+gA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G4wt9IcV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 v19-20020a1709063bd300b00a45e92149bfsi2907247ejf.603.2024.03.11.17.04.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 17:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99685-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=@kernel.org header.s=k20201202 header.b=G4wt9IcV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 25EA41F21F0A for ; Tue, 12 Mar 2024 00:04:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EA869455; Tue, 12 Mar 2024 00:03:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G4wt9IcV" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 434FB8F40 for ; Tue, 12 Mar 2024 00:03:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710201838; cv=none; b=UM+/i8Mzen//eGYXH8PhZ2gGHgKi3+/m5FlHbd4MQLVsHiusPIPtdBiGMIhO2ewi/K9iP2EdMHcmqDsj4lT83zSrt5d/vC8sVTNBGtiyUAXDbATy3n3NBIMIrjo28PKVg5cmXhXQK4tPJu2TBo+gSoNFgJeGy2Mrlr0bNxC3A2M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710201838; c=relaxed/simple; bh=iWI7eirf2P5weWGviJSXIz79p1ZWQJpxDdxTs6MwCZ0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tasxdinNXm/ZLWLR20WhTydhY0HcWchoDlTYNo1SnNueVXXnpKdTs7lmD+1bmbDoO6hLdOx7vCKZMuxXCSv44dfQ+VSI4HtCqGGpKlbGXpOnWRHnXaOylp8Q87/nyqMoigijkxvwrCZ0LRfT8r5D6a1Sn6vPaUw9xtN9lOnx8E8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G4wt9IcV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE201C433C7; Tue, 12 Mar 2024 00:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710201837; bh=iWI7eirf2P5weWGviJSXIz79p1ZWQJpxDdxTs6MwCZ0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=G4wt9IcVDIZ8xVxg05yXWLC9Po+YlHwG3JzRoa0pQnM4CadBmvrCsYdM3OH9GsXOC xFBtiQ+E7NQylsH5IU832ITNJAw/cdhW7Zoa+1rDAUFJPG6TIhCbLHoTbqwEj9IHKZ r5y2E8n0nmgmq81zw/cR10v61LT3oj1i2Za/uTbE2SItf/W7qNu+/iWmSfCfl5VI/G eMLThWNyCuCHevSAgyumL5CkN1kK+gIx9BUno+/67tNh5B+K0l2Lsk8jYVTShFqGj1 RsRCvZSQ5SF5iyov0yDn2PFbRNfrkMg7yAPCXQ7NLxYVaK5/RPhuCQmxGF+RhPG60O Ry5plBcskaiew== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 5AAB4CE1A25; Mon, 11 Mar 2024 17:03:57 -0700 (PDT) Date: Mon, 11 Mar 2024 17:03:57 -0700 From: "Paul E. McKenney" To: Linus Torvalds Cc: Ankur Arora , Joel Fernandes , linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jpoimboe@kernel.org, mark.rutland@arm.com, jgross@suse.com, andrew.cooper3@citrix.com, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@aculab.com, richard@nod.at, mjguzik@gmail.com, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Subject: Re: [PATCH 26/30] sched: handle preempt=voluntary under PREEMPT_AUTO Message-ID: <85cba8bd-5d2f-4da2-b4f9-93ae7c6a2a45@paulmck-laptop> Reply-To: paulmck@kernel.org References: <12a20651-5429-43df-88d7-9d01ff6212c6@joelfernandes.org> <63380f0a-329c-43df-8e6c-4818de5eb371@paulmck-laptop> <6054a8e0-eb95-45a3-9901-fe2a31b6fe4e@paulmck-laptop> <87plw5pd2x.fsf@oracle.com> <87wmq9mkx2.fsf@oracle.com> <36eef8c5-8ecd-4c90-8851-1c2ab342e2bb@paulmck-laptop> <87cys0il7x.fsf@oracle.com> 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: On Mon, Mar 11, 2024 at 01:23:09PM -0700, Linus Torvalds wrote: > On Mon, 11 Mar 2024 at 13:10, Ankur Arora wrote: > > > > Ah, I see your point. Basically, keep the lazy semantics but -- in > > addition -- also provide the ability to dynamically toggle > > cond_resched(), might_reshed() as a feature to help move this along > > further. > > Please, let's not make up any random hypotheticals. > > Honestly, if we ever hit the hypothetical scenario that Paul outlined, let's > > (a) deal with it THEN, when we actually know what the situation is > > (b) learn and document what it is that actually causes the odd behavior > > IOW, instead of assuming that some "cond_resched()" case would even be > the right thing to do, maybe there are other issues going on? Let's > not paper over them by keeping some hack around - and *if* some > cond_resched() model is actually the right model in some individual > place, let's make it the rule that *when* we hit that case, we > document it. > > And we should absolutely not have some hypothetical case keep us from > just doing the right thing and getting rid of the existing > cond_resched(). > > Because any potential future case is *not* going to be the same > cond_resched() that the current case is anyway. It is going to have > some very different cause. Fair enough, and that approach just means that we will be reaching out to Ankur and Thomas sooner rather than later if something goes sideways latency-wise. ;-) Thanx, Paul