lkml.org 
[lkml]   [2019]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 01/15] sched/core: uclamp: Add CPU's clamp buckets refcounting
On Thu, Mar 14, 2019 at 11:03:30AM +0000, Patrick Bellasi wrote:

> void uclamp_rq_dec_id(struct rq *rq, int clamp_id, int bucket_id) {
> if (__builtin_expect(!!(rq->uclamp[clamp_id].bucket[bucket_id].tasks), 1))
> return;
> rq->uclamp[clamp_id].bucket[bucket_id].tasks--;
> }
> ---8<---
>
> generates something like:
>
> ---8<---
> uclamp_rq_dec_id:
> sxtw x1, w1
> add x3, x1, x1, lsl 1
> lsl x3, x3, 2
> sub x3, x3, x1
> lsl x3, x3, 2
> add x2, x3, x2, sxtw 3
> add x0, x0, x2
> ldr w1, [x0, 8]
> cbz w1, .L4
> ret
> .L4:
> mov w1, -1
> str w1, [x0, 8]
> ret
> ---8<---
>
>
> which looks "sane" and quite expected, isn't it?

Yep, thanks! Sometimes I worry about silly things.

\
 
 \ /
  Last update: 2019-03-14 14:28    [W:0.073 / U:24.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site