Re: [PATCH 6/8] RCU, workqueue: Implement rcu_work

2018-03-20 Thread Lai Jiangshan
On Tue, Mar 20, 2018 at 12:45 AM, Tejun Heo wrote: > Hello, Lai. > > On Fri, Mar 16, 2018 at 02:01:35PM +0800, Lai Jiangshan wrote: >> > +bool flush_rcu_work(struct rcu_work *rwork) >> > +{ >> > + if (test_bit(WORK_STRUCT_PENDING_BIT, >> > work_data_bits(&rwork->work))) { >> > +

Re: [PATCH 6/8] RCU, workqueue: Implement rcu_work

2018-03-19 Thread Tejun Heo
Hello, Lai. On Fri, Mar 16, 2018 at 02:01:35PM +0800, Lai Jiangshan wrote: > > +bool flush_rcu_work(struct rcu_work *rwork) > > +{ > > + if (test_bit(WORK_STRUCT_PENDING_BIT, > > work_data_bits(&rwork->work))) { > > + rcu_barrier(); > > + flush_work(&rwork->work)

Re: [PATCH 6/8] RCU, workqueue: Implement rcu_work

2018-03-15 Thread Lai Jiangshan
On Thu, Mar 15, 2018 at 3:45 AM, Tejun Heo wrote: > There are cases where RCU callback needs to be bounced to a sleepable > context. This is currently done by the RCU callback queueing a work > item, which can be cumbersome to write and confusing to read. > > This patch introduces rcu_work, a wor

Re: [PATCH 6/8] RCU, workqueue: Implement rcu_work

2018-03-14 Thread Paul E. McKenney
On Wed, Mar 14, 2018 at 12:45:13PM -0700, Tejun Heo wrote: > There are cases where RCU callback needs to be bounced to a sleepable > context. This is currently done by the RCU callback queueing a work > item, which can be cumbersome to write and confusing to read. > > This patch introduces rcu_wo

[PATCH 6/8] RCU, workqueue: Implement rcu_work

2018-03-14 Thread Tejun Heo
There are cases where RCU callback needs to be bounced to a sleepable context. This is currently done by the RCU callback queueing a work item, which can be cumbersome to write and confusing to read. This patch introduces rcu_work, a workqueue work variant which gets executed after a RCU grace pe