lkml.org 
[lkml]   [2017]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state
On Fri, Sep 29, 2017 at 12:01:24PM +0200, Paolo Bonzini wrote:
> > Does this mean whenever we get a page fault in a RCU read-side critical
> > section, we may hit this?
> >
> > Could we simply avoid to schedule() in kvm_async_pf_task_wait() if the
> > fault process is in a RCU read-side critical section as follow?
> >
> > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> > index aa60a08b65b1..291ea13b23d2 100644
> > --- a/arch/x86/kernel/kvm.c
> > +++ b/arch/x86/kernel/kvm.c
> > @@ -140,7 +140,7 @@ void kvm_async_pf_task_wait(u32 token)
> >
> > n.token = token;
> > n.cpu = smp_processor_id();
> > - n.halted = is_idle_task(current) || preempt_count() > 1;
> > + n.halted = is_idle_task(current) || preempt_count() > 1 || rcu_preempt_depth();
> > init_swait_queue_head(&n.wq);
> > hlist_add_head(&n.link, &b->list);
> > raw_spin_unlock(&b->lock);
> >
> > (Add KVM folks and list Cced)
>
> Yes, that would work. Mind to send it as a proper patch?

I'm confused, why would we do an ASYNC PF at all here? Thing is, a
printk() shouldn't trigger a major fault _ever_. At worst it triggers
something like a vmalloc minor fault. And I'm thinking we should not do
the whole ASYNC machinery for minor faults.

\
 
 \ /
  Last update: 2017-09-29 12:36    [W:0.377 / U:1.856 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site