Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1309934
| From | Luca Abeni <luca.abeni@unitn.it> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 5/8] Track the "total rq utilisation" too |
| Date | 2016-01-15 09:10 +0100 |
| Message-ID | <qR7Ci-3ht-7@gated-at.bofh.it> (permalink) |
| References | <qQS0x-uX-3@gated-at.bofh.it> <qQS0y-uX-31@gated-at.bofh.it> <qQVB8-34k-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 5/8] Track the "total rq utilisation" too Luca Abeni <luca.abeni@unitn.it> - 2016-01-14 16:30 +0100
Re: [RFC 5/8] Track the "total rq utilisation" too Peter Zijlstra <peterz@infradead.org> - 2016-01-14 20:20 +0100
Re: [RFC 5/8] Track the "total rq utilisation" too Luca Abeni <luca.abeni@unitn.it> - 2016-01-15 09:10 +0100
Re: [RFC 5/8] Track the "total rq utilisation" too Peter Zijlstra <peterz@infradead.org> - 2016-01-14 20:50 +0100
Re: [RFC 5/8] Track the "total rq utilisation" too Luca Abeni <luca.abeni@unitn.it> - 2016-01-15 08:00 +0100
Re: [RFC 5/8] Track the "total rq utilisation" too Peter Zijlstra <peterz@infradead.org> - 2016-01-15 09:40 +0100
Re: [RFC 5/8] Track the "total rq utilisation" too Luca Abeni <luca.abeni@unitn.it> - 2016-01-15 10:20 +0100
csiph-web