Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp210383lqj; Sat, 1 Jun 2024 15:31:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4VkuA8gpt856r+HiuOLj8aQJYraRNIxnO4yiesHzVkn9PhhWbXypCrn/02N2PhIZwZbZpklWxEfm1EipdzrHEMbbqVoWlCd741ySCIw== X-Google-Smtp-Source: AGHT+IEDRf++nd6O9iS8rgr84lAjhXzizvFN/29UWRxCnYvMI0LShZ0yL1SNg2w2EGbKgI1HAUk/ X-Received: by 2002:a05:620a:8117:b0:792:927e:940 with SMTP id af79cd13be357-794f5c71915mr563617085a.18.1717281093693; Sat, 01 Jun 2024 15:31:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717281093; cv=pass; d=google.com; s=arc-20160816; b=zaFHGRYN6GNzJR8F6hDmZN2sADqSCFe4+Rg3x4se85CMygWHosMIoI4UHu21Ad7DFg NEBYV1hZboZNtzDAWdNwHaab8fQYBl+HtCIm1bkD3JvFEORznABqKVYIizIlPpFGhA0C e7vdRqn+kjYEDcshY9mkgFQ7RCql7jX+H/zmDA2WIrIVSqR3iEtZ9kO9RmkL3nOK5759 CSdD+Q8muEQrdtpG89+UYRrSpfwWr7J36bz+XzJx/c0jd3U5tzUg/D3jwTS+CXrsHJpL iaXPM1qQ0xgv/6N5+nujj1ltp2/iUVOeKfPkH+rcb3GKw/6VCq3t5a8TMqAwc2lRN85a CZLA== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=qZbo561XfWIHgBvmySekggiN2gQefSMXY05ZVlA1bQk=; fh=loJZ07EaVFQk2plmVtRg1tvK1jjr0z/kKmoL7m7oeSY=; b=j2sz1tcwSTmCSuNPZjdfar5bilU+RjS/23X0/P5EGyr0XrEjthftKLJV7Jkdo2JJau s2kgNc/OnWW+ChSoTicbASACB0OP3QeUphTiWaScXYt+heiTM2FSlmtlryad+HCdlwku 9/HurE5uo/lg501EWs/6bw0LHpAGfRJukYpxziWtWAwsnbnZZYdXn4+I7SI+/32rWEN+ +/PlF06QBcFr71id40oJ+rMUVMWOMnkcIijRiWb4tYPbd/EI02oxG89NtDXxVbnDOoT+ yfVRNp4CMnILyQjJECPl9ngVnPao4OU04mRWgaHcdCFJfOqYRpHEkRWwXUX/oCmt0L9m kvaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=MYhmkv99; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-198023-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198023-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f3062fadsi524413585a.254.2024.06.01.15.31.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 15:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198023-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=MYhmkv99; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-198023-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198023-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6AB8B1C20A5A for ; Sat, 1 Jun 2024 22:31:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30D732E419; Sat, 1 Jun 2024 22:31:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b="MYhmkv99" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C88E71D555 for ; Sat, 1 Jun 2024 22:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717281083; cv=none; b=I/vDF++Xf86yb/k7MxObGeTOzUIjZ7zynFssFvWxVZMJIKLcPC2eA8OWdos0Am0HBsb7SO0onraY0CzdrIltyNhHTuX00e6ZQu0v6oRXladCaCXuA3tTECMHTkOmbQk9PxA023m/KylBa31576HTLmFapeoSJkcv5LauUQwdP/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717281083; c=relaxed/simple; bh=rFMuik6wkuNtXHKGkspgDvdX4YfRw4xUp9eXj1XXAhw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D/ca38V6517+FUPaiJOzuBSfou7OEeSVgpnmTBN5lkJwhEMYcKYvKHo+FB+yIEb63FP4ZBbGC+YRpg0uz9bRh+u3ZHoP21OcjmV/LckfDoyK8LljYrTd4HLhbrD4fdcqq4fgA0STCSJ/uULGlG8PQkj1lQIlWDyPQllL09V9PEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io; spf=pass smtp.mailfrom=layalina.io; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b=MYhmkv99; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=layalina.io Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4210aa00c94so29114225e9.1 for ; Sat, 01 Jun 2024 15:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1717281080; x=1717885880; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qZbo561XfWIHgBvmySekggiN2gQefSMXY05ZVlA1bQk=; b=MYhmkv99Py0Rw7R3dokFE2DHOdLz+jBfVd7JHnSMN+gBAigWSfisLJ7lp7OSRK+648 M9cGT8Hzcw9YtOs+2IAEsJzvrg/dr5l5M4BwRvSEG5Mg8Dykjg3SYW61uT+l+9xH+u8g igwcLlZDXO6eQJwC3cIaWq4zL50Kvgb/WsHE7tnoAyfuo5groLcyA+5D4QDY4YNo6VAq khRAuIzfkB189pmVoejSQTLJSvCQ8b8On3yIBYXUZX/o6CEAiIK2vklR3RsYyUu0s9/E NnPXJDRT5TtRMnGDg9Cm4PR0Al98cLn+uiQ7HaZoVWYb6viOVJ4IttKdCht1zGX8WMSi Xexg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717281080; x=1717885880; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qZbo561XfWIHgBvmySekggiN2gQefSMXY05ZVlA1bQk=; b=gL7XR2l8lkzwjalxG8PK3KUx8VeQM01Bs1+8mq6iCsMAadUwAwD0lGrTviN5BMDrlq k01J2RsDdyJl+zduYbvwAmauQkCjngPLowywCvPzxzhs3g2FILuDD8uUdxU+ocn3lL2m TLtpPf8eEWliV1+aukMxrWcCPNK97NWNnwsSkeMV/CIg4RNdMAvn8nmAynNetDQa5kqc P5wwMTmjJdf/UXp+Rz3e18EqWAypkXRjWysIcN2AMDjgkB3UoyUxRwbsWyJWhAxPRZTq 8vAVWQifF0/6HFhmcNM5YdL2y/Ni+P35PKpz2uenuOqYc5gbW3jPaWzOqIK7Dhk0gN69 JnzQ== X-Forwarded-Encrypted: i=1; AJvYcCUDj3qJ4APJ18NDI22tB5RWztRB1xWYm+a0X/OINC+7AObsniRhdNv/1+XBcf7YYx2t2uI6R6OY10iUoOviRgSYe207SIs3rZpT2kTM X-Gm-Message-State: AOJu0Yy3oPkJF1SA+y4wZpNsukcP82d39ibCCcruDRu72V3fEy1p7PRL gsHZ2sjuvF5gBHIjee+9lgiVVdAJ2xdCZulVSfOf43iI3OCQKi9BECgsFwLMEcY= X-Received: by 2002:a05:600c:a4b:b0:421:1165:f240 with SMTP id 5b1f17b1804b1-4212e0bfd91mr46367175e9.36.1717281080159; Sat, 01 Jun 2024 15:31:20 -0700 (PDT) Received: from airbuntu (host81-157-90-255.range81-157.btcentralplus.com. [81.157.90.255]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212f05157esm53941435e9.20.2024.06.01.15.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 15:31:19 -0700 (PDT) Date: Sat, 1 Jun 2024 23:31:18 +0100 From: Qais Yousef To: Sebastian Andrzej Siewior Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt , Vincent Guittot , Daniel Bristot de Oliveira , Thomas Gleixner , Alexander Viro , Christian Brauner , Andrew Morton , Jens Axboe , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, Phil Auld Subject: Re: [PATCH v2] sched/rt: Clean up usage of rt_task() Message-ID: <20240601223118.zjhp7pgk3wb32abv@airbuntu> References: <20240515220536.823145-1-qyousef@layalina.io> <20240521110035.KRIwllGe@linutronix.de> <20240527172650.kieptfl3zhyljkzx@airbuntu> <20240529082912.gPDpgVy3@linutronix.de> <20240529103409.3iiemroaavv5lh2p@airbuntu> <20240529105528.9QBTCqCr@linutronix.de> <20240530111044.d4jegeiueizvdjrg@airbuntu> <20240531063016.OCMg21Uq@linutronix.de> 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=utf-8 Content-Disposition: inline In-Reply-To: <20240531063016.OCMg21Uq@linutronix.de> On 05/31/24 08:30, Sebastian Andrzej Siewior wrote: > On 2024-05-30 12:10:44 [+0100], Qais Yousef wrote: > > > This is not consistent because IMHO the clock setup & slack should be > > > handled equally. So I am asking the sched folks for a policy and I am > > > leaning towards looking at task-policy in this case instead of prio > > > because you shouldn't do anything that can delay. > > > > Can't we do that based on is_soft/is_hard flag in hrtimer struct when we apply > > the slack in hrtimer_set_expires_range_ns() instead? > > We need to decide on a policy first. > You don't want to add overhead on each invocation plus some in-kernel > ask for delta. ->is_soft is not a good criteria. The suggestion was not to check policy or priority but dictate the behavior based on hrtimer properties set at init. Which agrees with your thinking. I think the check for policy at init to enforce a behavior is borderline hack by the way and better to get an explicit request from a task and let the HRTIMER comply adequately without checking for policies anywhere. Whether this property should be inherited or not is a good question and I think is the policy you're after here. Proxy Execution would probably handle all this inheritance problems transparently, so we need not think much about it if we agree proxy execution is the way to deal with all those inheritance problems. There are always exceptions though.. So worth a think. I'll drop this patch as this discussion has diverged to something else now. I'll leave this here until others get a chance to comment with their views too. Cheers -- Qais Yousef