[PATCH] drm/i915: avoid flush_scheduled_work() usage

Tetsuo Handa penguin-kernel at I-love.SAKURA.ne.jp
Mon Mar 6 11:17:01 UTC 2023


On 2023/03/06 20:05, Jani Nikula wrote:
> On Fri, 03 Mar 2023, Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp> wrote:
>> On 2023/03/03 19:11, Tetsuo Handa wrote:
>>> @@ -79,6 +81,7 @@ static int __init i915_init(void)
>>>  {
>>>  	int err, i;
>>>  
>>> +	i915_wq = alloc_workqueue("i915", 0, 0);
>>
>> Oops. I forgot to add
>>
>> 	if (!i915_wq)
>> 		return -ENOMEM;
>>
>> here. But I'd like to wait for your response for a while before submitting v2 patch.
> 
> Looks like accounting for every schedule_work() and friends that we have
> is pretty difficult at this point, so I agree going for a local
> workqueue and flushing that is probably the way to go. Work specific
> cleanups can follow.
> 
> However, we really don't want to add new module globals, not for this,
> not for anything. So for most things it would have to be i915 device
> specific. And that, in turn, would have to be two workqueues, one for
> display, one for other stuff. Don't want to mix the two.
> 

Thank you for responding. Please go that way.
(I'm not familiar enough to propose a patch.)



More information about the dri-devel mailing list