Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4654783rdb; Fri, 15 Sep 2023 08:28:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiQs0atha5jin2gmXfmNuS/T+oHgvMHLThKzW/lUSnUfNIgvLBn17lhwH3DDvxrCoM0IUD X-Received: by 2002:a17:90b:180a:b0:274:84a2:f0d8 with SMTP id lw10-20020a17090b180a00b0027484a2f0d8mr1935988pjb.25.1694791739491; Fri, 15 Sep 2023 08:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694791739; cv=none; d=google.com; s=arc-20160816; b=RncGucuVHHc50U3yJlwtJ6dDT4Swi0aFb9yABjwhiBzeeleGuVHS1+LIbhVIr1aPye 5NWN1jBho9tUUIEDVIeB0Z3A5SS+pUO6M7ckaopPWV9It9Kpr7dfWisZdRFw/XmESTEf xOmuuNNMePByUAc+iFOurrP9MzrsCbcrRZJzBP16gKOMHq0Q/eKtyjMiutp875w8ArXh 571SEPn1Y5a8hkRbIzCRIXiTCqWnUwfySBuXCBr+nIhrHsGfp5alGUh+TfG8waWSTJ7c V051exgKxpymYhqo++LLTrY28y14L2/05iD+K+MokYg40RD5tPows7LtNGAvFRkJPtbe Wv5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:user-agent:message-id :dkim-signature; bh=/E4r8T3JsenmCTsTNOexUcOfXwOLHQ3RlyhZFtZ7FpE=; fh=8nOaKUEa81j7W0+1WsEBp+5WYwx+xJuIJJH6XijcoWA=; b=MGIoth+IrPaxzPlmWFPdkScahtr4erLLHbl36TmmgoAecmOxVN6jOfgu1s+9CUq1aZ xYQ4dUxYMskzGT7R6gOfrtShwimUYILlIwM5jaLIqxBPss2wFXQVFhv1Pf234Xyq1xSI S1J1dFlLrIZOqF9R/Vuq8W9BqVh5HaWAbcR+GQlcfkJHPynRfJNBk+AYicsfQplpsTvT zuH5TpzpgEQM8gl47GLfGJYNPCQEsKQwsixca4GBEPZbzdE0NBUsI9yfvEtAdlY6JXTz sFvYmkxF0p0T5WSyiQmrIco9QKsklt4qQgbdSSMAdpwfM/q73Yb1teInNN0KSUnl0rKT RgTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=UYOIfWrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id m24-20020a638c18000000b0057400cc5c45si3392771pgd.730.2023.09.15.08.28.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 08:28:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=UYOIfWrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 0872F82ACADF; Fri, 15 Sep 2023 05:50:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235117AbjIOMty (ORCPT + 99 others); Fri, 15 Sep 2023 08:49:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235079AbjIOMtt (ORCPT ); Fri, 15 Sep 2023 08:49:49 -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 EEB5D19A5 for ; Fri, 15 Sep 2023 05:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Subject:Cc:To:From:Date:Message-Id: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=/E4r8T3JsenmCTsTNOexUcOfXwOLHQ3RlyhZFtZ7FpE=; b=UYOIfWrkOxNwWpwL/vdvTFMGIf dQ7cukpeY7k8WdH2tus5OjCT2DzqMU+Fv8SLSmLk42TCFbERGQ3yxygtvIn0n631FpCwTX0407k0K uEkxBG7rHYfYWslB87yMqgr0FBcfszZa57oJoCJK5Tn2bT+FgDJhQSVcQOCpirrNpZi+2zGp87jF6 eAvs2VBo2j5tSALmTnumo20ovw3O2rkhkJrgIyfI/1kniWBp9r5tNYPGnF+MdQcV0nqeSn948/AOl oR5E9eDIIyGJEo1+9jlp7Gt4tQfgcDya1+mvYLcocDzWYTYoCogjA+f8tssKmk1Z8ra3DFJl5dDBS p0foiB0w==; 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 1qh8Fs-0097rz-0t; Fri, 15 Sep 2023 12:49:05 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 0) id 60E863005B2; Fri, 15 Sep 2023 14:49:05 +0200 (CEST) Message-Id: <20230915124354.416936110@noisy.programming.kicks-ass.net> User-Agent: quilt/0.65 Date: Fri, 15 Sep 2023 14:43:54 +0200 From: peterz@infradead.org To: mingo@kernel.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, vincent.guittot@linaro.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, youssefesmat@chromium.org, joel@joelfernandes.org, efault@gmx.de, tglx@linutronix.de, daniel.m.jordan@oracle.com Subject: [PATCH 0/2] sched/eevdf: sched_attr::sched_runtime slice hint X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 05:50:01 -0700 (PDT) Hi, As promised a while ago, here is a new version of the variable slice length hint stuff. Back when I asked for comments on the latency-nice vs slice length thing, there was very limited feedback on-list, a number of people have expressed interrest in the slice length hint. I'm still working on improving the wakeup latency -- but esp. after commit: 63304558ba5d ("sched/eevdf: Curb wakeup-preemption") it needs a little more work. Everything I tried so far made it worse. As is it behaves ok-ish: root@ivb-ep:~/bench# cat doit-latency-slice.sh #!/bin/bash perf bench sched messaging -g 40 -l 12000 & sleep 1 chrt3 -o --sched-runtime $((`cat /debug/sched/base_slice_ns`*10)) 0 cyclictest --policy other -D 5 -q -H 20000 --histfile data.txt ; grep Latencies data.txt chrt3 -o --sched-runtime 0 0 cyclictest --policy other -D 5 -q -H 20000 --histfile data.txt ; grep Latencies data.txt chrt3 -o --sched-runtime $((`cat /debug/sched/base_slice_ns`/10)) 0 cyclictest --policy other -D 5 -q -H 20000 --histfile data.txt ; grep Latencies data.txt wait $! root@ivb-ep:~/bench# ./doit-latency-slice.sh # Running 'sched/messaging' benchmark: # /dev/cpu_dma_latency set to 0us # Min Latencies: 00060 # Avg Latencies: 00990 # Max Latencies: 224925 # /dev/cpu_dma_latency set to 0us # Min Latencies: 00020 # Avg Latencies: 00656 # Max Latencies: 37595 # /dev/cpu_dma_latency set to 0us # Min Latencies: 00016 # Avg Latencies: 00354 # Max Latencies: 16687 # 20 sender and receiver processes per group # 40 groups == 1600 processes run Total time: 38.246 [sec] (chrt3 is a hacked up version of util-linux/chrt that allows --sched-runtime unconditionally)