Re: How to avoid printk() delay caused by cond_resched() ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (03/02/16 14:38), Petr Mladek wrote:
[..]
> > 
> > CONFIG_PREEMPT_NONE=y
> > # CONFIG_PREEMPT_VOLUNTARY is not set
> > # CONFIG_PREEMPT is not set
> > CONFIG_PREEMPT_COUNT=y
> 
> preempt_disable() / preempt_enable() would do the job.
> The question is where to put it. If you are concerned about
> the delay, you might want to disable preemption around
> the whole locked area, so that it works reasonable also
> in the preemptive kernel.

another question is why cond_resched() is suddenly so expensive?
my guess is because of OOM, so we switch to tasks that potentially
do direct reclaims, etc. if so, then even offloaded printk will take
a significant amount of time to print the logs to the consoles; just
because it does cond_resched() after every call_console_drivers().


> I am looking forward to have the console printing offloaded
> into the workqueues. Then printk() will become consistently
> "fast" operation and will cause less surprises like this.

I'm all for it. I need this rework badly. If Jan is too busy at
the moment, which I surely can understand, then I'll be happy to
help ("pick up the patches". please, don't get me wrong).

	-ss

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]