[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210520181600.oupnaspukteh7dsk@offworld>
Date: Thu, 20 May 2021 11:16:00 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Darren Hart <dvhart@...radead.org>
Subject: Re: [PATCH for-next] futex: deduplicate resched in futex_wake_op()
On Mon, 17 May 2021, Pavel Begunkov wrote:
>After pagefaulting in futex_wake_op() both branches do cond_resched()
>before retry. Help to deduplicate it as many compilers can't cope with
>it.
>
LGTM:
Reviewed-by: Davidlohr Bueso <dbueso@...e.de>
>Signed-off-by: Pavel Begunkov <asml.silence@...il.com>
>---
> kernel/futex.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
>diff --git a/kernel/futex.c b/kernel/futex.c
>index c98b825da9cf..54ed232b2553 100644
>--- a/kernel/futex.c
>+++ b/kernel/futex.c
>@@ -1728,12 +1728,9 @@ futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2,
> return ret;
> }
>
>- if (!(flags & FLAGS_SHARED)) {
>- cond_resched();
>- goto retry_private;
>- }
>-
> cond_resched();
>+ if (!(flags & FLAGS_SHARED))
>+ goto retry_private;
> goto retry;
> }
>
>--
>2.31.1
>
Powered by blists - more mailing lists