Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1183872rdd; Wed, 10 Jan 2024 11:06:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHubsMUG3XFxFlej9/dCUVOPrkufFpZOfME6GiSqHxpQ5QsZkkBqDV7C/1Or9CgPqwHuf2E X-Received: by 2002:a17:902:d38c:b0:1d5:73d0:eb7d with SMTP id e12-20020a170902d38c00b001d573d0eb7dmr716083pld.18.1704913615209; Wed, 10 Jan 2024 11:06:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704913615; cv=none; d=google.com; s=arc-20160816; b=gtu1C85ekKSZMf+MomN+TbDsutYhOCRq4YC4BWvg8UwJMCXxbcSrNi6/GUS75tauGx g9XNkM/U6RxTWWFMak6VvVHG8BxJBg+L1UrATIsdTPIgTEnzpfbTDZ5F60q5jhtFt+5q lGAlP2QWpgFafZJgtWCKjVGvAqmIICoZ/KVe+yGu6/ga2M8CR1gIBk41LOM2jsSqRcd4 HBFB5rUkni9xksouawuMtKxVPTzfr1Ti+4iMza8laiQYGqxbwGCdQ/CfZybSITxfcVzb jefm0Z9psYFd8ksYPVoNglP0fElEmTJRQXDl2ahClCC+YieMZvjFAE2nJKm5BEcLXQqB CjJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XZpsZsIRN+bzHamFqhhdXU99QlmdJsaeUiZLcX/1HHw=; fh=mgeXCQQ2vVYcrbr0LZRslCQ0FIChOwCIx7gDgL1wbPk=; b=iKruQ75D0x2m+aWmotXkMnSe6utLb88G7bS4T+IEBJ8ENc75OJJlmPxGkE9+PSAcZs hgEpdIo5KcI0VYnjZamXuekSbW0BrBunEmybpm1L2vYq8WAK1Rkk6HwWvqIvWVfjyHfc nMMUDkvXOJ/542K9Bcw0pvXyfcYIFlrA3VxpzIF9yNfGI2VjjVZWLXvpjkoIDESl7t3+ Wc4D/zAbN1b1kmIraU+/DxIDSGuRW0mlBIEgiQo1uDSaulPU6R9ixt5BrVZ1vt3hiLuN VH5sNYN95Zc8rSJnsGBusz0QOl1zzjeKfNaFbuUGgEKJD4AaRsDcLUuIWbm8Y/2nzWEv dzJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZOQqFpxi; spf=pass (google.com: domain of linux-kernel+bounces-22640-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n22-20020a170902969600b001d3fe0117dcsi4259275plp.54.2024.01.10.11.06.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:06:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22640-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZOQqFpxi; spf=pass (google.com: domain of linux-kernel+bounces-22640-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C28A528C3FE for ; Wed, 10 Jan 2024 19:06:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CC784E1C6; Wed, 10 Jan 2024 19:05:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZOQqFpxi" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17E0A4E1BC; Wed, 10 Jan 2024 19:05:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a2c179aa5c4so58884766b.0; Wed, 10 Jan 2024 11:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704913550; x=1705518350; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=XZpsZsIRN+bzHamFqhhdXU99QlmdJsaeUiZLcX/1HHw=; b=ZOQqFpxijoRV4KCOZn1ZMa9JM9bZ99FZaliEOw1cqwZPXGjYHKx1fCqfE5MREOlH4e XIavvv0vFiV/zv9rrcnMAYqQrNuOoC5WyiiHejCaYtC+X63gPSrGwWjuCBvEaI/2FK9o t/Z2PV86WXcrzVf/rsI6r2K2CItbxKs3t2bvK4cqQR9lj0RzS50/1KPFFBSPdlF/jGJZ AIdK9eiPWxJfHjKRYNY4apvJ3Wn2F+z4yw1i1xSrlhYTXUJLPAU7ev2ze+lSN+zHeVHb TL1MGFmrYHk+6W4bgH6gny6piSFpUnwmLWgKtAEJ21jad7S36jkGfc9E1kpj9AZ5ljMr MeSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704913550; x=1705518350; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XZpsZsIRN+bzHamFqhhdXU99QlmdJsaeUiZLcX/1HHw=; b=DggMrXg86w+hTQFTu+mBm5EwGISkq+R0gcs1+ReGDyDDIdNWXA/Dwo7FKfunW8LUOJ rflW6NmGK7wj7rVBqafhdLaPDkj8bd7BsjafjNHWcogkeu19/beIJuYUjtfKvz4GFmiS l5N8sHUxS6f6c+ly8YimkwgLgFa9v5SLwiNwHA6Js34YFEY8d7Q1vHOgcAOX3YhWrqUT JQJFe8v1l90SA3h6eB1DYShBVcyyqD2PqDfVU7EurKkZVLa3EWATvN+HaIWxK9WqhH7G nnpNnQSQ8zD07P9w5LvuUBEg92kKO/DiDl2zJdLVsk9JrsUcQOoblIfLBJZ2L1rr5XgS hAYQ== X-Gm-Message-State: AOJu0Ywom7cDDWHvNEKjQfQn+IiQ4xw/PRFoOC37pkW4a5HMp4Wi//ku 7Y9hj4Kzgz5y4qxYJeEa9b4= X-Received: by 2002:a17:906:250e:b0:a29:445f:a1 with SMTP id i14-20020a170906250e00b00a29445f00a1mr817039ejb.140.1704913550038; Wed, 10 Jan 2024 11:05:50 -0800 (PST) Received: from andrea ([31.189.29.12]) by smtp.gmail.com with ESMTPSA id ko1-20020a170907986100b00a2714f1ba8asm2334847ejc.160.2024.01.10.11.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:05:49 -0800 (PST) Date: Wed, 10 Jan 2024 20:05:44 +0100 From: Andrea Parri To: Randy Dunlap 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 Subject: Re: [PATCH v3 2/4] membarrier: Create Documentation/scheduler/membarrier.rst Message-ID: References: <20240110145533.60234-1-parri.andrea@gmail.com> <20240110145533.60234-3-parri.andrea@gmail.com> <63046420-264a-4e7c-b45c-17f0486ba4d9@infradead.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <63046420-264a-4e7c-b45c-17f0486ba4d9@infradead.org> 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. 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 [...]" Andrea