[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5698A815.7010808@unitn.it>
Date: Fri, 15 Jan 2016 09:04:37 +0100
From: Luca Abeni <luca.abeni@...tn.it>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@....com>
Subject: Re: [RFC 5/8] Track the "total rq utilisation" too
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
Powered by blists - more mailing lists