Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-11 Thread Tejun Heo
Hello, Sebastian. On Wed, Jul 11, 2018 at 01:05:13PM +0200, Sebastian Andrzej Siewior wrote: > > > We at least used to do this in the kernel - manipulating irqsafe locks > > > with spin_lock/unlock() if the irq state is known, whether enabled or > > > disabled, and ISTR lockdep being smart enough

Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-11 Thread Tejun Heo
Hello, Sebastian. On Wed, Jul 11, 2018 at 01:05:13PM +0200, Sebastian Andrzej Siewior wrote: > > > We at least used to do this in the kernel - manipulating irqsafe locks > > > with spin_lock/unlock() if the irq state is known, whether enabled or > > > disabled, and ISTR lockdep being smart enough

Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-11 Thread Sebastian Andrzej Siewior
On 2018-07-03 23:35:39 [+0200], To Tejun Heo wrote: > On 2018-07-03 13:24:24 [-0700], Tejun Heo wrote: > > (cc'ing Peter and Ingo for lockdep) > > > > Hello, Sebastian. > Hi Tejun, > > > On Tue, Jul 03, 2018 at 06:45:44PM +0200, Sebastian Andrzej Siewior wrote: > > > All callers of

Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-11 Thread Sebastian Andrzej Siewior
On 2018-07-03 23:35:39 [+0200], To Tejun Heo wrote: > On 2018-07-03 13:24:24 [-0700], Tejun Heo wrote: > > (cc'ing Peter and Ingo for lockdep) > > > > Hello, Sebastian. > Hi Tejun, > > > On Tue, Jul 03, 2018 at 06:45:44PM +0200, Sebastian Andrzej Siewior wrote: > > > All callers of

Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-03 Thread Sebastian Andrzej Siewior
On 2018-07-03 13:24:24 [-0700], Tejun Heo wrote: > (cc'ing Peter and Ingo for lockdep) > > Hello, Sebastian. Hi Tejun, > On Tue, Jul 03, 2018 at 06:45:44PM +0200, Sebastian Andrzej Siewior wrote: > > All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock > > either with

Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-03 Thread Sebastian Andrzej Siewior
On 2018-07-03 13:24:24 [-0700], Tejun Heo wrote: > (cc'ing Peter and Ingo for lockdep) > > Hello, Sebastian. Hi Tejun, > On Tue, Jul 03, 2018 at 06:45:44PM +0200, Sebastian Andrzej Siewior wrote: > > All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock > > either with

Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-03 Thread Tejun Heo
(cc'ing Peter and Ingo for lockdep) Hello, Sebastian. On Tue, Jul 03, 2018 at 06:45:44PM +0200, Sebastian Andrzej Siewior wrote: > All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock > either with spin_lock_irq() or spin_lock_irqsave(). So, irq is always disabled in

Re: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-03 Thread Tejun Heo
(cc'ing Peter and Ingo for lockdep) Hello, Sebastian. On Tue, Jul 03, 2018 at 06:45:44PM +0200, Sebastian Andrzej Siewior wrote: > All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock > either with spin_lock_irq() or spin_lock_irqsave(). So, irq is always disabled in

[PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-03 Thread Sebastian Andrzej Siewior
All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock either with spin_lock_irq() or spin_lock_irqsave(). cgroup_rstat_flush_locked() itself acquires cgroup_rstat_cpu_lock which is a raw_spin_lock. This lock is also acquired in cgroup_rstat_updated() in IRQ context and therefore

[PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()

2018-07-03 Thread Sebastian Andrzej Siewior
All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock either with spin_lock_irq() or spin_lock_irqsave(). cgroup_rstat_flush_locked() itself acquires cgroup_rstat_cpu_lock which is a raw_spin_lock. This lock is also acquired in cgroup_rstat_updated() in IRQ context and therefore