Skip to content

Commit 1d64b65

Browse files
committed
Input: serio/gameport - use 'long' system workqueue
Commit 8ee294c converted serio subsystem event handling from using a dedicated thread to using common workqueue. Unfortunately, this regressed our boot times, due to the fact that serio jobs take long time to execute. While the new concurrency managed workqueue code manages long-playing works just fine and schedules additional workers as needed, such works wreck havoc among remaining users of flush_scheduled_work(). To solve this problem let's move serio/gameport works from system_wq to system_long_wq which nobody tries to flush. Reported-and-tested-by: Hernando Torque <pantherchen@versanet.de> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 parent 9bb794a commit 1d64b65

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/input/gameport/gameport.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static int gameport_queue_event(void *object, struct module *owner,
360360
event->owner = owner;
361361

362362
list_add_tail(&event->node, &gameport_event_list);
363-
schedule_work(&gameport_event_work);
363+
queue_work(system_long_wq, &gameport_event_work);
364364

365365
out:
366366
spin_unlock_irqrestore(&gameport_event_lock, flags);

‎drivers/input/serio/serio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static int serio_queue_event(void *object, struct module *owner,
299299
event->owner = owner;
300300

301301
list_add_tail(&event->node, &serio_event_list);
302-
schedule_work(&serio_event_work);
302+
queue_work(system_long_wq, &serio_event_work);
303303

304304
out:
305305
spin_unlock_irqrestore(&serio_event_lock, flags);

0 commit comments

Comments
 (0)