From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55E8C7FBBF; Tue, 23 Apr 2024 11:33:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713872028; cv=none; b=Pw8uA9cm0W0pWbSL9WnvmGJqNOiA473/FYCA3+wyXW88IvS1Ktcey8RXOUAst3an93mj+F3GvAUQletz8hzDS0Vbr9gT37PUetjuXGmvIffoW5sGXC4HKVshEf3ydbu0JfrS0//k6MY/KRnBc8hklnJKYmGbWXBVNOZSjS9LDII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713872028; c=relaxed/simple; bh=cC5/q/rDAJvbVMbrF1YBegWAnIa9bk1DnKTjp39vagY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VSsYJco78MWDmC2pIJhUP9lMgh1CbeOjZdH6qD+LR52WtFqnl+bGvdBFThti8VMdQRJkWGTHIZLCl8KKkuoUVk0syEx6Wt1Uk4KL1sz0Isesv1yxEzS/TS6NxTDfdoi3ptkepmUDwdl0XBgaS7sbvV9uSaBxSqG7HIcvkRXuzqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Zo692RAm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zo692RAm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 609C9C116B1; Tue, 23 Apr 2024 11:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713872027; bh=cC5/q/rDAJvbVMbrF1YBegWAnIa9bk1DnKTjp39vagY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Zo692RAmsm1vLjhATemvFORhpgACbgV41af4TnLMOJADX9uv7UclWmvlJ+vvu2/wl o4tPRRJwNcLM0RAwdvldUp070gZPcWK5b+pOfcY1Ulj7yx6loKa1w3dJUzAQyoX2bc Zl259Nko9SuGT++XfEWLwD4XSIkVPsR9CHrPZZZQzUyZQULDmBM0JCKSvU8sOC/bjD AxFNkXugtAGl5qUbrAPUlVZC9NgzTtEVRw8Xe4frygrr4EWj/61NP5IfOtj4utOS27 IsxGQOv/9XWMGr36zBeg8WQPijI3c1zsvwTKARs1lW/2UveoNvffDSqMdFF24PnLs7 T94gAUNSvHpQA== Date: Tue, 23 Apr 2024 13:33:44 +0200 From: Frederic Weisbecker To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, rcu@vger.kernel.org, x86@kernel.org, Lai Jiangshan , "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Uros Bizjak , Josh Poimboeuf , Nadav Amit , Breno Leitao , Kent Overstreet , Pawan Gupta , Rick Edgecombe , Vegard Nossum , Daniel Sneddon , Nikolay Borisov Subject: Re: [PATCH 09/10] x86/rcu: Add rcu_preempt_count Message-ID: References: <20240328075318.83039-1-jiangshanlai@gmail.com> <20240328075318.83039-10-jiangshanlai@gmail.com> Precedence: bulk X-Mailing-List: rcu@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Le Tue, Apr 23, 2024 at 05:02:35PM +0800, Lai Jiangshan a écrit : > Hello, Frederic > > Thanks for reviewing. > > On Mon, Apr 22, 2024 at 7:05 PM Frederic Weisbecker wrote: > > > > + > > > +/* We use the MSB mostly because its available */ > > > > I think you can safely remove the "We " from all the comments :-) > > The file is mainly copied from arch/x86/include/asm/preempt.h. > I will rephrase sentences in later iterations. > > > > > > +#define RCU_PREEMPT_UNLOCK_SPECIAL_INVERTED 0x80000000 > > > > How about RCU_PREEMPT_UNLOCK_FASTPATH ? > > > I'm not good at naming. But the MSB really means exactly the opposite > of current->rcu_read_unlock_special and I think "UNLOCK_SPECIAL_INVERTED" > fits the meaning. Right but I tend to think a constant should tell what something is, not what something is not. FWIW, p->rcu_read_unlock_special could even be renamed to p->rcu_read_unlock_slowpath Thanks.