From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754808AbcGFNpg (ORCPT ); Wed, 6 Jul 2016 09:45:36 -0400 Received: from mail-yw0-f177.google.com ([209.85.161.177]:33638 "EHLO mail-yw0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754174AbcGFNpe (ORCPT ); Wed, 6 Jul 2016 09:45:34 -0400 Date: Wed, 6 Jul 2016 09:45:32 -0400 From: Tejun Heo To: Michel =?iso-8859-1?Q?D=E4nzer?= Cc: Bhaktipriya Shridhar , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/radeon: Remove deprecated create_singlethread_workqueue Message-ID: <20160706134532.GF3262@mtj.duckdns.org> References: <20160702110350.GA3601@Karyakshetra> <20160702134614.GB17431@htj.duckdns.org> <9e69b1fd-eb93-1fee-15af-c905ee3a202f@daenzer.net> <20160705210644.GB25394@htj.duckdns.org> <936c5bae-b8e6-bf64-8be2-d27608814fac@daenzer.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <936c5bae-b8e6-bf64-8be2-d27608814fac@daenzer.net> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Michel. On Wed, Jul 06, 2016 at 12:12:52PM +0900, Michel Dänzer wrote: > There is an ordering requirement between the two queues, but it's > enforced by the driver (by only queuing the unpin work once a flip has > completed, which only happens after the corresponding flip work has run). Oh I see. > Not being very familiar with the workqueue APIs, I'll describe how it's > supposed to work from a driver POV, which will hopefully help you guys > decide on the most appropriate alloc_workqueue parameters. > > There is one flip work queue for each hardware CRTC. At most one > radeon_flip_work_func item can be queued for any of them at any time. > When a radeon_flip_work_func item is queued, it should be executed ASAP > (so WQ_HIGHPRI might be appropriate?). Hmmm... the only time WQ_HIGHPRI should be used is when it'd otherwise require a kthread w/ nice value at -20. Would that be the case here? What are the consequences of the work item getting delayed? Also, what kind of delays matter here? Is it millisec range or micro? > In contrast, the radeon_unpin_work_func items aren't particularly > urgent, and it's okay for several of them to be queued up. So I guess it > would actually make sense to use a different workqueue for them, maybe > even the default one? If the flip work doesn't require high priority kthread, both of them can be queued to system_wq and flushed individually on shutdown. The default workqueue now has high enough concurrency that it isn't necessary to worry about getting delayed by other work items. Thanks. -- tejun