Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5561090pxb; Mon, 28 Mar 2022 14:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGs2HdMiTgRncW7mFcwVBytat4Q7m4Wh2IkH51t8yZ0b10MJQckfa+3TC5EMcgERaPsuIu X-Received: by 2002:a05:6830:1b73:b0:5b2:2d0f:226a with SMTP id d19-20020a0568301b7300b005b22d0f226amr11006444ote.296.1648502068229; Mon, 28 Mar 2022 14:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648502068; cv=none; d=google.com; s=arc-20160816; b=TShiee3aMvMemhTzwbVZFbhpdYzYVtzRvezR1pVXIniP74FoxBV+PE+ndtMyrGTPMX LZ67gTm7oCez8fmhDeq7H3yopzfmoDMLWnaqo378SJzNw09sxn2Qr0wGN7gpboy99OiQ 0JWG8e13x/JFWAxCjMLcVqiISCCGgfc3Y+rzhKOmTi3qIf+cm5yOo7l+M3a7Bk6gCWz1 HE6Xjun3AtjX/Jh0RzqMx7V/30oY8mqex34uyLhj/CVNFwcGhvC0sUf1B0Jra8RJKB8X uI9eQFsMPjLVUqk+Fb2oEHbib5BLcdYMhXDjkW2+kP5gRRuF3s/O+rM+0hGdc5B0rwg1 mqPA== 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:dkim-signature :dkim-signature:date; bh=nRISlRawsY/q0M9hXgY2Ak8V5Zf/qjZAd7pD8o0Pf34=; b=PtVsGHz1HSlBEaOd+lsQEO2hf0p3JpKlXa7ahE23dgMsQaU3OpbrIkFbmqGGPR+/NK K7LDHI4/IAgN4VPki2dULQ0zVyDgd+LP/ZdvD6QCgenV9NFujP/UVmT72jwN5Ma7at71 Xyew39+0j3S/JSgn23RvTKfusUDcED5huezglFm5Thu/VospBYh9pk0uYVbn9qUxT/2Q QmCpHe9+ER9JyW13cYyXfMJp0GN9DDtSrvTHgnBvQYQamx6QzvSYXOeWuGurXbBSip9f gy2Jb1h3T3JOPPMpDpofjRuWM/REg/VWtxa2oYK5gdbtfWHg/yPtT2p/sF/EIqlrA1F2 5I8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=imraXrXw; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bp18-20020a056808239200b002ef78a36ec3si13685786oib.215.2022.03.28.14.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 14:14:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=imraXrXw; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3A5DC7523D; Mon, 28 Mar 2022 14:05:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240154AbiC1KHr (ORCPT + 99 others); Mon, 28 Mar 2022 06:07:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236973AbiC1KHp (ORCPT ); Mon, 28 Mar 2022 06:07:45 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 364FB53B7D; Mon, 28 Mar 2022 03:06:01 -0700 (PDT) Date: Mon, 28 Mar 2022 12:05:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1648461959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nRISlRawsY/q0M9hXgY2Ak8V5Zf/qjZAd7pD8o0Pf34=; b=imraXrXwOIBRUqeX6f4kk2VW1BI7XdqTLWCh6CLQW6V6CMVM+9hBlrJ6DAYIkH71rWav0G IXRIU6OOw4S+LiTdD1RX1Wpy4EuK71bfrWNFiio9somxxHA2t3rJLH/WunI0ABbCvGlJwL d5umqSHYiqiX2cbry8XKb3qdw5DeaO1kyuEEC1z05ZKakIqZCrBAvRPWvRkRrb/mlB9LX6 bSl1EbwKkPg4zJ2PPqN8xZYR4UVCyVXElopdq58lH1Lx3O1xUoByh7rXo3ZtCR5VG2RUHO J2YvPKpR0HWLDF2XirO671N350oKFrdxWVc4KEi+EVwDYo5ZYoXpUxH348JToA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1648461959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nRISlRawsY/q0M9hXgY2Ak8V5Zf/qjZAd7pD8o0Pf34=; b=IQl8AKJE/iMGjFgEy+MFcySwLY3ow/EFjnR3gfWJlXKvwT6lD82wvA+TcjjcQbcqG+nJs0 0ePcw/0eObqTTzBg== From: Sebastian Andrzej Siewior To: Rasmus Villemoes Cc: Tejun Heo , Lai Jiangshan , linux-kernel@vger.kernel.org, =?utf-8?B?QW5kcsOp?= Pribil , Steven Walter , Oleksij Rempel , Esben Haabendal , Jiri Slaby , Pengutronix Kernel Team , Peter Hurley , linux-rt-users@vger.kernel.org Subject: Re: [RFC PATCH 0/2] RT scheduling policies for workqueues Message-ID: References: <20220323145600.2156689-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220323145600.2156689-1-linux@rasmusvillemoes.dk> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 2022-03-23 15:55:58 [+0100], Rasmus Villemoes wrote: > This RFC is motivated by an old problem in the tty layer. Ever since > commit a9c3f68f3cd8 (tty: Fix low_latency BUG), use of UART for > real-time applications has been problematic. Even if both the > application itself and the irq thread are set to SCHED_FIFO, the fact > that the flush_to_ldisc work is scheduled on the generic and global > system_unbound_wq (with all workers running at normal scheduling > priority) means that UART RX can suffer unbounded latency. Having a kthread per "low-latency" tty instance is something I would prefer. The kwork corner is an anonymous worker instance and probably does more harm than good. Especially if it is a knob for everyone which is used for the wrong reasons and manages to be harmful in the end. With a special kthread for a particular tty, the thread can be assigned with the desired priority within the system and ttyS1 can be distinguished from ttyS0 (and so on). This turned out to be useful in a few setups over the years. Sebastian