Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1184933rdd; Wed, 10 Jan 2024 11:08:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFnwHsGgNI3liM1p1vdtrGes4IjNaRWA+QYBfsi0Ia5q8PwOje6GAJW7/P+B77ktDMhjzs X-Received: by 2002:a05:6830:3487:b0:6dd:e798:f73f with SMTP id c7-20020a056830348700b006dde798f73fmr128070otu.46.1704913730013; Wed, 10 Jan 2024 11:08:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704913729; cv=none; d=google.com; s=arc-20160816; b=cz37lctKeA9U86as4AJ+mDkKplGYjNyaIbjacQKPqkjN2nFKKmi0lhz89ll68K+0di vmgdkxz1PVvMtIIOPmCqpJNH7rHqgieGZeVZlGKXkmF6rDYqUhGscQZalgX9sbukI/IF xcGzSV0vdJ9JvxqojblFplXyvzKHFsBWU1oywndc/jlvWtTRag99CufUReHOMoNAt0Is hrmwrNwoQ9W1dza8Hw6bchYw7PJ35Y0F7wSSl7FUIF/+x9DzNV5Qn+BsRhunoZC9ueMd Fp6aAm48lz6LDWO5eRribZgfE0jg8MmWFXICcMsI8zmE40xzy9YND/EQIpojSNyx8hkV QAsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=AhrsHTa+ABmANvCwYnlTgj7bU1iI/SJ2QKWl7MaF2eI=; fh=FW3/Y3rpA1XR/qUFthkh0VzLvp2yMCur2MpscHexxrQ=; b=O0lL5TilRtuoPhwAuBD/6QA0o8EMVWfMnmE2w2O1AmvJhzHiqEKtcz3KqmiKdF+m0c rSUwc0wtG+9WfFE3xxvUu8pat7yquPstmfOun6TAR49gP6O4dw3JDCx2w2NFTD+UYc6U clOqZE0v2LG9F5m/thmS8tRQXi8ettqCzTdePvmrktH2SKXKWdBU+DU9Ygx0YLtzxMdd fBMX8/5dzeVIXVf9SqzvxXm6lqGDKbzUlb8ickYUX1g7smRDBZpThAk52Q+d6OvPJXvZ GDXlTYg+kQtog2rR49YU+UF1xdEYAttJ+k+i8mwIu8Q3NiQOmanbbmWtDSmnp6yzmJMJ 8s6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=XpOTEBKk; spf=pass (google.com: domain of linux-kernel+bounces-22643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22643-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v24-20020a63f218000000b0058986c61bb6si4213958pgh.706.2024.01.10.11.08.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:08:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=XpOTEBKk; spf=pass (google.com: domain of linux-kernel+bounces-22643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22643-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0123EB25D73 for ; Wed, 10 Jan 2024 19:08:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63B254D5AF; Wed, 10 Jan 2024 19:08:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XpOTEBKk" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 806E73FB33; Wed, 10 Jan 2024 19:08:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=AhrsHTa+ABmANvCwYnlTgj7bU1iI/SJ2QKWl7MaF2eI=; b=XpOTEBKk50dvdKPplMoujqdzBj Gy2Xi3ahaSODc+/m9ivpaIFd+h2cLDGb69vJ4P3/XfLUbTvG+aeDK2vPfN1eYRmOxbyhi1og7nZ6I SmnrrmVoIl1iM9RDLzh8opWCklNvlOfId5uMR4ic79lysP82Nn2s6cSgtnjA+PM8z7kSaxfPwj3oc wCXkj/bhCCn4hK2OzAEOgMNOl/IqbPC/kbum0iQFjeoEtRP+Ypp9NoVVfVtMrDPU5SGvJcd0VHMh+ vrrsQNaQeOWQvm4BRf34PmUZBWxPnw3nJI+ByeBhImcfW4NZQKmCHSLkKbn11dpUtqt2FjMPv7peM RFzLl2PA==; Received: from [50.53.46.231] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rNdwE-00Dbl8-10; Wed, 10 Jan 2024 19:08:30 +0000 Message-ID: Date: Wed, 10 Jan 2024 11:08:29 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/4] membarrier: Create Documentation/scheduler/membarrier.rst Content-Language: en-US To: Andrea Parri Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, mathieu.desnoyers@efficios.com, paulmck@kernel.org, corbet@lwn.net, mmaas@google.com, hboehm@google.com, striker@us.ibm.com, charlie@rivosinc.com, rehn@rivosinc.com, linux-riscv@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240110145533.60234-1-parri.andrea@gmail.com> <20240110145533.60234-3-parri.andrea@gmail.com> <63046420-264a-4e7c-b45c-17f0486ba4d9@infradead.org> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/10/24 11:05, Andrea Parri wrote: > Hi Randy, > >>> +MEMBARRIER_CMD_{PRIVATE,GLOBAL}_EXPEDITED - Architecture requirements >>> +===================================================================== >>> + >>> +Memory barriers before updating rq->curr >>> +---------------------------------------- >>> + >>> +The command requires each architecture to have a full memory barrier after >>> +coming from user-space, before updating rq->curr. This barrier is implied >>> +by the sequence rq_lock(); smp_mb__after_spinlock() in __schedule(). The >>> +barrier matches a full barrier in the proximity of the membarrier system >>> +call exit, cf. membarrier_{private,global}_expedited(). >>> + >> >> What does "The command" refer to above and below, please? > > The term was meant to refer to any of MEMBARRIER_CMD_PRIVATE_EXPEDITED and > MEMBARRIER_CMD_GLOBAL_EXPEDITED (from the section title); FWIW, this seems > to align with the terminology adopted in MEMBARRIER(2) for example. I see. > Mmh, unless I get a better idea, I'll expand those occurrences to: > > "The commands MEMBARRIER_CMD_PRIVATE_EXPEDITED and MEMBARRIER_CMD_GLOBAL_EXPEDIDED > require [...]" _EXPEDITED OK, that's better IMO. Thanks. -- #Randy