Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1119898pxu; Thu, 8 Oct 2020 04:01:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2lOX6Huw+lMFBxUSbMugcYRsORf3/fubH+llFGRxMMWCGge8ihSvD7/teMA5d0EC63qLh X-Received: by 2002:a05:6402:3070:: with SMTP id bs16mr8508240edb.371.1602154863084; Thu, 08 Oct 2020 04:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602154863; cv=none; d=google.com; s=arc-20160816; b=pCUeZ5hm/zZgnZee+jmOLHhzA+a+gPVg/WXLwt3VhO2tLVgWw5d4v0AmnRP+itBsS/ 3+hPuFFCwmn5HSS0RHReQh+Np+zypzfeFKShEKMpJy8oHDA02UAP7Qfne55z9OLG0Mny HebzW9Jq+VGXzczfQGeR9Qk+NXpTZen2BroOglPQrtOOFCzoAysiVGzg1aiYY2u2di5X EzMj5ZZMqyp8Xf1/XfVHmQxHL4ct6pwO9YYRZ4vfl51qtfViuWNHa/J37mhjMq/M1IeY pyIxredvfDC8Ym1t/PANvVbL9izkI7RFOFBM3BKbw/Ym2+W9sL5NvH1IypdNixdFmiaJ WPTg== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=NmvuDeQQ68fAr0cZvkw5ZZnQ3bYV0o7ikQbQcMSffHA=; b=k4IMeP46CR2xzWYZF3yzClHMcV6s3BKZ+EobK0rYS+K9smbQbvxeCK8lfPaPhZ8KMK eFGlzKiq+wUJYB8aIuDKqbqUuaMsbrwA+i2S8OgwCmtLNk7kIMq5Zy0XMn/09rph8oph MNjbMODU6Ed0yC7yuDnkqHFaNWnVPGPVdZl04LVJhr4JpDunTTnwTOTWvrY/1yGR5Uol tO7NRhBXJHLvlTZVEev6NQt9eospa+am5GGamBAR4IgvZ+85L7gdwz2TrS/tleYH6PHw /5jlJHp4zv8xXFt6lShG/q2n2BurbuymieJcOqVdY3yFKTmvt+h/LbVQwBPS1AiZEGHk ICDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IoMP30tF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gh7si2565981ejb.57.2020.10.08.04.00.39; Thu, 08 Oct 2020 04:01:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IoMP30tF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728676AbgJHJKX (ORCPT + 99 others); Thu, 8 Oct 2020 05:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgJHJKX (ORCPT ); Thu, 8 Oct 2020 05:10:23 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF826C0613D2 for ; Thu, 8 Oct 2020 02:10:22 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id e17so5693992wru.12 for ; Thu, 08 Oct 2020 02:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=NmvuDeQQ68fAr0cZvkw5ZZnQ3bYV0o7ikQbQcMSffHA=; b=IoMP30tFPiiyY7f7IUPEUA40EfgfRPZaLhIqfx2wcIEygd6oOg7riHRTfX2TaCutXo pnRZ1GaAndBxRFh5A7RAD/v+lZngkZEC74SMRcjicdjX3dZg97AVZATnbe4owIY7Z+CZ czqp49LbLEPYEjMUzLhFgZj+Of8R52buKekio= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=NmvuDeQQ68fAr0cZvkw5ZZnQ3bYV0o7ikQbQcMSffHA=; b=F2mfMOLRAvrYUtUClpTE556MhT/gr4ZusDdawzJ9P5wzAGYh2ZgBISvx1WazPLaKfN nWh7s/y0wP38VrK6p8yuActjrwnQh8YAb+uRdzx8wW7Z9cPyczqTIVBb//+swawD+oI7 7HUGAgR+V2J/TKmyy3opgorxxiakSsYWv0eYtuXlssRJcCwQekhO6s6IfngIcGNSrFSH 9p8j7BRns0cPvDJjKUjQjdAqVUJKkRiOXKQWsYjf5hGGHOwWIa30j2WNwWFAOU+BhoUF qslc3vBFjbGz1ab7afid4qbNpmHnO8Yd2iWdlHosVN6ssnT8ruliDr/XfqijOJJZRtMR Of0g== X-Gm-Message-State: AOAM530THg+8Cbp8DEJtE7prhAsF2/Fi22b4y1Cqw976gl/Ic1kXwzj4 ZdqMAJhF+htiSx6cSpCmQbTucg== X-Received: by 2002:adf:de11:: with SMTP id b17mr8040287wrm.82.1602148221365; Thu, 08 Oct 2020 02:10:21 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id y14sm5713916wma.48.2020.10.08.02.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 02:10:20 -0700 (PDT) Date: Thu, 8 Oct 2020 11:10:17 +0200 From: Daniel Vetter To: Qais Yousef Cc: Rob Clark , dri-devel , linux-arm-msm , Tejun Heo , Tim Murray , Daniel Vetter , Rob Clark , open list , Steven Rostedt , "Peter Zijlstra (Intel)" Subject: Re: [PATCH v2 0/3] drm: commit_work scheduling Message-ID: <20201008091017.GD438822@phenom.ffwll.local> Mail-Followup-To: Qais Yousef , Rob Clark , dri-devel , linux-arm-msm , Tejun Heo , Tim Murray , Rob Clark , open list , Steven Rostedt , "Peter Zijlstra (Intel)" References: <20200930211723.3028059-1-robdclark@gmail.com> <20201002110105.e56qrvzoqfioi4hs@e107158-lin.cambridge.arm.com> <20201005150024.mchfdtd62rlkuh4s@e107158-lin.cambridge.arm.com> <20201006105918.v3xspb6xasjyy5ky@e107158-lin.cambridge.arm.com> <20201007103653.qjohhta7douhlb22@e107158-lin.cambridge.arm.com> <20201007163010.bfgst6xfvkn2lzrk@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201007163010.bfgst6xfvkn2lzrk@e107158-lin.cambridge.arm.com> X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2020 at 05:30:10PM +0100, Qais Yousef wrote: > On 10/07/20 08:57, Rob Clark wrote: > > Yeah, I think we will end up making some use of uclamp.. there is > > someone else working on that angle > > > > But without it, this is a case that exposes legit prioritization > > problems with commit_work which we should fix ;-) > > I wasn't suggesting this as an alternative to fixing the other problem. But it > seemed you had a different problem here that I thought I could help with :-) > > I did give my opinion about how to handle that priority issue. If the 2 threads > are kernel threads and by design they need relative priorities IMO the kernel > need to be taught to set this relative priority. It seemed the vblank worker > could run as SCHED_DEADLINE. If this works, then the priority problem for > commit_work disappears as SCHED_DEADLINE will preempt RT. If commit_work uses > sched_set_fifo(), its priority will be 50, hence your SF threads can no longer > preempt it. And you can manage the SF threads to be any value you want relative > to 50 anyway without having to manage commit_work itself. > > I'm not sure if you have problems with RT tasks preempting important CFS > tasks. My brain registered two conflicting statements. I think the problem is there's two modes cros runs in: Normal cros mode, which mostly works like a linux desktop. CFS commit work seems fine. Other mode is android emulation, where we have the surface flinger thread running at SCHED_FIFO. I think Rob's plan is to runtime switch priorities to match each use case. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch