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 B1CEAC02192 for ; Wed, 5 Feb 2025 05:10:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 143B9280005; Wed, 5 Feb 2025 00:10:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 11B0D280004; Wed, 5 Feb 2025 00:10:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFD31280005; Wed, 5 Feb 2025 00:10:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D23EC280004 for ; Wed, 5 Feb 2025 00:10:06 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 844961405A7 for ; Wed, 5 Feb 2025 05:10:06 +0000 (UTC) X-FDA: 83084714412.17.04FB4E3 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by imf29.hostedemail.com (Postfix) with ESMTP id 944BD120007 for ; Wed, 5 Feb 2025 05:10:04 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=joelfernandes.org header.s=google header.b="W6T/o5vO"; dmarc=none; spf=pass (imf29.hostedemail.com: domain of joel@joelfernandes.org designates 209.85.221.53 as permitted sender) smtp.mailfrom=joel@joelfernandes.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738732204; a=rsa-sha256; cv=none; b=vFZofNmgHKOypDtCr9no6U7/WC0zOrsD2dMj15YNsPUZEYr/9qZOZosJGTqouCrSOoDfLQ 6ucEq/CBpv9nHb9t63IH8O7BY3HYDZCVLG5qhDyQ0pB9670B56tAacI8ZYCIOFzucRtKS3 0Fw05epMbnVMe8izI+sdvTHJen6tiRE= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=joelfernandes.org header.s=google header.b="W6T/o5vO"; dmarc=none; spf=pass (imf29.hostedemail.com: domain of joel@joelfernandes.org designates 209.85.221.53 as permitted sender) smtp.mailfrom=joel@joelfernandes.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738732204; 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:dkim-signature; bh=9RVlUXV2F+9kkfTiH5pod7Tr3MJ/WjVL+lpETWYFhSc=; b=taXigLdYj367jnIWxcJO91XNuloZiUNEkLCPySnbhJTRjrTLkPtJem54q1YSPKiz0tbV7u Q1ZsPp/0VtRdwlVKJG4G1C9bCp9dugrYhKfm66FY4Sru2RCSbN+/+OFowhoRLQNnNh0Jbl Mlo5hH2TtDrsE9ETNSPfLrDL0KyhW8c= Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-38789e5b6a7so3332070f8f.1 for ; Tue, 04 Feb 2025 21:10:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1738732203; x=1739337003; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9RVlUXV2F+9kkfTiH5pod7Tr3MJ/WjVL+lpETWYFhSc=; b=W6T/o5vOQiHNxeyD+LWnAEv6Dow3rh2cUxmCqf5gQbvqxfac7bFijhn+2AKpsK1Ng7 Mdpq0MuTphMC6Ad6tU4kFbROtV/MJdAf2epRYAgd49WA9On0ya5r49Oj1/iMweXTl2g2 XChmg6UnsGo+gS0T3MAsb+IQ4vvRg1lCMt5TA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738732203; x=1739337003; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9RVlUXV2F+9kkfTiH5pod7Tr3MJ/WjVL+lpETWYFhSc=; b=gxEgIW73Ar2OAkhJf8Z27KMXm+hibPu8MQoNsp0UaTaByB4TsNnOOfQIf20l/kQGj2 ZsHswTleJSFi4YMKOfGORnxBkJ4WYNzkSq7srxkb2atKv+R+nUP0HL8BwegV4uvY1PdG bqoKYb2eer9tdJRnm+GGosPd7cnbyCppk8r93NjmMdJoVRsCkqKfQ7lUTzpKzdtkBaw/ K5qb6zzGXSd1akZotVnePG3og8gK3LleD0ZEGZUi27dub/CrbR0TBWwGaGUDXfmt+zUd 1r2qRgYitIyKXDbMozpH/muT0jgrFYqhYj/7s6NUS6XDTSNT3+qBtKoBvbAoB7JprbMN rMCQ== X-Forwarded-Encrypted: i=1; AJvYcCWwWY0xX3KcMvnI6ADe1Yhizryl3PQCdNVHOZdZfRLMJPSrnbtHNFq6exQPDB0/7Qnsw2gJ8w/log==@kvack.org X-Gm-Message-State: AOJu0YzqLvEW7rcOy0Q3fgn/iTLBnJbvEnmwMAOEIYz+aE5mXr8J5p/i Wj4zAK8Y1UkEciiLrBlgP86NcZBgZGh/Xd2lkjLvUfhm+TII19K17ZO2TuwUvlOwA+y/63+jlUm fgfeVyTXeSneZPwfKHQCUiBmxUk9FrolJQmla/Q== X-Gm-Gg: ASbGnctzpsFZjeyeVFytWo+DEPZcPXuV4OP+7Ix1BuSc9GonMIjOScbhL4b5423p+yf /g/n+SiQNmN70EEI/CuA6Skmrc7eEWJDAg+6aQwzZnrFr3569jLuua14B9ivvVxGizWtLsqoGfU c= X-Google-Smtp-Source: AGHT+IHebXDnJj7nrVEowqtLpxuhsBRv87DxqjXGuMdO/PKznev/kvyagbD64f5kjLtxcpTukLwYXZ2sJHYB04z1738= X-Received: by 2002:a5d:47af:0:b0:38c:1270:f964 with SMTP id ffacd0b85a97d-38db48dea2dmr654734f8f.47.1738732202866; Tue, 04 Feb 2025 21:10:02 -0800 (PST) MIME-Version: 1.0 References: <9DA1FAE6-A008-4785-BDF9-541457E29807@joelfernandes.org> <20250204220418.35949317@gandalf.local.home> In-Reply-To: <20250204220418.35949317@gandalf.local.home> From: Joel Fernandes Date: Wed, 5 Feb 2025 00:09:51 -0500 X-Gm-Features: AWEUYZnm9OUMJi2qAun9rb8YUVPwuY0xD-pJcn3QN-FWYx3I5wXuquWtGR4fSJs Message-ID: Subject: Re: [RFC][PATCH 1/2] sched: Extended scheduler time slice To: Steven Rostedt Cc: 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 , bigeasy@linutronix.de, daniel.wagner@suse.com, Joseph Salisbury , broonie@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 944BD120007 X-Stat-Signature: rf195yre9ynso1cssgn7x5poerauzn8o X-Rspam-User: X-HE-Tag: 1738732204-932137 X-HE-Meta: U2FsdGVkX1+Wp84vFcuDKmO0GaakdFzBK23pvtqGKT7K3NTLeL5pQ8nzNiMLnynY+swclmvqoBznHZ/REcncuYlyjONJRRevzW5uApYpIaI/elE7TVLb4r9XBvww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bsk2Wy4FEX1pUFLouvv824k35Y/qp7UGxzF9pDgR7QfW/O1VvhcAaw0NEgICPAwcZQG/WGu9Jovyh3HHgYpOGcIExNhucqLsTdnwhJx6U1fCzK1taS7s4nogR0NjY+wTuCZssep7qIRnIgNHlQPAw60YunW261FFrsMdGSmt7e26PsEyj 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 Tue, Feb 4, 2025 at 10:03=E2=80=AFPM Steven Rostedt wrote: > > On Tue, 4 Feb 2025 19:56:09 -0500 > Joel Fernandes wrote: > > > > Here is the RFC I had sent that Peter is referring > > > > FWIW, I second the idea of a new syscall for this than (ab)using rseq > > and also independence from preemption method. I agree that something > > generic is better than relying on preemption method. > > So you are for adding another user/kernel memory mapped section? I don't personally mind that. > And you are also OK with allowing any task to make an RT task wait longer= ? > > Putting my RT hat back on, I would definitely disable that on any system > that requires RT. Just so I understand, you are basically saying that you want this feature only for FAIR tasks, and allowing RT tasks to extend time slice might actually hurt the latency of (other) RT tasks on the system right? This assumes PREEMPT_RT because the latency is 50us right? But in a poorly designed system, if you have RT tasks at higher priority that preempt things lower in RT, that would already cause latency anyway. Similarly, I would also consider any PREEMPT_RT system that (mis)uses this API in an RT task as also a poorly designed system. I think PREEMPT_RT systems generally require careful design anyway. So the fact that a system is poorly designed and thus causes latency is not the kernel's problem IMO. In any case, if you want this to only work on FAIR tasks and not RT tasks, why is that only possible to do with rseq() + LAZY preemption and not Prakash's new API + all preemption modes? Also you can just ignore RT tasks (not that I'm saying that's a good idea but..) in taskshrd_delay_resched() in that patch if you ever wanted to do that. I just feel the RT latency thing is a non-issue AFAICS. thanks, - Joel