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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A523FC02198 for ; Mon, 10 Feb 2025 22:15:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 11FE1280007; Mon, 10 Feb 2025 17:15:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F7BC280001; Mon, 10 Feb 2025 17:15:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F2827280007; Mon, 10 Feb 2025 17:15:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D5174280001 for ; Mon, 10 Feb 2025 17:15:43 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 6741C474C1 for ; Mon, 10 Feb 2025 22:15:43 +0000 (UTC) X-FDA: 83105442966.03.EEEF366 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf03.hostedemail.com (Postfix) with ESMTP id 7E41320004 for ; Mon, 10 Feb 2025 22:15:41 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of "SRS0=vbKj=VB=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=vbKj=VB=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739225741; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wJNQvSkUsIWNou9dlhVUWo4XJ8btEuj03gzIizywtx8=; b=Nlwek0AM7kHS7kFN1zrURzmzhPC6Z6MInFmiCEub3sf4KK5FOvvjC8cTRVU8IhuUQTHxKL 4dnLv1rLC4i6KX5eXGpYvm/+F1r4fJkKRZHao6XUgbAOFdNxJc9rOZR0OjWJAbfl3KAbnJ v8oSitWXbwBFrXG/GYLJTT04If5XX94= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of "SRS0=vbKj=VB=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=vbKj=VB=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739225741; a=rsa-sha256; cv=none; b=dm3q2TjXtxoDrrp3RtJY4AXxopuatZpRVZPQNOvAvnQgwqrK05vmN1GECFyWxS3BYr9ZM1 52SUhHiZs5druHAM5f85nHFCdyUXTJv3yVjbWM2xchCD2UyX0X5qaN9GjwJvQQrKWS4FU4 m38g79G3upDdQ7bTvfTNFnZ7ZAtMOlk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B9FB05C5F08; Mon, 10 Feb 2025 22:15:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59C9DC4CEE6; Mon, 10 Feb 2025 22:15:36 +0000 (UTC) Date: Mon, 10 Feb 2025 17:15:39 -0500 From: Steven Rostedt To: David Laight Cc: Sebastian Andrzej Siewior , Joel Fernandes , Prakash Sangappa , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Thomas Gleixner , Ankur Arora , Linus Torvalds , linux-mm@kvack.org, x86@kernel.org, Andrew Morton , luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.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 , Konrad Wilk , jgross@suse.com, Andrew.Cooper3@citrix.com, Vineeth Pillai , Suleiman Souhlal , Ingo Molnar , Mathieu Desnoyers , Clark Williams , daniel.wagner@suse.com, Joseph Salisbury , broonie@gmail.com Subject: Re: [RFC][PATCH 1/2] sched: Extended scheduler time slice Message-ID: <20250210171539.64268143@gandalf.local.home> In-Reply-To: <20250210220433.24f6c6c7@pumpkin> References: <9DA1FAE6-A008-4785-BDF9-541457E29807@joelfernandes.org> <20250204220418.35949317@gandalf.local.home> <20250205081635.397eacb0@gandalf.local.home> <20250206083039.0916ad24@gandalf.local.home> <20250206134408.lD_POjuG@linutronix.de> <20250210144321.1f5974a6@gandalf.local.home> <20250210220433.24f6c6c7@pumpkin> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Queue-Id: 7E41320004 X-Stat-Signature: 8ohnoceome4sig4ma8sq6wibiqtumx76 X-Rspamd-Server: rspam03 X-HE-Tag: 1739225741-152667 X-HE-Meta: U2FsdGVkX19zT3s9a4meUZaor10h8C1dJnam+5LKxnW4MGhbnfH/ZR0gAyoIdHaJrxOPaJcEudavGMmAGbhM5FQI0LoNhYSuVBLxBZbv6s95dYZXl11f2iiQRQY7OUEo1fKKOOxZasx7mbAu9J7fKTLct5OEWtXdYNew7WUgGdYaGECosOdyiOKo0NjlU6vwII1IaOkpOEeV8Uy9uFecoERJ2xch29Q7nxk4K00M51dxncArjxFbe5SsytOqlZDbphAM4ItdQHSizZTQB/Ul59oPhtMx7uHLyqryVfJS9R6e+gkj+CxOT+Lw1MzOy5nnX0MjXyWmhBnxXZFHnOWkhUEZyNT8Jt/QnKnEzTKF2QMWj+RTrPpPpRvzwtXiSgpjBl+QDZMu1iahKuR3eAUBJIBXXzZC7qPt9MTJcxRzXsLSianJwvRVPFka/TbEByaZ1Cb0EzvQ28ZCzlBpIdrQMh9WT09NxzlEoPvpv2NlTbWG/pNFcjMuHAHmj9o+Dms/S9cmyZukpyHCo9Mp71cX3kGhT4u1qqQaxXG+ATyrBTf90u8KNRuLqZW2Wu0v2GOnG2d21bqPbBwVnM+ly9Ui+VQJCdJn+xby8bXp/ATPy7fC9ReMnfxxpJIzFl1dDNlW7EGzOE2ri2uCeTrK3N1CP0Qk30KwF4NbxlMkQIKI4/jXGbfywEo3l7Y91kB0Tj0wOv7odTvSG84Z0E+5TSCE3tBxIyTUC6U0YIJaFz4uBbyt/C29RqAacjDAoslogf6b0/E/2ONY79jpA7E+eBKRkr5EXzD1qYSLtPSEiavTCk9MJ9p1vlUAjcK/8MyUYBWzcAto4ZYIU0sSCJAPsO7ypsMEVQ50CBdvd4DXKe56W1ff4FkrEXFEd4cHnuGjz2FD43I2RYJG87vhqfrAzYEjHm7rYeEUmS7x4p+gK66xMfwdtKajkUUupGAhLIdIjiS/FwfpiXWGgyP/Z5BMrbh Wk0yFCF9 19PZarayw7U9ybvDMtBc6lmhxb5uRNUE6N5PrE4yBDZbjyxKG52nRjXFtcz5AXY6jZFzcXKgG7TSOol0N6tF6A3Fofxy52E3wGsC8YIWi3Cb06SxABGCALUPhV0DCERLVNmXoWI1+avm2JwG2AAglnLdros4liyaSAlahe2IGYc8Z07DnikCyINAiWSEmGt0U4iT9ivhJMkPA+s+LJppWD0M8WE1id/+WkLCroQai10S/LaswJftvJEA8iJG5eK3UKoepA2DNycp7D82epo2olKBR0N/6NWlqa84fdqSIkh16tOzD/JbYWuN6l3KZeUAg6QgAvOwoZQfsUGZJgK0A/yNXpg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, 10 Feb 2025 22:04:33 +0000 David Laight wrote: > My 'gut feel' is that all the context switches with PREEMPT_RT add a significant > overhead. "gut feel" is normally not something we care about. You can have a gut feel to try new code, but it's the benchmarks and measurements that are the only input for actual decisions. > It might not matter if your system is lightly loaded (overspecified), > but if you need to run at 95%+ cpu then they will hit you hard. > > Maybe you can afford to drop softint and napi code to a high(ish) priority > thread, but I'd have thought that most interrupts should stay that way and > most spinlocks stay as spinlocks - and probably all disable interrupts! > Any interrupts that take 'a long time' or spinlocks that are held for 'a long time' > really need changing anyway. There's a lot of users of PREEMPT_RT where things work under load. We've been arguing about those things being changed for a long time (over 20 years), and that hasn't worked out well. The PREEMPT_RT method was used to fix that. There's just too many places that grab a spin lock and iterate a list that doesn't have a bound size. > > But there are some really dreadful bits of code in the kernel. > One of the Intel ethernet drivers spins for ages whenever the bios is accessing > the hardware - you can't run RTP audio tests on that system. > > Perhaps interrupt disable and pre-emption times should (optionally) be monitored > and a warning output every time they go up significantly. > A 'name and shame' policy might improve matters. We have interrupt and preemption off latency tracers. Note, any measurements you add can cause noticeable performance hits. They are small, but still noticeable. Which is why I recommend disabling them on any production system. -- Steve