Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1057006pxu; Thu, 8 Oct 2020 02:02:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo9J9jxu3Xh3LK06fTnFSJX2MWaU3d2NRJiBv7ZZGUwjeFX79QXzyvwuEqAeRR96chqq9N X-Received: by 2002:a05:6402:754:: with SMTP id p20mr1360847edy.109.1602147770940; Thu, 08 Oct 2020 02:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602147770; cv=none; d=google.com; s=arc-20160816; b=wUCsuF016zTWI/G0PQlsDNo7Elx3EWaGF3uUmfgJHjBa36LUQSRtfKXGGudPJJ4Ssy nJbzzIMvlpVRtSqSq6yY4ZwMkjeuFPLl1rlkittVU0HryE8VhKrofkZwkmuiHLTBiP2V Ba2eeGIUbrIq9ntWW0suoTZ9/E7y8ypNayzGmcsH8SnWFloSX1kE3ZgzxRJlopxC9ohG oBwYc0rAmZ5mmFlbeTtkJ4U34duWebLKHCV7hfGOUw0ShDuPSFFTVMsZLL6WWYQajg9s Sx1vcqfaIhWE/ijid7J2claYb2Si7i1SUnWSwvAkAo+MGtVbVLBSIXFDgHoVmCDe3snC DItA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=VUAFWt0jsU67yxQSiuc28b+yCvtDHtBz/QsK55P6/ic=; b=TNSmfFGM+VG/LKr4/2dVgRu4BKhfhck0coyQ8WzJo+dW+yP4ixjsmBBQDCp8DgayM3 x9VjU2nItIXQ/AkzI0GoFx1TXx0pKkzLna6orkfGeTQhyKFmIt/hlh3T9dcvKx4qovrQ j+AG/uCLxWPPDbowZJ43A4mu9rw35okE7CDS9+0g1mkuGpFvXmoeP6Y2SfaKXPYZMXqX nxfdmJYEpqEdxa6/h35GTLcV75FHQVkwe5fW/y71/9ktCUHCrfh2j94bT9TeHV33TalL 502zI3VrUaMuVwdvPspRjWrCIlnCXQD55L/vMZlhu3PI0ao6UgLZLoAHxVMNKLJBFbnW Icag== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si3061559ejc.653.2020.10.08.02.02.28; Thu, 08 Oct 2020 02:02:50 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728575AbgJHIYS (ORCPT + 99 others); Thu, 8 Oct 2020 04:24:18 -0400 Received: from mga18.intel.com ([134.134.136.126]:54461 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728549AbgJHIYR (ORCPT ); Thu, 8 Oct 2020 04:24:17 -0400 IronPort-SDR: tkGKDUA4V76c5duqIPxpNAXBmvp9VHngDwmGnYftbrXKIDpUx9BJPPz/vFJdcW70Ug6G0tLOzB w98/XwrZm64Q== X-IronPort-AV: E=McAfee;i="6000,8403,9767"; a="153133237" X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="153133237" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 01:24:15 -0700 IronPort-SDR: G8xnXCtgmC4/g92wR5jrFHt00I7i4yvQ0gk9IdWr6pN7aCGoCsMdT9y8QfQn1lTPmYjg8MYjLA m+dm9gB/9iAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="297875033" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga007.fm.intel.com with SMTP; 08 Oct 2020 01:24:12 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 08 Oct 2020 11:24:11 +0300 Date: Thu, 8 Oct 2020 11:24:11 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Rob Clark Cc: Daniel Vetter , Rob Clark , linux-arm-msm , open list , Tim Murray , dri-devel , Tejun Heo , Qais Yousef Subject: Re: [PATCH v2 0/3] drm: commit_work scheduling Message-ID: <20201008082411.GE6112@intel.com> References: <20200930211723.3028059-1-robdclark@gmail.com> <20201002105256.GA6112@intel.com> <20201002110544.GB6112@intel.com> <20201005121524.GI6112@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2020 at 09:44:09AM -0700, Rob Clark wrote: > On Mon, Oct 5, 2020 at 5:15 AM Ville Syrj?l? > wrote: > > > > On Fri, Oct 02, 2020 at 10:55:52AM -0700, Rob Clark wrote: > > > On Fri, Oct 2, 2020 at 4:05 AM Ville Syrj?l? > > > wrote: > > > > > > > > On Fri, Oct 02, 2020 at 01:52:56PM +0300, Ville Syrj?l? wrote: > > > > > On Thu, Oct 01, 2020 at 05:25:55PM +0200, Daniel Vetter wrote: > > > > > > On Thu, Oct 1, 2020 at 5:15 PM Rob Clark wrote: > > > > > > > > > > > > > > I'm leaning towards converting the other drivers over to use the > > > > > > > per-crtc kwork, and then dropping the 'commit_work` from atomic state. > > > > > > > I can add a patch to that, but figured I could postpone that churn > > > > > > > until there is some by-in on this whole idea. > > > > > > > > > > > > i915 has its own commit code, it's not even using the current commit > > > > > > helpers (nor the commit_work). Not sure how much other fun there is. > > > > > > > > > > I don't think we want per-crtc threads for this in i915. Seems > > > > > to me easier to guarantee atomicity across multiple crtcs if > > > > > we just commit them from the same thread. > > > > > > > > Oh, and we may have to commit things in a very specific order > > > > to guarantee the hw doesn't fall over, so yeah definitely per-crtc > > > > thread is a no go. > > > > > > If I'm understanding the i915 code, this is only the case for modeset > > > commits? I suppose we could achieve the same result by just deciding > > > to pick the kthread of the first CRTC for modeset commits. I'm not > > > really so much concerned about parallelism for modeset. > > > > I'm not entirely happy about the random differences between modesets > > and other commits. Ideally we wouldn't need any. > > > > Anyways, even if we ignore modesets we still have the issue with > > atomicity guarantees across multiple crtcs. So I think we still > > don't want per-crtc threads, rather it should be thread for each > > commit. > > I don't really see any other way to solve the priority inversion other > than per-CRTC kthreads. What's the problem with just something like a dedicated commit thread pool? > I've been thinking about it a bit more, and > my conclusion is: > > (1) There isn't really any use for the N+1'th commit to start running > before the kthread_work for the N'th commit completes, so I don't mind > losing the unbound aspect of the workqueue approach > (2) For cases where there does need to be serialization between > commits on different CRTCs, since there is a per-CRTC kthread, you > could achieve this with locking > > Since i915 isn't using the atomic helpers here, I suppose it is an > option for i915 to just continue doing what it is doing. > > And I could ofc just stop using the atomic commit helper and do the > kthreads thing in msm. But my first preference would be that the > commit helper does generally the right thing. > > BR, > -R -- Ville Syrj?l? Intel