lkml.org 
[lkml]   [2019]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V2 34/38] posix-cpu-timers: Get rid of 64bit divisions
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 <tglx@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 <frederic@kernel.org>

\
 
 \ /
  Last update: 2019-08-27 00:52    [W:0.570 / U:1.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site