public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: "Bhaktipriya Shridhar" <bhaktipriya96@gmail.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/radeon: Remove deprecated create_singlethread_workqueue
Date: Wed, 6 Jul 2016 09:45:32 -0400	[thread overview]
Message-ID: <20160706134532.GF3262@mtj.duckdns.org> (raw)
In-Reply-To: <936c5bae-b8e6-bf64-8be2-d27608814fac@daenzer.net>

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

  reply	other threads:[~2016-07-06 13:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-02 11:03 [PATCH] drm/radeon: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-07-02 13:46 ` Tejun Heo
2016-07-04  3:58   ` Michel Dänzer
2016-07-05 21:06     ` Tejun Heo
2016-07-06  3:12       ` Michel Dänzer
2016-07-06 13:45         ` Tejun Heo [this message]
2016-07-07  3:32           ` Michel Dänzer
2016-07-07  7:43             ` Christian König
2016-07-08  5:52               ` Michel Dänzer
2016-07-12 17:52                 ` Tejun Heo
2016-07-16 11:30                   ` [PATCH v2] " Bhaktipriya Shridhar
2016-07-18 13:21                     ` Christian König
2016-07-19  0:48                     ` Tejun Heo
2016-07-28 16:14                       ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2016-06-28 17:26 [PATCH] " Bhaktipriya Shridhar
2016-06-28 17:44 ` Bhaktipriya Shridhar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160706134532.GF3262@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=alexander.deucher@amd.com \
    --cc=bhaktipriya96@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel@daenzer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox