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 274ADC0218F for ; Tue, 4 Feb 2025 09:16:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 72092280001; Tue, 4 Feb 2025 04:16:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CF736B0088; Tue, 4 Feb 2025 04:16:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BDE7280001; Tue, 4 Feb 2025 04:16:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3D2A86B0085 for ; Tue, 4 Feb 2025 04:16:26 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 30D4F482E3 for ; Tue, 4 Feb 2025 09:16:24 +0000 (UTC) X-FDA: 83081706288.29.2193009 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id C9F37C0002 for ; Tue, 4 Feb 2025 09:16:21 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kYYe3Dmf; spf=none (imf28.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738660582; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=t0DEtC3PKgp7BXTIfritcGnBk8Mae1xwU2+pF395sTM=; b=7rY2B5aDw25v8SLfLJpxuoGr/x+PBR9xWpVCAu0t5hX8tIGPNCHMEnGr3/NjAoiIzrkPTJ Rf7Q9nfuiBuZdGpIfsh8tbNBq4v/AsiClDYSdmjCJBS2PVx3cB4KcQ0jfO0vBSL3JkWzqt yGHpmwi4gWGHC/bM0SlQPBfGB7R88AQ= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kYYe3Dmf; spf=none (imf28.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738660582; a=rsa-sha256; cv=none; b=rFpMJnhOtc0Q3z4ibHP1GfLFS7riwjX6kZ/b13XJ83AqJFw+/g0+737YICDqe1ZPJlnPoE wNxf+enao4H5WxXoKz/yWTLeuYNVbRUBIEsIlgJ3/trosvNTs9g1z9UU9lf7k2iZBV8Fdw YlNxSB/bT9kGs+padWPoAWd9CQxeyNo= 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=t0DEtC3PKgp7BXTIfritcGnBk8Mae1xwU2+pF395sTM=; b=kYYe3Dmf/GzcBPUe5bN2ze2o1H IJXz23hzmqCYF90ZGKaTFcThAXuBST2ypBR0yvblo4QjGqjh6NOh/ekMgEEHgAAbhmOiX/Syzyeaa uIPrNMkx9jNQm00okElA+0qedocki1HCEoWsrpXh2kKnA00tUyj7HIx+PpSX9cZwUHINVWhSoHkCD +vXo9mw5ldAtwfyCCtvwD5fQ4yREdYleWwWmJDTUSd1/9d5pHGjDqsWAYbtXCguIyVGqf3bN3FsEc XL/ASyxYN/HrFPoiFcTJ93l9PdYPVwDuLTFrRBUE87lx1Vi28FbCH2+ZVtGCa3OUrdETjC5eUBOOU TqhmJNWg==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tfF2U-00000002SwU-0bJl; Tue, 04 Feb 2025 09:16:14 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 1915F300599; Tue, 4 Feb 2025 10:16:13 +0100 (CET) Date: Tue, 4 Feb 2025 10:16:13 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Thomas Gleixner , Ankur Arora , Linus Torvalds , 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, 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, Joel Fernandes , Vineeth Pillai , Suleiman Souhlal , Ingo Molnar , Mathieu Desnoyers , Clark Williams , bigeasy@linutronix.de, daniel.wagner@suse.com, joseph.salisbury@oracle.com, broonie@gmail.com Subject: Re: [RFC][PATCH 1/2] sched: Extended scheduler time slice Message-ID: <20250204091613.GQ7145@noisy.programming.kicks-ass.net> References: <20250131225837.972218232@goodmis.org> <20250131225942.365475324@goodmis.org> <20250201115906.GB8256@noisy.programming.kicks-ass.net> <20250201181129.GA34937@noisy.programming.kicks-ass.net> <20250201180617.491ce087@batman.local.home> <20250203084306.GC505@noisy.programming.kicks-ass.net> <20250203114537.6a30c7c0@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250203114537.6a30c7c0@gandalf.local.home> X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: C9F37C0002 X-Stat-Signature: ydfd94m1fyggsiak6f1hdh56ps899in4 X-HE-Tag: 1738660581-307941 X-HE-Meta: U2FsdGVkX1+NvOYq0yoGLw/sPs/cYJk7D5zi/z2jwPSieLcYRqTYh8GtdKRp+EXSpzuvNzyU/nnKtur2e2r0YfiQW4JIHfjCSwkubhy6eIGSpVp4pvFeNGi+QlLGBvq5GF4V+gGin9+4GS/Apeo2FwDEureONzyM00F274HuXHTjgevv9nqUD28MXBl/yTQhOJmXGzXJIr5u/VYF1UIClvbToykrWOCR/dG4YK+gz5oTCDxWWSU0xI0sx0hE3ncKIe1fRU8Bjn82em5u9U1L3Q8aFc54iDxFqOMn7O7Jwz4q2ECSIOeKwNRa7jsM3gpTV//M4YYn7b0wxgaB6OnE52TTK3iKnAhZvNWw8SaiOOc3SQFycNjLgGez4KVtq4l7eKmBkZq2MJVnsoGeGybZq0dJgei5GRZWZ0KygZ4hzbdYlWI9p5a1BevVr7Zm9q1c7iNanMJoxfFZ19yCvwdhczlklNd4tCKO58vFtEb1SSkpxfL0dZwhMOxtWcckyw+kme1hameta0xSMQrBulEAamYMVn07jQ1283hcCEPMhKkkHxcgdQ42ciCGaKse6/r8DPPFWgscncwVBkWBIX+ajZS3xe3BWcES4atW3Kis9hawScTyQuvfLjrsybW+j0KY+BxqC3AP9QIUMCEapiKQ/+ehPV3wWHKfuHpbboFnft4apxYQr/MvQl6eNHe5bU+gDboYTwaFOmy/AWn/6e/oITIrLDWlRU+Jb7NTJ+fKL7JvzV0hV/CphqJLqoooB89HsrwWLf7lM+Mcizf6lHRRbCCLUUlgr2L0eu/krG6w6V7QecWY1w/5aDORLZVt5UQI9jecJkZfHZgd/IZx3mWu6jXsJF4w8cAN/zuwkWJLAbSYHjuc15cmFXWaDxrw9adgAuPwrTyXgzka9mK89XI1BExeP05zqEtCAA53CUBt7jvbu3hhkSeVBAmgRQlVJOLvhfcW0zLE7JMtZKguC9+ nzTGlbK9 QuiRmHxfa2GVem5BCqSTqasF2gWy1Kh514VfARYYgjYTPMRNTqHyJJvHg08XpCvku95+uHGIBu+Z0lRcuinpU6ywxdX9qIGlkqjSPIYoj4W28cLQa6KU76yRQN8O31+IysBTfRbOfLXDMnQ/5UGw3DAuvz8nOzpSdXROoA4FwceO1PJSosKhqGPqs9qOlhUFVUcgijNFX75Gx9y4dPgW1bfHjVhgbFO+7PDh2mLZE40XV1koHQoNGDH+5c/NhitDIzmIahhJkYV5UVN8= 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, Feb 03, 2025 at 11:45:37AM -0500, Steven Rostedt wrote: > > Lazy only applies to fair (and whatever bpf things end up using > > resched_curr_lazy()). > > Is that a problem? User spin locks for RT tasks are very dangerous. If an > RT task preempts the owner that is of lower priority, it can cause a > deadlock (if the two tasks are pinned to the same CPU). Which BTW, > Sebastion mentioned in the Stable RT meeting that glibc supplies a > pthread_spin_lock() and doesn't have in the man page anything about this > possible scenario. Yeah, we've known that for at least a decade if not longer. That's not new. Traditionally glibc people haven't been very RT minded -- the whole condvar thing comes to mind as well. And yes, you can still use the whole 'delay preemption' hint for RT tasks just fine. Spinlocks isn't the only thing. It can be used to make any RSEQ section more likely to succeed. > Patch 2 changes that to do what you wrote the last time. It has a max wait > time of 50us. I'm so confused, WTF do you then need the lazy crap? You're making things needlessly complicated again.