Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2548069rwd; Fri, 16 Jun 2023 05:19:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6QvpW3G9MpYu5JTlamvEEkEyy4EQQwReEq/WRk6MycYM3IZ+gV8AkDQUd+C05Jk+0BfjrG X-Received: by 2002:a05:6358:511b:b0:12d:df35:f2df with SMTP id 27-20020a056358511b00b0012ddf35f2dfmr1403419rwi.10.1686917991800; Fri, 16 Jun 2023 05:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686917991; cv=none; d=google.com; s=arc-20160816; b=KvZPnTlhAMTjY/XfhLvcjGXJ9Nrsb73kUgLBPQELCbmxb1mx4CF5VEoomEtx0yLW9z 1qMIVyXe4rzqzn02nJrxcEGJo6dL78CP4puF3Y9IID7e8w2AHeLiUwVoccTngJa2/Zqu 4ImNqROKEG0tkR4BNjGyn3dPIom3chDz6eaVtlFxgz2+QkvDElxFbuoSyO/QR1MawCWl v1ilJRGMn6HSmksdIKqK4KLcxRqNPVxFJ6fsr9WvPdYtbfIzod9zTjW4uljoF87w9fV/ uy1zqxHBBysVj1Z+cqfxrDg+JZNxRhj9ht/pH0G1afrmXCjk7sNn8JtgA/SWyKT0/CfW lR5Q== 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=n1ta8NR7kXLABeMYbha2SDOE9+G1pC8i6ptannheg7c=; b=ZqyYEh9R2wr0GWZJdEDCCS3GRtnd/hyAz5BvALL0S4CcTgXXPl8uQAga/t+XJJL0Q/ gvLgOQDFo4NzYG8Appltu4Hq7Dt+FAMcfRA18JQalIYq5BDAPgfMF5Ka4VBYyX4zMeJ+ WVWN7noDl/1GvetQgCaGsKXjXG3ltAvgfRT2eyLX9AblLnEdFdsR/qjKB6BFIZNjoIiz oQ7k9WuWMYQ7syMfZ834LNKK2n0UGUjcDRaB0fGVB1iE7pDANzUfW+3gEflVJNxwW9Z5 tdvJ1dfbvWdKf9wYrt6suH9HmhsjH1qj1OjBqYGcJuxp4uz2SnZN6TZN8g1xB+r7hA6t l/xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Dz2G3Mh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s186-20020a632cc3000000b00528d0d8b7bbsi14660481pgs.595.2023.06.16.05.19.37; Fri, 16 Jun 2023 05:19:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Dz2G3Mh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344739AbjFPLwS (ORCPT + 99 others); Fri, 16 Jun 2023 07:52:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344696AbjFPLwR (ORCPT ); Fri, 16 Jun 2023 07:52:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1F82199D for ; Fri, 16 Jun 2023 04:52:13 -0700 (PDT) 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=n1ta8NR7kXLABeMYbha2SDOE9+G1pC8i6ptannheg7c=; b=Dz2G3Mh+Lk8YOmDh0q55zwY860 TX26VsbO+nn10vqAWGxwj5e9geNA6X5LW92UTlEaCp9fcEN8WgxOu8ONd5XSfP7ogzzEwKt3u7WnH LL69dVdFS27iZtYWGqeXdJ0oup3g9+3ul7v5tpCdIgaEadSJBehKnuyl1nvLOaFf3LfXRvnXvp9/8 zH56LtzRLM3p5wS9tbRd4tXpQFnVEtblpmDUEr3EYpEM4Y44rajW8i00lotJu5keW13smNK5IJAn6 Cy8+qWYvEltHKnKeHb1iXOmBJ/xThG0zXNkd1Ye9ZDU9TwMxBQQ03K2gNQ9J5eVt1lTJLKDhhc5IR ec/WR4UQ==; 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.94.2 #2 (Red Hat Linux)) id 1qA7zc-008xqW-NM; Fri, 16 Jun 2023 11:51:52 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 4DB45300208; Fri, 16 Jun 2023 13:51:49 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 210BB2C009B6D; Fri, 16 Jun 2023 13:51:49 +0200 (CEST) Date: Fri, 16 Jun 2023 13:51:49 +0200 From: Peter Zijlstra To: Daniel Bristot de Oliveira Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Luca Abeni , Tommaso Cucinotta , Thomas Gleixner , Joel Fernandes , Vineeth Pillai , Shuah Khan Subject: Re: [RFC PATCH V3 6/6] sched/fair: Implement starvation monitor Message-ID: <20230616115149.GK83892@hirez.programming.kicks-ass.net> References: 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Thu, Jun 08, 2023 at 05:58:18PM +0200, Daniel Bristot de Oliveira wrote: > From: Juri Lelli > > Starting deadline server for lower priority classes right away when > first task is enqueued might break guarantees, as tasks belonging to > intermediate priority classes could be uselessly preempted. E.g., a well > behaving (non hog) FIFO task can be preempted by NORMAL tasks even if > there are still CPU cycles available for NORMAL tasks to run, as they'll > be running inside the fair deadline server for some period of time. > > To prevent this issue, implement a starvation monitor mechanism that Why should this be prevented? FIFO can be preempted by a higher priority FIFO/RR, or in this case by DEADLINE, and always by stop_task. Just accept this. Anything that's build around FIFO-99 not getting preempted is just plain broken. Don't try and pander to broken.