From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 388E6EB64D7 for ; Fri, 16 Jun 2023 11:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240295AbjFPLwU (ORCPT ); Fri, 16 Jun 2023 07:52:20 -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: 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.