lkml.org 
[lkml]   [2011]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject3.0-git15 Atomic scheduling in pidmap_init
We're seeing a scheduling while atomic backtrace in rawhide from pidmap_init
(https://bugzilla.redhat.com/show_bug.cgi?id=726877). While this seems
mostly harmless given that there isn't anything else to schedule to at
this point, I do wonder why things are marked as needing rescheduled so
early.

We get to might_sleep through the might_sleep_if call in
slab_pre_alloc_hook because both kzalloc and KMEM_CACHE are called with
GFP_KERNEL. That eventually has a call chain like:

might_resched->_cond_resched->should_resched

which apparently returns true. Why the initial thread says it should
reschedule at this point, I'm not sure.

I tried cheating by making the kzalloc call in pidmap_init use GFP_IOFS
instead of GFP_KERNEL to avoid the might_sleep_if call, and that worked
but I can't do the same for the kmalloc calls in kmem_cache_create, so
getting to the bottom of why should_resched is returning true seems to
be a better approach.

josh


\
 
 \ /
  Last update: 2011-08-01 17:49    [W:0.214 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site