Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1742244
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state |
| Date | 2017-09-29 19:00 +0200 |
| Message-ID | <uv6NP-gs-9@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <uuJxV-2Gx-29@gated-at.bofh.it> <uuZW1-4qh-3@gated-at.bofh.it> <uv0p4-4OY-13@gated-at.bofh.it> <uv0S6-4Yx-17@gated-at.bofh.it> <uv1XR-5Dl-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Sep 29, 2017 at 01:44:56PM +0200, Paolo Bonzini wrote: > On 29/09/2017 12:34, Peter Zijlstra wrote: > > 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. > > Async page faults are page faults _on the host_ side, and you cannot > control what the host pages out. Of course the hypervisor filters out > some cases itself (e.g. IF=0) but in general you could get one at any time. Just to make sure I am understanding this... You take a page fault on the host, and this causes a schedule() on the guest? Or did I lose the thread here? Thanx, Paul
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Sasha Levin <levinsasha928@gmail.com> - 2017-09-28 11:40 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-28 14:40 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-09-28 17:50 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Peter Zijlstra <peterz@infradead.org> - 2017-09-28 18:10 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-09-28 18:30 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-28 18:10 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Peter Zijlstra <peterz@infradead.org> - 2017-09-28 18:20 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-28 18:40 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Boqun Feng <boqun.feng@gmail.com> - 2017-09-29 11:40 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Paolo Bonzini <pbonzini@redhat.com> - 2017-09-29 12:10 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Boqun Feng <boqun.feng@gmail.com> - 2017-09-29 12:30 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Peter Zijlstra <peterz@infradead.org> - 2017-09-29 12:40 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state Paolo Bonzini <pbonzini@redhat.com> - 2017-09-29 13:50 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-29 19:00 +0200
Re: [PATCH v3 tip/core/rcu 40/40] rcu: Make non-preemptive schedule be Tasks RCU quiescent state "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-29 19:00 +0200
csiph-web