Re: [PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-21 Thread Joel Fernandes
On Thu, Feb 21, 2019 at 04:29:44PM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 10:10:57AM -0500, Joel Fernandes wrote: > > Hi Peter, > > > > Thanks for taking a look. > > > > On Thu, Feb 21, 2019 at 10:19:44AM +0100, Peter Zijlstra wrote: > > > On Thu, Feb 21, 2019 at 12:49:41AM -0500,

Re: [PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-21 Thread Peter Zijlstra
On Thu, Feb 21, 2019 at 10:10:57AM -0500, Joel Fernandes wrote: > Hi Peter, > > Thanks for taking a look. > > On Thu, Feb 21, 2019 at 10:19:44AM +0100, Peter Zijlstra wrote: > > On Thu, Feb 21, 2019 at 12:49:41AM -0500, Joel Fernandes (Google) wrote: > > > > > Also replace rcu_assign_pointer cal

Re: [PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-21 Thread Joel Fernandes
Hi Peter, Thanks for taking a look. On Thu, Feb 21, 2019 at 10:19:44AM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 12:49:41AM -0500, Joel Fernandes (Google) wrote: > > > Also replace rcu_assign_pointer call on rq->sd with WRITE_ONCE. This > > should be sufficient for the rq->sd initia

Re: [PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-21 Thread Peter Zijlstra
On Thu, Feb 21, 2019 at 12:49:41AM -0500, Joel Fernandes (Google) wrote: > Also replace rcu_assign_pointer call on rq->sd with WRITE_ONCE. This > should be sufficient for the rq->sd initialization. > @@ -668,7 +668,7 @@ cpu_attach_domain(struct sched_domain *sd, struct > root_domain *rd, int cpu

[PATCH RFC 4/5] sched/topology: Annonate RCU pointers properly

2019-02-20 Thread Joel Fernandes (Google)
The scheduler's topology code uses rcu_assign_pointer() to initialize various pointers. Let us annotate the pointers correctly which also help avoid future bugs. This suppresses the new sparse errors caused by an annotation check I added to rcu_assign_pointer(). Also replace rcu_assign_pointer ca