Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp85754lqc; Thu, 7 Mar 2024 11:01:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVh0gaQKC07WYYC8PXZbSzFFD9fjIgXS6afM/UJbFsHG6O8XozygwCeC6NzEDX6UEGsDVVaoQDg9hJbAvAw0YW5KugUi+px5IltzAEzqQ== X-Google-Smtp-Source: AGHT+IHi398xfYLq9bqmdUpHcjtsjbCdWXLa5wa8cCMYWy4yZs/6xq6ye84XTo7NHphvqP+4pm8P X-Received: by 2002:a17:906:2bc2:b0:a45:a7d4:fdc8 with SMTP id n2-20020a1709062bc200b00a45a7d4fdc8mr5717618ejg.72.1709838069964; Thu, 07 Mar 2024 11:01:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709838069; cv=pass; d=google.com; s=arc-20160816; b=xwORPu508s6F3jevKTFTChOTglIea4fzl497ZJ49s7FY/hNuV3wtxRZ+BEvHy+yOui rLm/bHue70Tb0PHsqyRebMLwvplR6pZmJyV65YIy4h4v+ERkmplmL2hWpOpxbJMZJwbf ao2Bx4gTTtjVXCdIUOXJ1agnzmzh49A42fKFiip7pxn9A1/qK6FL1l36ooigYqtciKXl 83zwwwFrCY1jJr6Bq1PUdLhAigGQN/sjKYGE/TzEvnyBQu9uS+i0UWzH2XrphODFXT20 3iL65oyhz6PhgFaRGf9gaxzuoF0Uufc9U58qGm2A61jtVpXS6YUgzSnzBsb2FDtt5EaP UHVA== 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=eeXKTioIgXUjdPwc+iHseBtp0Oqti17An69DDQBjfP4=; fh=9dllI/anPfaIHakwudS2RqE32kJdvDPE/NHRB/FwrJs=; b=LmTaxB8Iv+wd+XbR7+5GEfjMMCMjYan1tlIOlpz3/3lYdoRSfougNOZ2CTGN7uEqS3 Wcw9rSL6BMBQ04JOoInNPTXrUWnoHLQKEnQPHV2/1Hm061uBNyTJTiU3xiczZBYsp63O DVpkJyGO4U5qu0mwQdEW2e3uBcRVc+W9EaTaA0xGmpW+NWucSOmhszzTgzfT0IyFOnD1 X97egPqedLfCOWWjvUiE1An7dD8BBP/7VhNkxQIeJ3HF5ll6Iw4I7n9vnLMWwzRb0avp momOBDaA7nI9RGF8zpSY9a5qyaPVvRg4hUWUJYcdr8Tktv0IL+x680Mk9PVlWLbftNgA 4TzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YYqyygud; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96046-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96046-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 q8-20020a170906b28800b00a45ccf40f88si845095ejz.483.2024.03.07.11.01.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 11:01:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96046-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=YYqyygud; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96046-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96046-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 889F01F21F36 for ; Thu, 7 Mar 2024 19:01:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D7AD135A70; Thu, 7 Mar 2024 19:01:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YYqyygud" 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 53F98135A46 for ; Thu, 7 Mar 2024 19:01:03 +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=1709838063; cv=none; b=srrsKKVk0GARgtUFbJ1+3zXEq/gTVjufsgs9R6fimhkR5R5D3s5/BXfzFtazz7Fa59MkdOB551XduEFgHTOh19b6b3OkOfLt0yWqD57RYl9vGLshVAEoiZv2n6GRk6OFLAUw+HUyO5ZeL/UNGwCjPclIM8WDueXGpaZMRsjbhiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709838063; c=relaxed/simple; bh=xqdCq5jKU4ORzMILrNtu9YOfneH1J2iFlj3zsYmWy4U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TTQul22TnDXbPEKVQ1gZ4rH9NUdwX5Pl607XVCRwsFPRJD/6jtXQX3lIYI+/60cbccrLga1gpDGEGXgXfyXBNoQVJZA2WjRGSQO+njJchNzVjLRw9K3D+EGTx0IaSanKX5GXCtqg/pH//hDroNxa2S8V8IO2HD7Pe2OqjbCoZtQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YYqyygud; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA86BC433C7; Thu, 7 Mar 2024 19:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709838062; bh=xqdCq5jKU4ORzMILrNtu9YOfneH1J2iFlj3zsYmWy4U=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=YYqyygudPMviN+nhtYpCH71pOTredcthSYaA3x3x4YyvKbXYJHfcEt3QZXk9UcalH sqsWcBFmCMTgjUFIZQXgGSytO7ASU1oV/+BM2kLnKrgk3XIlrBdfl6TITIlDZMst2r SIWA1xLPygIlDoZ5uXgtsb7p/Z9Z0baVYkeEQ38qvIEuXbWHfBYdfmPxOwZpP08VLD plLbiRQReVXvWsWqt2hAg9tef0Tduk39i+bo88SUGpq74KFd7BUfBRGX0CkNtyNgEq /7S/WybN823vswsIqxKIlqzDj9zOPEF4TTjPnpyWPzr7rmMa3rdWRf6A9QMunA8D3p nXtYbzmVDylxQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 5E7B3CE0716; Thu, 7 Mar 2024 11:01:02 -0800 (PST) Date: Thu, 7 Mar 2024 11:01:02 -0800 From: "Paul E. McKenney" To: Joel Fernandes Cc: Ankur Arora , linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.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: <63380f0a-329c-43df-8e6c-4818de5eb371@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20240213055554.1802415-1-ankur.a.arora@oracle.com> <20240213055554.1802415-27-ankur.a.arora@oracle.com> <65e3cd87.050a0220.bc052.7a29@mx.google.com> <87frx514jz.fsf@oracle.com> <12a20651-5429-43df-88d7-9d01ff6212c6@joelfernandes.org> 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: <12a20651-5429-43df-88d7-9d01ff6212c6@joelfernandes.org> On Wed, Mar 06, 2024 at 03:42:10PM -0500, Joel Fernandes wrote: > Hi Ankur, > > On 3/5/2024 3:11 AM, Ankur Arora wrote: > > > > Joel Fernandes writes: > > > [..] > >> IMO, just kill 'voluntary' if PREEMPT_AUTO is enabled. There is no > >> 'voluntary' business because > >> 1. The behavior vs =none is to allow higher scheduling class to preempt, it > >> is not about the old voluntary. > > > > What do you think about folding the higher scheduling class preemption logic > > into preempt=none? As Juri pointed out, prioritization of at least the leftmost > > deadline task needs to be done for correctness. > > > > (That'll get rid of the current preempt=voluntary model, at least until > > there's a separate use for it.) > > Yes I am all in support for that. Its less confusing for the user as well, and > scheduling higher priority class at the next tick for preempt=none sounds good > to me. That is still an improvement for folks using SCHED_DEADLINE for whatever > reason, with a vanilla CONFIG_PREEMPT_NONE=y kernel. :-P. If we want a new mode > that is more aggressive, it could be added in the future. This would be something that happens only after removing cond_resched() might_sleep() functionality from might_sleep(), correct? Thanx, Paul > >> 2. you are also planning to remove cond_resched()s via this series and leave > >> it to the scheduler right? > > > > Yeah, under PREEMPT_AUTO, cond_resched() will /almost/ be not there. Gets > > defined to: > > > > static inline int _cond_resched(void) > > { > > klp_sched_try_switch(); > > return 0; > > } > > > > Right now, we need cond_resched() to make timely forward progress while > > doing live-patching. > > Cool, got it! > > >> Or call it preempt=higher, or something? No one is going to understand the > >> meaning of voluntary the way it is implied here IMHO. > > > > I don't think there's enough to make it worth adding a new model. For > > now I'm tending towards moving the correctness parts to preempt=none and > > making preempt=voluntary identical to preempt=none. > > Got it, sounds good. > > > Thanks for the review. > > Sure! Thanks for this work. Looking forward to the next series, > > - Joel >