# Re: \[PATCH, v7\] cgroups: introduce timer slack controller

- From: Peter Zijlstra \<peterz@infradead.org\>
- Date: 2011-03-04 19:02:15 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2011/03/3685888
- Thread: https://ratatoskr.run/linux-api/2011/03/3684763/t.md

```text
On Wed, 2011-03-02 at 18:40 +0200, Kirill A. Shutsemov wrote:
> -       if (ret < current->timer_slack_ns)
> -               return current->timer_slack_ns;
> -       return ret;
> +       return clamp(__estimate_accuracy(&now),
> +                       get_task_timer_slack(current), LONG_MAX);

That actually makes the code worse, how about:

  min(__estimate_accuracy(), get_task_timer_slack()) ?
```
