Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1155759lqm; Thu, 2 May 2024 06:56:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAiuevELNUhGZA+EG4dbky+jDzqQEgS9ZwGpY1NRQHHIYuKtj5iflHjsFmh1DQfMkWe55UcF/uT0xG6CoQ0ESHhjdpF1a/+WX9XrjZ3A== X-Google-Smtp-Source: AGHT+IECXcqxD/phQovlQQS6jTbLNlsNicbwD6rfJ7WNwdu6ixVRV+WeymXh1ulAXkba7suzO/7L X-Received: by 2002:a05:6358:7f87:b0:186:12cb:d1a8 with SMTP id c7-20020a0563587f8700b0018612cbd1a8mr7118264rwo.25.1714658215448; Thu, 02 May 2024 06:56:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714658215; cv=pass; d=google.com; s=arc-20160816; b=jqTU/hNeHrMHOK4kPIvHGD4cJcZKrk4/dY842G6V0Ex6D9vkWjRSuixkNdHsixcrjh bcRKvWj+qkFoH6dbp9EP36yv/XG1/WI6+IxNnvZDnion7KSwhtXKl644loKuBgdRd2QX NNuFCmm46l2wPhyO9jAZHUMnoV5+GPOxWeXwwvV7iKx/Kd+KYk8JyKzXNkHsy3fq7smS XatAkf5wcARHnOxMT64wEBXBBLVFQmXlH6D2H98RelTxUbcTMJC+e2Lsq9/tOWNJoI53 K1New3uaEs6+V8BmIgSKsmfPiLF386En5hOGUiHG/orGxWV9CAeZ8/EVVrKupZaSjuO8 15sA== 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=TMs6qFbAXOgZbfTIfvzW4Fje5xMDforyGhdiIfliBIE=; fh=Kyc+BiBWOzyE7PLzOmBow1IODbz4e8D5a7k3JqgKaZ0=; b=Oa9rOZSxC4mF4OCi6FfhoOWMLTjCyuWFbr8v+IX7ifr0j3ARL34dB4WG6WpDgnPhMG 0HK2STdrkQUoXVsMp+NoOGitZdby4fvg06VVBLqvjAysFrhm2VIuOVcvpaJcWzxUlwok /1Tcqq77Egm6jLCFmIgDOw5Vzrpe2gNFGThSPuFiVf5nXBiTVTuFKHxhtXKOKVzf6bTw rwGDCr223nOjiK9kczEN0RddTioXlSHv4G1YSv7wyieKK5wIV0q92OVJWyme15x6f7Hy FJZqs05wv2+RUq3QpVU3ERmmAyisqw3M4rbhp1QXgY/NKyrYiiBBX1AUrzisNnb+f2hv Gn8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gdbcl+B9; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-166137-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166137-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c8-20020a633508000000b005e840ae1398si1048736pga.187.2024.05.02.06.56.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 06:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166137-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gdbcl+B9; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-166137-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166137-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3E5BBB2338E for ; Thu, 2 May 2024 08:46:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5952A4776A; Thu, 2 May 2024 08:45:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gdbcl+B9" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D46F59147 for ; Thu, 2 May 2024 08:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714639514; cv=none; b=ufM9FdB2o/he0IF7U0xfbUgDIrdhT4n6v5+FbAlOmzKimeuwNUCrjx0/C2+ZDEoG6nn7fxADDo3sWSbHzBGhYPZnIO4TWgaNXIDyK/M2nrbcBsowNHHNHf62cv0JY9NUSmX0O6bRzckVwoiYc/bjOUA5X81lwAwt4XjMOY5UGVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714639514; c=relaxed/simple; bh=4E8utQNKBoQ5tzMCgjoTU2IXv0ph4OwfGKexiKxaTB8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qlUgYHj9MVT/wPMHIVoEDHZ8YE+BMvBiouXOq5KskH5CzL2lvSrQ+ANMflhb6WsfF5NIhshY+KLDAlx9tpdw8dHPR84LRikao/Z1uF2zmgDur9N/MSCRITypdHCAoV4d1b3Yzn4fyg9ESzwkXDwbvXTwV6iss/xIbCOuLE0Go5I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=gdbcl+B9; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=TMs6qFbAXOgZbfTIfvzW4Fje5xMDforyGhdiIfliBIE=; b=gdbcl+B967rG+mexLhZjkUct+0 qokcmFEoZNRMFGIxrZghtvyKN7tTr8it6YnJARHbLM00GAOB9RxLh+FjgXhy+zAgDC0TCY10mE8+d qyn/+MZ4HX6+hE/2zd1fX1zW+FyaaKOkkCJUw/RXp0NhuOs75WSbVv4PMwhZWg28xzkqcGrt5M6RW i/Y59qzNh6K6fR+xXx9/Clk5AUsfxFD6Pl4rEWv82Ufkj7Xyg/qBXYGvG7f4Wy49KztIYo0SgT9ic h4X+KgaJjgoHUYZBM1IxPRxAAnipTLxY7v7G2KZndGD7xqyANp5iPBDg9Uzf6q8xPpja0EvO07Hxf IBbGYtGA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2S3s-00000001HWh-3ZEV; Thu, 02 May 2024 08:45:04 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7A87230057A; Thu, 2 May 2024 10:45:04 +0200 (CEST) Date: Thu, 2 May 2024 10:45:04 +0200 From: Peter Zijlstra To: Daniel Bristot de Oliveira Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , linux-kernel@vger.kernel.org, Luca Abeni , Tommaso Cucinotta , Thomas Gleixner , Joel Fernandes , Vineeth Pillai , Shuah Khan , Phil Auld , Suleiman Souhlal , Youssef Esmat , Daniel Bristot de Oliveira Subject: Re: [PATCH V6 2/6] sched/deadline: Deferrable dl server Message-ID: <20240502084504.GX30852@noisy.programming.kicks-ass.net> References: <7b9c206e914ef257a2534199f25938ffafa3e59e.1712337227.git.bristot@kernel.org> <20240410174749.GC30852@noisy.programming.kicks-ass.net> 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=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 02, 2024 at 10:35:02AM +0200, Daniel Bristot de Oliveira wrote: > On 4/10/24 19:47, Peter Zijlstra wrote: > >> +static enum hrtimer_restart dl_server_timer(struct hrtimer *timer, struct sched_dl_entity *dl_se) > >> +{ > >> + struct rq *rq = rq_of_dl_se(dl_se); > >> + enum hrtimer_restart restart = 0; > >> + struct rq_flags rf; > >> + u64 fw; > >> + > >> + rq_lock(rq, &rf); > > guard(rq_lock)(rq, &rf); > > this is the way I found to get the &rf... inspired on sched_rr_get_interval(): > > scoped_guard (rq_lock, rq) { > struct rq_flags *rf = &scope.rf; > > is that right? > Yeah, it's a bit ugly, but yes.