[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190826225111.GI14309@lenoir>
Date: Tue, 27 Aug 2019 00:51:13 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
John Stultz <john.stultz@...aro.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
Christoph Hellwig <hch@....de>
Subject: Re: [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@...utronix.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@...nel.org>
Powered by blists - more mailing lists