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 X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2060C43465 for ; Mon, 21 Sep 2020 10:49:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29ADC2193E for ; Mon, 21 Sep 2020 10:49:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="WBss3/+L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726367AbgIUKt5 (ORCPT ); Mon, 21 Sep 2020 06:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726333AbgIUKt5 (ORCPT ); Mon, 21 Sep 2020 06:49:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DCBC061755; Mon, 21 Sep 2020 03:49:56 -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:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+Ce2j6BK4131uYjorGXmkaktnjo2xDWmD45iu81+eGY=; b=WBss3/+LJn25tf2jl2Kd4BllMI We3aM8pS1bHk+lP+j+FgiErzPOP5101rI+iEOmhIiBWuEclNOK8yjXeMc8p2hvO66DyHQqRG+ibdj fNxQM2TO9oPahOrflU5CGkUoPhPyktIfZxoWHOY3bCCiIiJip2uorUCAcIJ2/5F4nuohyg/YUHlNc d5O5AVK+rnqDUnKxbfw+9B12rKUynM8ObjyYjNOPdklvEWrciu+346Xxd6P1M8ap9VwFZ/Hd4PL88 Vr3wsnD98TRmaevM03kBW8JZcL8svKW7/HBzjsWyHFHP01ZNBq6xW7/V+e56JiWbSDZ5VukELoex3 jH5DmECw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKJOK-0008Ei-4J; Mon, 21 Sep 2020 10:49:52 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 4F336301478; Mon, 21 Sep 2020 12:49:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 89B2A243FFC0F; Mon, 21 Sep 2020 12:49:47 +0200 (CEST) Date: Mon, 21 Sep 2020 12:49:47 +0200 From: peterz@infradead.org To: Rob Clark , dri-devel@lists.freedesktop.org, Rob Clark , linux-arm-msm@vger.kernel.org, open list , timmurray@google.com, Tejun Heo Subject: Re: [PATCH 0/3] drm: commit_work scheduling Message-ID: <20200921104947.GQ1362448@hirez.programming.kicks-ass.net> References: <20200919193727.2093945-1-robdclark@gmail.com> <20200921092154.GJ438822@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200921092154.GJ438822@phenom.ffwll.local> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Mon, Sep 21, 2020 at 11:21:54AM +0200, Daniel Vetter wrote: > So question to rt/worker folks: What's the best way to let userspace set > the scheduling mode and priorities of things the kernel does on its > behalf? Surely we're not the first ones where if userspace runs with some > rt priority it'll starve out the kernel workers that it needs. Hardcoding > something behind a subsystem ioctl (which just means every time userspace > changes what it does, we need a new such flag or mode) can't be the right > thing. > > Peter, Tejun? So regular workqueues do not support RT priorities, but you can set their nice value somewhere in /sys. The kthread_work stuff used in these patches result in a regular kthread and as such the user interface for changing its scheduling class or priority is that of any other 'random' task. 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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8D97C43464 for ; Mon, 21 Sep 2020 10:49:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0AF7E206BE for ; Mon, 21 Sep 2020 10:49:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="WBss3/+L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AF7E206BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E9C76E044; Mon, 21 Sep 2020 10:49:57 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5CA786E044 for ; Mon, 21 Sep 2020 10:49:55 +0000 (UTC) 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:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+Ce2j6BK4131uYjorGXmkaktnjo2xDWmD45iu81+eGY=; b=WBss3/+LJn25tf2jl2Kd4BllMI We3aM8pS1bHk+lP+j+FgiErzPOP5101rI+iEOmhIiBWuEclNOK8yjXeMc8p2hvO66DyHQqRG+ibdj fNxQM2TO9oPahOrflU5CGkUoPhPyktIfZxoWHOY3bCCiIiJip2uorUCAcIJ2/5F4nuohyg/YUHlNc d5O5AVK+rnqDUnKxbfw+9B12rKUynM8ObjyYjNOPdklvEWrciu+346Xxd6P1M8ap9VwFZ/Hd4PL88 Vr3wsnD98TRmaevM03kBW8JZcL8svKW7/HBzjsWyHFHP01ZNBq6xW7/V+e56JiWbSDZ5VukELoex3 jH5DmECw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKJOK-0008Ei-4J; Mon, 21 Sep 2020 10:49:52 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 4F336301478; Mon, 21 Sep 2020 12:49:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 89B2A243FFC0F; Mon, 21 Sep 2020 12:49:47 +0200 (CEST) Date: Mon, 21 Sep 2020 12:49:47 +0200 From: peterz@infradead.org To: Rob Clark , dri-devel@lists.freedesktop.org, Rob Clark , linux-arm-msm@vger.kernel.org, open list , timmurray@google.com, Tejun Heo Subject: Re: [PATCH 0/3] drm: commit_work scheduling Message-ID: <20200921104947.GQ1362448@hirez.programming.kicks-ass.net> References: <20200919193727.2093945-1-robdclark@gmail.com> <20200921092154.GJ438822@phenom.ffwll.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200921092154.GJ438822@phenom.ffwll.local> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Sep 21, 2020 at 11:21:54AM +0200, Daniel Vetter wrote: > So question to rt/worker folks: What's the best way to let userspace set > the scheduling mode and priorities of things the kernel does on its > behalf? Surely we're not the first ones where if userspace runs with some > rt priority it'll starve out the kernel workers that it needs. Hardcoding > something behind a subsystem ioctl (which just means every time userspace > changes what it does, we need a new such flag or mode) can't be the right > thing. > > Peter, Tejun? So regular workqueues do not support RT priorities, but you can set their nice value somewhere in /sys. The kthread_work stuff used in these patches result in a regular kthread and as such the user interface for changing its scheduling class or priority is that of any other 'random' task. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel