Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1940800rdb; Mon, 9 Oct 2023 07:42:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqhifSHioAjKVl13BQrMvDXGX+GxeDzNSUu2ah8Eldu3fk7cveBWMlDPwesCukqwfO+9Ov X-Received: by 2002:a05:6a00:1a43:b0:68a:582b:6b62 with SMTP id h3-20020a056a001a4300b0068a582b6b62mr17344651pfv.7.1696862557682; Mon, 09 Oct 2023 07:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696862557; cv=none; d=google.com; s=arc-20160816; b=WyGuCMPBy1V/XTmjozkaudWz0aRXFMgFXlk4qLEZgmjpttsxX05/lfj1RyJm+u+Wa9 W9x8fJcSs9ul0C6nrCI7znuTH2GgWAI/Pb1sSv76vBu/+VnGo3R1s2KotwliMqlP8KG7 U3+9TTGjzXLRd6oR8aHYCTd++vGZAeTyxoXIze5sWvl2zvdXSzcNcEMGW/0XLEOIQuNU DS2cmngwo089LyfIOaL02wJm93x889Puf1QqpBRsCfvhAjEJU/+ta5hwSiUkWP6e94oA FY0HDdSJThLudcluKt2gvOlXZdWzubzVlkLdhuw9ldqCKYclbghcP/S1MM+n1IKuzRKC AajA== 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=hGwBYnmpWZpb2H7rgyQsD4rWY/WMeWNNj7R1Yf/CQpU=; fh=p+3SfeoXWgG/1gOBDlxvHpzXOEAFeDYhq1lLhLIPRnM=; b=Dxr19PljEhYtC2tfK3T0qxNN7Sz0liFw3/jf6i29F7hRHkihRAX9Amig1YZJWcTuPp 9Wq+h2ZxsH98PvgqLiHdwVQZdws9Md63LaTawArdom7XO7q1uD8IJprXhuwcmAYzP6QC U2EijeeU123HKRsVR03TaKyDf7ECMBAYcXvMYhh7mCc6ICXtRe7xDJTC9fDmAaqpoeK+ VGpoCQRaBrGgmdAZAZjyPJ00fNiytWiLaPWOG/ScR+8LkF8IolEwPdBPYUeiKxlvlknF lGFwhgkq3tUUGx44UPrWS7NBjwCPxk3/h8FC8HX/OZ6sCN92+p2tKCTHFYj6ExDuhVRs Gq5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kkSH0wVe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id c20-20020a637254000000b005898e5f41f8si7419819pgn.53.2023.10.09.07.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 07:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kkSH0wVe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 4602C80C5CB9; Mon, 9 Oct 2023 07:42:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234532AbjJIOm0 (ORCPT + 99 others); Mon, 9 Oct 2023 10:42:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233805AbjJIOmY (ORCPT ); Mon, 9 Oct 2023 10:42:24 -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 CD718AC for ; Mon, 9 Oct 2023 07:42:22 -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=hGwBYnmpWZpb2H7rgyQsD4rWY/WMeWNNj7R1Yf/CQpU=; b=kkSH0wVeLP89GD6irJs2ynnayn noeoONBD/kCdjZNAgTmIjVnzEvj0J76XpECuFrTWVOCRbH0qRJavMnnfBWYv6aenrO7MkynnQc8bQ iMxpvyFUY1kmoMBIpl8kybhGFfYSWhf4x5jpQc3qNgxvodDurrurlyyqkzC67wCkT3QQjvl1g2Lj0 WhPMoAsfQlf42XHdLooK9bYWzyX3omKjQar16u6262y1hCDh9meI47qtSPA1BcpX2p3XBN+ucYzMa JjXe5meeeXbdIL0R1WIYREcGpT3SOhhVjV6+co3OWpnFfDzbj5YgJnqR0KpuncgnL8uG+h3IRbnr7 hRTGugwA==; 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 1qprRk-00Fvra-1B; Mon, 09 Oct 2023 14:41:25 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 6AC29300454; Mon, 9 Oct 2023 16:41:25 +0200 (CEST) Date: Mon, 9 Oct 2023 16:41:25 +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: <20231009144125.GC6337@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: <20231007220400.GA5581@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Mon, 09 Oct 2023 07:42:35 -0700 (PDT) X-Spam-Level: ** On Sun, Oct 08, 2023 at 12:04:00AM +0200, Peter Zijlstra wrote: > On Thu, Oct 05, 2023 at 02:05:57PM +0200, Peter Zijlstra wrote: > > > t=10 V=4 t=10 V=4 > > A |----< A |----< > > B |< >B |< > > >C |----------------< C |----------------< > > |---*-----|---------|---------|---------|---- |---*-----|---------|---------|---------|---- > > > > > > > t=52 V=18 t=36 V=13 > > A |----< A |----< > > >B |< B |< > > C |----------------< >C |----------------< > > |---------|-------*-|---------|---------|---- |---------|--*------|---------|---------|---- > > > > > > > BAaaBCccccccccBBBAaaBBBAaaBB BBAaaBBBAaaBBBAaaBCccccccccB > > > > > > > > As I wrote before; EVDF has worse lag bounds, but this is not > > insurmountable. The biggest problem that I can see is that of wakeup > > preemption. Currently we allow to preempt when 'current' has reached V > > (RUN_TO_PARITY in pick_eevdf()). > > > > With these rules, when EEVDF schedules C (our large slice task) at t=10 > > above, it is only a little behind C and can be reaily preempted after > > about 2 time units. > > > > However, EVDF will delay scheduling C until much later, see how A and B > > walk far ahead of V until t=36. Only when will we pick C. But this means > > that we're firmly stuck with C for at least 11 time units. A newly > > placed task will be around V and will have no chance to preempt. > > Playing around with it a little: > > EEVDF EVDF > > slice 30000000 slice 30000000 > # Min Latencies: 00014 # Min Latencies: 00048 > # Avg Latencies: 00692 # Avg Latencies: 188239 > # Max Latencies: 94633 # Max Latencies: 961241 > > slice 3000000 slice 3000000 > # Min Latencies: 00054 # Min Latencies: 00055 > # Avg Latencies: 00522 # Avg Latencies: 00673 > # Max Latencies: 41475 # Max Latencies: 13297 > > slice 300000 slice 300000 > # Min Latencies: 00018 # Min Latencies: 00024 > # Avg Latencies: 00344 # Avg Latencies: 00056 > # Max Latencies: 20061 # Max Latencies: 00860 > > > So while it improves the short slices, it completely blows up the large > slices -- utterly slaughters the large slices in fact. > > And all the many variants of BIAS_ELIGIBLE that I've tried so far only > manage to murder the high end while simultaneously not actually helping > the low end -- so that's a complete write off. > > > By far the sanest option so far is PLACE_SLEEPER -- and that is very > much not a nice option either :-( And this can be easily explained by the fact that we insert tasks around 0-lag, so if we delay execution past this point we create an effective DoS window.