Loading kernel/workqueue.c +8 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include <linux/uaccess.h> #include <linux/sched/isolation.h> #include <linux/nmi.h> #include <linux/bug.h> #include <linux/delay.h> #include "workqueue_internal.h" Loading Loading @@ -1274,6 +1276,12 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork, if (work_is_canceling(work)) return -ENOENT; cpu_relax(); /* * The queueing is in progress in another context. If we keep * taking the pool->lock in a busy loop, the other context may * never get the lock. Give 1 usec delay to avoid this contention. */ udelay(1); return -EAGAIN; } Loading Loading
kernel/workqueue.c +8 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include <linux/uaccess.h> #include <linux/sched/isolation.h> #include <linux/nmi.h> #include <linux/bug.h> #include <linux/delay.h> #include "workqueue_internal.h" Loading Loading @@ -1274,6 +1276,12 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork, if (work_is_canceling(work)) return -ENOENT; cpu_relax(); /* * The queueing is in progress in another context. If we keep * taking the pool->lock in a busy loop, the other context may * never get the lock. Give 1 usec delay to avoid this contention. */ udelay(1); return -EAGAIN; } Loading