Re: [PATCH] mm,page_alloc: Serialize out_of_memory() and allocation stall messages.

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

 



Tetsuo Handa wrote:
> While warn_alloc() messages are completely unreadable, what we should note are that
> 
>  (a) out_of_memory() => oom_kill_process() => dump_header() => show_mem() => printk()
>      got stuck at console_unlock() despite this is schedulable context.
> 
> ----------
> 2180:   for (;;) {
> 2181:           struct printk_log *msg;
> 2182:           size_t ext_len = 0;
> 2183:           size_t len;
> 2184:
> 2185:           printk_safe_enter_irqsave(flags);
> 2186:           raw_spin_lock(&logbuf_lock);
> (...snipped...)
> 2228:           console_idx = log_next(console_idx);
> 2229:           console_seq++;
> 2230:           raw_spin_unlock(&logbuf_lock);
> 2231:
> 2232:           stop_critical_timings();        /* don't trace print latency */
> 2233:           call_console_drivers(ext_text, ext_len, text, len);
> 2234:           start_critical_timings();
> 2235:           printk_safe_exit_irqrestore(flags); // console_unlock+0x24e/0x4c0 is here.
> 2236:
> 2237:           if (do_cond_resched)
> 2238:                   cond_resched();
> 2239:   }
> ----------

It turned out that cond_resched() was not called due to do_cond_resched == 0 due to
preemptible() == 0 due to CONFIG_PREEMPT_COUNT=n despite CONFIG_PREEMPT_VOLUNTARY=y,
for CONFIG_PREEMPT_VOLUNTARY itself does not select CONFIG_PREEMPT_COUNT. Surprising...

--
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 OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux