Re: [PATCH 4/6] psi: introduce state_mask to represent stalled psi states

2018-12-18 Thread Peter Zijlstra
On Mon, Dec 17, 2018 at 05:14:53PM -0800, Suren Baghdasaryan wrote: > On Mon, Dec 17, 2018 at 7:55 AM Peter Zijlstra wrote: > > > + if (state_mask & (1 << s)) > > > > We have the BIT() macro, but I'm honestly not sure that will improve > > things. > > I was mimicking the rest of the c

Re: [PATCH 4/6] psi: introduce state_mask to represent stalled psi states

2018-12-17 Thread Suren Baghdasaryan
On Mon, Dec 17, 2018 at 7:55 AM Peter Zijlstra wrote: > > On Fri, Dec 14, 2018 at 09:15:06AM -0800, Suren Baghdasaryan wrote: > > The psi monitoring patches will need to determine the same states as > > record_times(). To avoid calculating them twice, maintain a state mask > > that can be consulte

Re: [PATCH 4/6] psi: introduce state_mask to represent stalled psi states

2018-12-17 Thread Peter Zijlstra
On Fri, Dec 14, 2018 at 09:15:06AM -0800, Suren Baghdasaryan wrote: > The psi monitoring patches will need to determine the same states as > record_times(). To avoid calculating them twice, maintain a state mask > that can be consulted cheaply. Do this in a separate patch to keep the > churn in the

[PATCH 4/6] psi: introduce state_mask to represent stalled psi states

2018-12-14 Thread Suren Baghdasaryan
The psi monitoring patches will need to determine the same states as record_times(). To avoid calculating them twice, maintain a state mask that can be consulted cheaply. Do this in a separate patch to keep the churn in the main feature patch at a minimum. Signed-off-by: Suren Baghdasaryan --- i