Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491942 > unrolled thread
| Started by | Frederic Weisbecker <fweisbec@gmail.com> |
|---|---|
| First post | 2016-09-27 16:30 +0200 |
| Last post | 2016-09-27 16:50 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v15 04/13] task_isolation: add initial support Frederic Weisbecker <fweisbec@gmail.com> - 2016-09-27 16:30 +0200
Re: [PATCH v15 04/13] task_isolation: add initial support Peter Zijlstra <peterz@infradead.org> - 2016-09-27 16:50 +0200
Re: [PATCH v15 04/13] task_isolation: add initial support Frederic Weisbecker <fweisbec@gmail.com> - 2016-09-27 17:00 +0200
Re: [PATCH v15 04/13] task_isolation: add initial support "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-09-27 16:50 +0200
| From | Frederic Weisbecker <fweisbec@gmail.com> |
|---|---|
| Date | 2016-09-27 16:30 +0200 |
| Subject | Re: [PATCH v15 04/13] task_isolation: add initial support |
| Message-ID | <sm1yp-29m-7@gated-at.bofh.it> |
On Fri, Sep 02, 2016 at 10:28:00AM -0700, Andy Lutomirski wrote: > > Unless I'm missing something (which is reasonably likely), couldn't > the isolation code just force or require rcu_nocbs on the isolated > CPUs to avoid this problem entirely. rcu_nocb is already implied by nohz_full. Which means that RCU callbacks are offlined outside the nohz_full set of CPUs. > > I admit I still don't understand why the RCU context tracking code > can't just run the callback right away instead of waiting however many > microseconds in general. I feel like paulmck has explained it to me > at least once, but that doesn't mean I remember the answer. The RCU context tracking doesn't take care of callbacks. It's only there to tell the RCU core whether the CPU runs code that may or may not run RCU read side critical sections. This is assumed by "kernel may use RCU, userspace can't".
[toc] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-09-27 16:50 +0200 |
| Message-ID | <sm1RL-2fQ-1@gated-at.bofh.it> |
| In reply to | #1491942 |
On Tue, Sep 27, 2016 at 04:22:20PM +0200, Frederic Weisbecker wrote: > The RCU context tracking doesn't take care of callbacks. It's only there > to tell the RCU core whether the CPU runs code that may or may not run > RCU read side critical sections. This is assumed by "kernel may use RCU, > userspace can't". Userspace never can use the kernels RCU in any case. What you mean to say is that userspace is treated like an idle CPU in that the CPU will no longer be part of the RCU quescent state machine. The transition to userspace (as per context tracking) must ensure that CPUs RCU state is 'complete', just like our transition to idle (mostly) does.
[toc] | [prev] | [next] | [standalone]
| From | Frederic Weisbecker <fweisbec@gmail.com> |
|---|---|
| Date | 2016-09-27 17:00 +0200 |
| Message-ID | <sm21s-2jb-21@gated-at.bofh.it> |
| In reply to | #1491955 |
On Tue, Sep 27, 2016 at 04:39:26PM +0200, Peter Zijlstra wrote: > On Tue, Sep 27, 2016 at 04:22:20PM +0200, Frederic Weisbecker wrote: > > > The RCU context tracking doesn't take care of callbacks. It's only there > > to tell the RCU core whether the CPU runs code that may or may not run > > RCU read side critical sections. This is assumed by "kernel may use RCU, > > userspace can't". > > Userspace never can use the kernels RCU in any case. What you mean to > say is that userspace is treated like an idle CPU in that the CPU will > no longer be part of the RCU quescent state machine. > > The transition to userspace (as per context tracking) must ensure that > CPUs RCU state is 'complete', just like our transition to idle (mostly) > does. Exactly!
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-09-27 16:50 +0200 |
| Message-ID | <sm1RL-2fQ-9@gated-at.bofh.it> |
| In reply to | #1491942 |
On Tue, Sep 27, 2016 at 04:22:20PM +0200, Frederic Weisbecker wrote: > On Fri, Sep 02, 2016 at 10:28:00AM -0700, Andy Lutomirski wrote: > > > > Unless I'm missing something (which is reasonably likely), couldn't > > the isolation code just force or require rcu_nocbs on the isolated > > CPUs to avoid this problem entirely. > > rcu_nocb is already implied by nohz_full. Which means that RCU callbacks > are offlined outside the nohz_full set of CPUs. Indeed, at boot time, RCU makes any nohz_full CPU also be a rcu_nocb CPU. > > I admit I still don't understand why the RCU context tracking code > > can't just run the callback right away instead of waiting however many > > microseconds in general. I feel like paulmck has explained it to me > > at least once, but that doesn't mean I remember the answer. > > The RCU context tracking doesn't take care of callbacks. It's only there > to tell the RCU core whether the CPU runs code that may or may not run > RCU read side critical sections. This is assumed by "kernel may use RCU, > userspace can't". And RCU has to wait for read-side critical sections to complete before invoking callbacks. Thanx, Paul
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web