Re: [RFC 5/8] Track the "total rq utilisation" too

From: Luca Abeni
Date: Fri Jan 15 2016 - 03:04:48 EST


On 01/14/2016 08:12 PM, Peter Zijlstra wrote:
On Thu, Jan 14, 2016 at 04:24:50PM +0100, Luca Abeni wrote:
+ if (dl_rq->running_bw > dl_rq->this_bw) {
+ WARN_ON(1);
+ dl_rq->running_bw = dl_rq->this_bw;
+ }

FWIW you can write this as:

if (WARN_ON(dl_rq->running_bw > dl_rq->this_bw))
dl_rq->running_bw = dl_rq->this_bw;
Ah, thanks! I did not know that WARN_ON() returns a value...
This looks much nicer, I am locally changing in this way.


Thanks,
Luca