lkml.org 
[lkml]   [2012]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault
From
2012/11/27 Paul E. McKenney <paulmck@linux.vnet.ibm.com>:
> On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote:
>> 2012/11/27 Gleb Natapov <gleb@redhat.com>:
>> > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an exception.
>>
>> Ok.
>> There seem to be a bug in kvm_async_pf_task_wait(). Using
>> idle_cpu(cpu) to find out if the current task is the idle task may not
>> work if there is pending wake up. Me may schedule another task but
>> when that other task sleeps later we can't schedule back to idle until
>> the fault is completed.
>>
>> The right way is to use is_idle_task(current)
>
> Agreed. But if you instead need to figure out whether or not RCU believes
> that the CPU is idle, use rcu_is_cpu_idle(). You need to figure out
> whether or not RCU believes that the CPU is idle if you are trying to
> play fast and loose with rcu_irq_enter() and rcu_irq_exit().

Right. I was referring to another problem though. They don't want to
schedule on the following cases:

1) preemption disabled, of course.
3) we are in the idle task. Because if we want to sleep in order to
wait for the page fault completion, we need to be able to schedule the
idle task. But we are already the idle task.

Now idle_cpu(cpu) is the wrong check for that.


\
 
 \ /
  Last update: 2012-11-27 20:21    [W:0.408 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site