public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How is the progress for removing flush_scheduled_work() callers?
@ 2022-11-06 10:28 Tetsuo Handa
  2022-11-16 10:08 ` [Intel-gfx] " Jani Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Tetsuo Handa @ 2022-11-06 10:28 UTC (permalink / raw)
  To: MPT-FusionLinux.pdl, dm-devel, DRI, Intel Graphics Development,
	linux-scsi, LKML

Like commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using a
macro") says, flush_scheduled_work() is dangerous and will be forbidden.
We are on the way for removing all flush_scheduled_work() callers from
the kernel, and there are only 4 callers remaining as of linux-20221104.

  drivers/gpu/drm/i915/display/intel_display.c:8997:      flush_scheduled_work();
  drivers/gpu/drm/i915/gt/selftest_execlists.c:88:        flush_scheduled_work();
  drivers/md/dm.c:234:    flush_scheduled_work();
  drivers/message/fusion/mptscsih.c:1234: flush_scheduled_work();

I'm planning to start emitting runtime messages in linux-next.git tree.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] How is the progress for removing flush_scheduled_work() callers?
  2022-11-06 10:28 How is the progress for removing flush_scheduled_work() callers? Tetsuo Handa
@ 2022-11-16 10:08 ` Jani Nikula
  2022-11-16 13:06   ` Ville Syrjälä
  0 siblings, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2022-11-16 10:08 UTC (permalink / raw)
  To: Tetsuo Handa, DRI, Intel Graphics Development, LKML

On Sun, 06 Nov 2022, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
> Like commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using a
> macro") says, flush_scheduled_work() is dangerous and will be forbidden.
> We are on the way for removing all flush_scheduled_work() callers from
> the kernel, and there are only 4 callers remaining as of linux-20221104.
>
>   drivers/gpu/drm/i915/display/intel_display.c:8997:      flush_scheduled_work();

Thanks for the reminder, I've pinged folks to get someone working on
this. We do schedule quite a bunch of work, so it's not immediately
obvious (at least to me) what exactly needs flushing.

https://gitlab.freedesktop.org/drm/intel/-/issues/7546

>   drivers/gpu/drm/i915/gt/selftest_execlists.c:88:        flush_scheduled_work();

Removed by commit 7d33fd02dd94 ("drm/i915/selftests: Remove
flush_scheduled_work() from live_execlists") in drm-next.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] How is the progress for removing flush_scheduled_work() callers?
  2022-11-16 10:08 ` [Intel-gfx] " Jani Nikula
@ 2022-11-16 13:06   ` Ville Syrjälä
  2023-02-23  1:51     ` Tetsuo Handa
  0 siblings, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2022-11-16 13:06 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Tetsuo Handa, DRI, Intel Graphics Development, LKML

On Wed, Nov 16, 2022 at 12:08:27PM +0200, Jani Nikula wrote:
> On Sun, 06 Nov 2022, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
> > Like commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using a
> > macro") says, flush_scheduled_work() is dangerous and will be forbidden.
> > We are on the way for removing all flush_scheduled_work() callers from
> > the kernel, and there are only 4 callers remaining as of linux-20221104.
> >
> >   drivers/gpu/drm/i915/display/intel_display.c:8997:      flush_scheduled_work();
> 
> Thanks for the reminder, I've pinged folks to get someone working on
> this. We do schedule quite a bunch of work, so it's not immediately
> obvious (at least to me) what exactly needs flushing.

Here's my earlier cursory analysis of the subject:
https://lore.kernel.org/intel-gfx/Yy3byxFrfAfQL9xK@intel.com/

> 
> https://gitlab.freedesktop.org/drm/intel/-/issues/7546
> 
> >   drivers/gpu/drm/i915/gt/selftest_execlists.c:88:        flush_scheduled_work();
> 
> Removed by commit 7d33fd02dd94 ("drm/i915/selftests: Remove
> flush_scheduled_work() from live_execlists") in drm-next.
> 
> BR,
> Jani.
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] How is the progress for removing flush_scheduled_work() callers?
  2022-11-16 13:06   ` Ville Syrjälä
@ 2023-02-23  1:51     ` Tetsuo Handa
  0 siblings, 0 replies; 4+ messages in thread
From: Tetsuo Handa @ 2023-02-23  1:51 UTC (permalink / raw)
  To: Ville Syrjälä, Jani Nikula
  Cc: DRI, Intel Graphics Development, LKML

On 2022/11/16 22:06, Ville Syrjälä wrote:
> On Wed, Nov 16, 2022 at 12:08:27PM +0200, Jani Nikula wrote:
>> On Sun, 06 Nov 2022, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:
>>> Like commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using a
>>> macro") says, flush_scheduled_work() is dangerous and will be forbidden.
>>> We are on the way for removing all flush_scheduled_work() callers from
>>> the kernel, and there are only 4 callers remaining as of linux-20221104.
>>>
>>>   drivers/gpu/drm/i915/display/intel_display.c:8997:      flush_scheduled_work();
>>
>> Thanks for the reminder, I've pinged folks to get someone working on
>> this. We do schedule quite a bunch of work, so it's not immediately
>> obvious (at least to me) what exactly needs flushing.
> 
> Here's my earlier cursory analysis of the subject:
> https://lore.kernel.org/intel-gfx/Yy3byxFrfAfQL9xK@intel.com/

Now that a patch for mptscsih.c was proposed as
https://lkml.kernel.org/r/0b9ebcfb-b647-1381-0653-b54528a64a86@I-love.SAKURA.ne.jp ,
intel_display.c is going to become the last flush_scheduled_work() user.

If fixing the hpd disable path takes more time, should we start with moving
related works from system_wq to a local workqueue dedicated for intel_display.c ?

> 
>>
>> https://gitlab.freedesktop.org/drm/intel/-/issues/7546
>>
>>>   drivers/gpu/drm/i915/gt/selftest_execlists.c:88:        flush_scheduled_work();
>>
>> Removed by commit 7d33fd02dd94 ("drm/i915/selftests: Remove
>> flush_scheduled_work() from live_execlists") in drm-next.
>>
>> BR,
>> Jani.
>>
>> -- 
>> Jani Nikula, Intel Open Source Graphics Center
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-23  1:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-06 10:28 How is the progress for removing flush_scheduled_work() callers? Tetsuo Handa
2022-11-16 10:08 ` [Intel-gfx] " Jani Nikula
2022-11-16 13:06   ` Ville Syrjälä
2023-02-23  1:51     ` Tetsuo Handa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox