On Wed, Aug 21, 2019 at 09:09:21PM +0200, Thomas Gleixner wrote:
> Instead of dividing A to match the units of B it's more efficient to
> multiply B to match the units of A.
> 
> Signed-off-by: Thomas Gleixner <t...@linutronix.de>
> ---
> V2: Fix the dropped update of the expiry cache when the soft limit increased
> ---
>  kernel/time/posix-cpu-timers.c |   24 ++++++++++++++----------
>  1 file changed, 14 insertions(+), 10 deletions(-)
> 
> --- a/kernel/time/posix-cpu-timers.c
> +++ b/kernel/time/posix-cpu-timers.c
> @@ -798,10 +798,11 @@ static void check_thread_timers(struct t
>        */
>       soft = task_rlimit(tsk, RLIMIT_RTTIME);
>       if (soft != RLIM_INFINITY) {
> +             /* Task RT timeout is accounted in jiffies. RTTIME is usec */
> +             unsigned long rtim = tsk->rt.timeout * (USEC_PER_SEC / HZ);

jiffies_to_usecs() ?

Reviewed-by: Frederic Weisbecker <frede...@kernel.org>

Reply via email to