Re: [Query] Preemption (hogging) of the work handler
From: Viresh Kumar
Date: Tue Jul 12 2016 - 10:04:35 EST
On 12-07-16, 15:56, Petr Mladek wrote:
> Ah, I have missed that the hang happens only when you use the async
> printk patchset.
And that also doesn't happen always, but only sometimes. So there is a
race somewhere I feel :)
> I wonder if it is somehow related to the commit 8d91f8b15361dfb438ab
> ("printk: do cond_resched() between lines while outputting to
> consoles"). A process (printk thread) might sleep with taken
> console_sem. Then suspend_console() might be unable to
> get the semaphore in console_lock() and might deadlock.
I am not sure at this point really, and I don't have indepth knowledge
of printk core as well (I should accept that here :).
> Does it help to enable "no_console_suspend" please?
No. With no_console_suspend, we just print one more line (Disabling
non-boot CPUs) and once the interrupt on the local CPU are disabled,
we don't get any more prints until a resume happens.
--
viresh