Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2632188rdg; Mon, 16 Oct 2023 09:57:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOo1FYb2lzlCKtKMW45BrdBTxCfYMJqND591KcYrIidGyvxL2R+b55uKDZuUfkf3REQ1TO X-Received: by 2002:a17:902:c215:b0:1c9:cc41:76e4 with SMTP id 21-20020a170902c21500b001c9cc4176e4mr14329670pll.10.1697475437085; Mon, 16 Oct 2023 09:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697475437; cv=none; d=google.com; s=arc-20160816; b=xTuAiko/ViakI3xHRVQBmydbBFDt7XcsNcUDRXG1NjwOAMy4hQApHZNUEeK44XkNGe QzkRkb+tSXmJRhlDeZg3LisVc1S8beVbK8YD173vXAarwYfakzw4MHlV+rlQp3ACwWpI 2NqZ2s4OhgMHFC2htU1rJFUkYuJUcIX9D8qgEcRdIxaQY4Ql/vptMRbiM7qg9zmS53IG C2yz8vODYri/B/udQUACN1u351D1KFDgVxEYzRl0uRIbawxZUJwT1nNmd9wEirneAYrS E/hbDiIzIzMvJ2mt5rJW/2EXDMcnKiDqbrk/+Dm0UOe1NiVvaZrmLgclwE+ONcpJL+Tf HQyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DmMKf0qGpeoZW2z/Wnq5RJEB0AlgVOQb1rbg9/aBfVM=; fh=p+3SfeoXWgG/1gOBDlxvHpzXOEAFeDYhq1lLhLIPRnM=; b=CvlJ1d2mJ8j6FwCx5clOaurJ8J0JpP2VmHD89L3MCydHk/SELN79Ys8YcVQEQ+ZBXa dQIoHlk2gED5i6Gcq6fAn2OAl2eUUVfvxGuXjU57HvU5cTq7X0kZGQjQ9zFqD9cdW3YU JXwa3TMN9ispf4VH9+a7eCeoyvbdriWIcC+ghvLtowl37de9aldzH/F/MXBiIC/bmhdE 3/M2k04811+ztwYOZfodc2mVsZeJjeneA2RwYDaqSmuU4VFpwlK4gAQk2ymikQJhdAPb +5JhEtJ+sjnPo0HXMVAw+h16vjU4h3KwZonzhopoJ/ITdgTTyyxE+3OE2UNZg4JAQi/Q O28Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kuAgrKq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e21-20020a170902d39500b001ca87cf992asi1524360pld.284.2023.10.16.09.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 09:57:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kuAgrKq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CFCB4807C860; Mon, 16 Oct 2023 09:56:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234431AbjJPQ4G (ORCPT + 99 others); Mon, 16 Oct 2023 12:56:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234349AbjJPQzp (ORCPT ); Mon, 16 Oct 2023 12:55:45 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A85E5D4D for ; Mon, 16 Oct 2023 09:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=DmMKf0qGpeoZW2z/Wnq5RJEB0AlgVOQb1rbg9/aBfVM=; b=kuAgrKq7bwQcAbs+Uw+396Ori0 EUxIHPNScDgpUZnELdzTAPVMZVcaTqq5IRbR7cTv0oHMtfPtJfvzzib6Sz94H7JK8wRcCFY3Fump4 Yyle/I9m2nQIYIlBERTNJI0QFP4CAeMltkCxIW55O2h5bu+0ul73qZzCEbYQQ8q1xnF/wBmsp2Q4C ZX6sTQOp1wDcn4xC5Sv5qsHhqwqKwOD7skX3zpEDxjKcTCkv7S7soFXQOvDncz5zLpsngcMnAuY1/ 8YUl6mShOZa48gq7tAgfBeJ6mbTnh04hYKGlkdqTDcSrrX7A9RQKzYHs2BPWTLsSNGIjCZRE7TQ4S Mm3CIoHg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qsQnK-006AUE-1R; Mon, 16 Oct 2023 16:50:20 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 8A7B2300513; Mon, 16 Oct 2023 18:50:19 +0200 (CEST) Date: Mon, 16 Oct 2023 18:50:19 +0200 From: Peter Zijlstra To: Youssef Esmat Cc: Daniel Jordan , mingo@kernel.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, corbet@lwn.net, qyousef@layalina.io, chris.hyser@oracle.com, patrick.bellasi@matbug.net, pjt@google.com, pavel@ucw.cz, qperret@google.com, tim.c.chen@linux.intel.com, joshdon@google.com, timj@gnu.org, kprateek.nayak@amd.com, yu.c.chen@intel.com, joel@joelfernandes.org, efault@gmx.de, tglx@linutronix.de Subject: Re: [PATCH 00/15] sched: EEVDF and latency-nice and/or slice-attr Message-ID: <20231016165019.GG33217@noisy.programming.kicks-ass.net> References: <20230531115839.089944915@infradead.org> <20230906131356.GG38741@noisy.programming.kicks-ass.net> <20231002184136.GA1539@noisy.programming.kicks-ass.net> <20231005120557.GA743@noisy.programming.kicks-ass.net> <20231007220400.GA5581@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 16 Oct 2023 09:56:09 -0700 (PDT) Sorry, I seem to have forgotten to reply to this part... On Mon, Oct 09, 2023 at 07:51:03PM -0500, Youssef Esmat wrote: > I think looking at the sched latency numbers alone does not show the > complete picture. I ran the same input latency test again and tried to > capture some of these numbers for the chrome processes. > > EEVDF 1.5ms slice: > > Input latency test result: 226ms > perf sched latency: > switches: 1,084,694 > avg: 1.139 ms > max: 408.397 ms > > EEVDF 6.0ms slice: > > Input latency test result: 178ms > perf sched latency: > switches: 892,306 > avg: 1.145 ms > max: 354.344 ms > For our scenario, it is very expensive to interrupt UI threads. It > will increase the input latency significantly. Lowering the scheduling > latency at the cost of switching out important threads can be very > detrimental in this workload. UI and input threads run with a nice > value of -8. > That said, this might not be beneficial for all workloads, and we are > still trying our other workloads out. Right, this seems to suggest something on your critical path (you should trace that) has more than 3ms of compute in a single activation. Basically this means chrome is fairly fat on this critical path. But it seems you know about that. Anyway, once you know the 95% length of the longest activation on your critical path, you can indeed set your slice to that. This should be readily available from trace data.