Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp28017pxb; Wed, 30 Mar 2022 21:59:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ3fA6VZvRjOqdNqsMsMs8w2T+Qjsxmnv4wNWtXSGdjHLoxSjTnzadyWDucQ8vCuj2FWkj X-Received: by 2002:a17:903:20cc:b0:154:8c7f:1ed3 with SMTP id i12-20020a17090320cc00b001548c7f1ed3mr3247260plb.131.1648702763371; Wed, 30 Mar 2022 21:59:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648702763; cv=none; d=google.com; s=arc-20160816; b=QjNlqZTLd4n858OpRee0eT+4ta8h8s0M4uINK2k9SGbDagvz8ZbS/oy6FI06mr8Did 8xUyoELbHBQq1c6AwADoMkPMFhjno0fwha3Ey15P0RSgIC3/YouvS9PC3gN8z+zshqih Q52w1TPlFjJ9kbvq+wUXLzT7iCv9YNHJBiaigLpnMR3UgQP7aRYc/QjYKjPP/rQVFatA PRRgDgPOjn6Y9Hkdo7sG8l2Uqs+33fYSJbz4pBR3AY2tpGf5GptoAT5jwbXOSfc/wgEJ wxBnrEgseWUnTgu8ijNn0W8aP2tMaUFiicZENF5YCzyI0KLFnq3ibl0wF+4eT12/66Fz Az9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ljnLROlX8bkk5mDzhK5nV3OjB/DTU2scE/dM3AHH1Ak=; b=iXkrwX0YvTpMSDCxO1n5E5fnQDG/Qg4R/0l+bRYk/009TErTYhzgTuaryCY6KHuO4a aOnNJB+/zghhuPm9vxZTHlRIrXCMUMJditC05v46KhFhITu0pQ0hQnzaj12XQPP77LYZ eIVxkHdYM28DU/QS3ZnriGod3IAJ5F2hmqdiz5ewUJkPs/FB5FiMFugDEIhqGKfi8ymc nTPL202ESfqENf7ev3MAzQACAViDvwRgljStgsHCPg0GMpJd6N7f+1ol6U4RJy47iyVX rRXYT8dYllBRiqxpyV4frUQlX9ECBHZ7WpgtwSI6bzxd040IpMcp5k81fRvMsFTcLQ5Z LSIw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id nl8-20020a17090b384800b001c6acc3b2b3si2557550pjb.23.2022.03.30.21.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:59:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2C9EA2414C4; Wed, 30 Mar 2022 20:36:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241381AbiC3Aof (ORCPT + 99 others); Tue, 29 Mar 2022 20:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233084AbiC3Aod (ORCPT ); Tue, 29 Mar 2022 20:44:33 -0400 Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 006B1182ADF; Tue, 29 Mar 2022 17:42:49 -0700 (PDT) Received: by mail-qv1-f44.google.com with SMTP id a5so15737300qvx.1; Tue, 29 Mar 2022 17:42:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ljnLROlX8bkk5mDzhK5nV3OjB/DTU2scE/dM3AHH1Ak=; b=n9CjvIqXb6mNZr9HcdNTSLG6DwCM81A3Btsodrr+DWkUf0FowUUoKvATYfAkfVjxMP qiGDk1Bfnmr5MQcUVTb1XM4myoixvI3CFchn8ksG6xajeT338riyQurbpZcez6usf/aV cOeyH03WRgVCtRpK7BwQ/EAjT5LK0hOOJJoRB9ZncwVeU7UNUdCZLhLFR72VINt0Pb5h svNRbQox+An+lcQ0xL535JPfoP5NgHZolX3wD3vObnepistmyJ1oLEQ2Kb1h5aNLBm/B PcUJA2tuD6j+0rrDAlYZvz1b9dr6V7sODG5kh3iyhchHakaM1iG4Ul7q3hQmQ5lmqAtP yfTA== X-Gm-Message-State: AOAM530G8iPFujl66RLxSmZQw+e6l9D0grKwAuLYnRT0dUCofhsOfo0F fyRm/fKOZbQM+moKTEMrR/lqQGG7aXBmVQ== X-Received: by 2002:ad4:5bc7:0:b0:441:53a2:169c with SMTP id t7-20020ad45bc7000000b0044153a2169cmr29666782qvt.8.1648600968893; Tue, 29 Mar 2022 17:42:48 -0700 (PDT) Received: from user-VirtualBox (c-73-132-53-127.hsd1.va.comcast.net. [73.132.53.127]) by smtp.gmail.com with ESMTPSA id m3-20020a05622a118300b002e1beed4908sm16740102qtk.3.2022.03.29.17.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 17:42:48 -0700 (PDT) Date: Tue, 29 Mar 2022 15:36:13 -0400 From: David Vernet To: "Paul E. McKenney" Cc: frederic@kernel.org, jiangshanlai@gmail.com, joel@joelfernandes.org, josh@joshtriplett.org, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, quic_neeraju@quicinc.com, rcu@vger.kernel.org, rostedt@goodmis.org Subject: Re: [PATCH] rcu_sync: Fix comment to properly reflect rcu_sync_exit() behavior Message-ID: <20220329193613.2a3g3bkxadocirgm@user-VirtualBox> References: <20220329222612.1001586-1-void@manifault.com> <20220329232256.GE4285@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220329232256.GE4285@paulmck-ThinkPad-P17-Gen-1> User-Agent: NeoMutt/20191207 X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 29, 2022 at 04:22:56PM -0700, Paul E. McKenney wrote: > As usual, I could not resist the urge to wordsmith. Please take a look > at the following to see if I messed something up. > > Thanx, Paul > > ------------------------------------------------------------------------ > > commit b89e06a95c05009bcf31949814c42bc420f414a6 > Author: David Vernet > Date: Tue Mar 29 15:26:13 2022 -0700 > > rcu_sync: Fix comment to properly reflect rcu_sync_exit() behavior > > The rcu_sync_enter() function is used by updaters to force RCU readers > (e.g. percpu-rwsem) to use their slow paths during an update. This is > accomplished by setting the ->gp_state of the rcu_sync structure to > GP_ENTER. In the case of percpu-rwsem, the readers' slow path waits on > a semaphore instead of just incrementing a reader count. Each updater > invokes the rcu_sync_exit() function to signal to readers that they > may again take their fastpaths. The rcu_sync_exit() function sets the > ->gp_state of the rcu_sync structure to GP_EXIT, and if all goes well, > after a grace period the ->gp_state reverts back to GP_IDLE. > > Unfortunately, the rcu_sync_enter() function currently has a comment > incorrectly stating that rcu_sync_exit() (by an updater) will re-enable > reader "slowpaths". This patch changes the comment to state that this > function re-enables reader fastpaths. > > Signed-off-by: David Vernet > Signed-off-by: Paul E. McKenney The word smithing looks like a good improvement to me! Thanks, David