From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F1DDC4332F for ; Wed, 8 Nov 2023 15:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232999AbjKHPP6 (ORCPT ); Wed, 8 Nov 2023 10:15:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232509AbjKHPPz (ORCPT ); Wed, 8 Nov 2023 10:15:55 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7214F1BEB for ; Wed, 8 Nov 2023 07:15:53 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59755C433C9; Wed, 8 Nov 2023 15:15:49 +0000 (UTC) Date: Wed, 8 Nov 2023 10:15:52 -0500 From: Steven Rostedt To: David Laight Cc: 'Ankur Arora' , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "peterz@infradead.org" , "torvalds@linux-foundation.org" , "paulmck@kernel.org" , "linux-mm@kvack.org" , "x86@kernel.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" , "jon.grimm@amd.com" , "bharata@amd.com" , "raghavendra.kt@amd.com" , "boris.ostrovsky@oracle.com" , "konrad.wilk@oracle.com" , "jgross@suse.com" , "andrew.cooper3@citrix.com" , "mingo@kernel.org" , "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" , "richard@nod.at" , "mjguzik@gmail.com" Subject: Re: [RFC PATCH 00/86] Make the kernel preemptible Message-ID: <20231108101552.7ebbb52d@gandalf.local.home> In-Reply-To: References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Nov 2023 09:43:10 +0000 David Laight wrote: > > Policies: > > > > A - preemption=none: run to completion > > B - preemption=voluntary: run to completion, unless a task of higher > > sched-class awaits > > C - preemption=full: optimized for low-latency. Preempt whenever a higher > > priority task awaits. > > If you remove cond_resched() then won't both B and C require an extra IPI. > That is probably OK for RT tasks but could get expensive for > normal tasks that aren't bound to a specific cpu. What IPI is extra? > > I suspect C could also lead to tasks being pre-empted just before > they sleep (eg after waking another task). > There might already be mitigation for that, I'm not sure if > a voluntary sleep can be done in a non-pre-emptible section. No, voluntary sleep can not be done in a preemptible section. -- Steve