From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5764C4338F for ; Sun, 8 Aug 2021 18:43:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A513360F25 for ; Sun, 8 Aug 2021 18:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232013AbhHHSns (ORCPT ); Sun, 8 Aug 2021 14:43:48 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:44582 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbhHHSns (ORCPT ); Sun, 8 Aug 2021 14:43:48 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 785501FD6F; Sun, 8 Aug 2021 18:43:27 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C53A413398; Sun, 8 Aug 2021 18:43:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cS6DIcwlEGGoHwAAMHmgww (envelope-from ); Sun, 08 Aug 2021 18:43:24 +0000 Date: Sun, 8 Aug 2021 11:43:20 -0700 From: Davidlohr Bueso To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Ingo Molnar , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Will Deacon , Waiman Long , Boqun Feng , Sebastian Andrzej Siewior , Mike Galbraith Subject: Re: [patch V3 58/64] futex: Clarify comment in futex_requeue() Message-ID: <20210808184320.zytackz5nf37brqu@offworld> References: <20210805151300.330412127@linutronix.de> <20210805153956.161214930@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210805153956.161214930@linutronix.de> User-Agent: NeoMutt/20201120 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 05 Aug 2021, Thomas Gleixner wrote: >From: Thomas Gleixner > >The comment about the restriction of the number of waiters to wake for the >REQUEUE_PI case is confusing at best. Rewrite it. This certainly reads better. > >Signed-off-by: Thomas Gleixner >--- > kernel/futex.c | 28 ++++++++++++++++++++-------- > 1 file changed, 20 insertions(+), 8 deletions(-) >--- >--- a/kernel/futex.c >+++ b/kernel/futex.c >@@ -1960,15 +1960,27 @@ static int futex_requeue(u32 __user *uad > */ > if (refill_pi_state_cache()) > return -ENOMEM; Perhaps this can be moved after the nr_wake check below? No sense in calling refill_pi_state_cache() if the user is passing bogus parameters. > if (nr_wake != 1) > return -EINVAL; > Thanks, Davidlohr