Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2875771lqt; Tue, 23 Apr 2024 04:35:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNA9DncwyX/ClC+aH9vlGvJQmBuEMRda5z+FommWGv2gFQ1/c96cw8Zk6LBblZ74dRIazwajYl+cc487vDXGZGVv7TZLH7BxVq00ccUA== X-Google-Smtp-Source: AGHT+IFgrosei1tHGP2v6hfTtwyL9/3cX2WLaJskmIy9ygQMTEDW2MjwM94S9Ts6pff7Q2qmod7J X-Received: by 2002:a17:906:b89a:b0:a56:8e7c:9eb8 with SMTP id hb26-20020a170906b89a00b00a568e7c9eb8mr2832593ejb.9.1713872119144; Tue, 23 Apr 2024 04:35:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713872119; cv=pass; d=google.com; s=arc-20160816; b=AbdU2Z6ATz0WftmmzLaiovUqP814Ae3LVIbU1Xbh5KLHNdwh+2JwPYtPMqcwtNu9vx EDK61P0AngaKMGjgdCkZ5Ug7WbpV3w2ToAtM8ALnw8H5BXCRfYxaf826VrMpQesYtK4U lqOdLwW+ET9YphiK8dk9VxY+nNepUTTg5H8EUog4OhRMkfOsmATd2P6zVhVnSefAchJJ RKyS/WbC+M26+Y2+z0cB2c1BsKT+0zzeKXOGzk3hgcAF8QWkV/6Eb16c7bo0p/FhjDH4 5AYFJKUNOJ05f2vG+Ns9ZspLu9nNUCvc/9FVpq5Mw6x6IlTn1jAlQujEkmqjM+H/Bxb/ ygjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7K8RyEx5Q8EWgPX7OpDd705/PyeL+0y0UBZ7tiTz6QM=; fh=/WXL3qkkEh3vJsM4/WnBrova+BUfTCDdjOf+cBzlTIY=; b=FfcFmgvf/DXsKRwa7RGo1TWs+cVQk3AhuqtdMDzpuws2677QJsgVOB3Px95QJl3krS cNhlxmg7YWFsf7Qi2P6bSF58IYq56IGmEe3KY40Dl6qRDM6/xrSrP0RPtY6kG2L8GlaM hJuwNOitUBF94gvQRw8HaQcdpMzfd3aKxZSNgjaZsZkpBJEJZ0/YrtnPEOC+VR/RFGhY U3ywTaFDKsvNivUNhwGjrx3lJgh06MrXj5b7Gr2/4YbX+LyAwaUWxnmli+cRxogRTbTn hS2i9PMgy2ePoCgB5eYLAnP2pTT5bA1bG3SeaQtp3bb9crHX3qZwVNbPWWHL/pEddfsT Tm5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zo692RAm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154998-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lg3-20020a170906f88300b00a5843a098c2si1470282ejb.782.2024.04.23.04.35.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 04:35:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zo692RAm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-154998-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154998-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D93801F23248 for ; Tue, 23 Apr 2024 11:35:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E35D8563D; Tue, 23 Apr 2024 11:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zo692RAm" 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 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: linux-kernel@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.