Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4914845rdh; Wed, 29 Nov 2023 14:43:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwxG3vhV7ENDPBtAQkmF5YOBkJTEWtvJD1dlfOwd5oseDB31fmmelkFANZZRuVlB7fKKSm X-Received: by 2002:a05:6a00:1ca6:b0:6cd:e046:f3f0 with SMTP id y38-20020a056a001ca600b006cde046f3f0mr1855735pfw.13.1701297827238; Wed, 29 Nov 2023 14:43:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701297827; cv=none; d=google.com; s=arc-20160816; b=XiqBfiozh+Td7R53Zq1Ag8DFuu1MD5DOAISOyQlww0shjQOlgRotJYbZ5i+11Y8CK8 d/4thIPSYy5ke0ZQ0xQwF1ng8VPQafAFUQIMR8eyeclzETjH/XuaFH4Ua0NrNvO4WzXt xttVTeo7Vufwb9VnCB/bgjvuwKVBNq6CorzZW+snYSV5A3/TBVnWULANpYtbwnA8C5q8 FvDKKCFEJjZEHvErpUnCHqbqMJc01qf0vAqZG28Xxj9a55nZYGctMXH6cP976+NTPXmj pOjhmeN3lV1F1oliSO+Ytb2FBsfXIX0I/CidKszCIrbcddGTadKCEImbTZI9rHeYNgne 9/cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DPlSYieAKeZ1ZlgSPfXPoqg/eW8uKpsVlCNZ8IU+hBA=; fh=lbjvIu5YtU1tNM+H+yNSpOa+wxrXuiW1se1TzMxgn70=; b=tThAjGovcci8xRdKH8tyLXwyKLokHx9PgdKaTfCcU6Ewh5GyyutPTC8ai4DyNoT5KK oGMRhHqeNXk7Hasc1r61Lv+Vw/vKb2ZiF1tjXd+iuO4xOSgoE8vwRxdUtJAM9lrI3CHB cn4YSDNz+iPBG0OMVVXvlfR/kuKPrECXh9/R+ecjcoSo4+EyTHyJcRbF4BUzF3NKTglb +oxxts69F+0YcTfOkizvSZqUOTUPjECNdUu2PfdByMlOJ35/VGLDtUETZkDIYB6Tx4O2 1KzJmsNiNTTOv9GziyErmxSYE9lLhHXFMUv2VFiZ/QEPja4rBuXqm2iWvzxTf0wmjSpi 0lYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D2aGmlP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e64-20020a636943000000b005be1f94caddsi14411824pgc.799.2023.11.29.14.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 14:43:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D2aGmlP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 683C0802C8FC; Wed, 29 Nov 2023 14:43:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbjK2Wng (ORCPT + 99 others); Wed, 29 Nov 2023 17:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbjK2Wne (ORCPT ); Wed, 29 Nov 2023 17:43:34 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3528C1 for ; Wed, 29 Nov 2023 14:43:40 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40b27726369so2368285e9.0 for ; Wed, 29 Nov 2023 14:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701297819; x=1701902619; 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=DPlSYieAKeZ1ZlgSPfXPoqg/eW8uKpsVlCNZ8IU+hBA=; b=D2aGmlP1LvAyjmxatkr2rxYMqVgc0mJgJuyD/NiwRF0VfQFsYcuu4triQGSuLB0MOC k6Rpi/FqLU/RfuaUpVOO8Ng3PR8Rp3/Ps3kCdD2f1QvM91FiCchEj9EE09ZwFrp5X1gE MVWFi7fp0DZQ2Yn9ijonFDNZNATqshGXITzE9OuDB4leErbQeDgYIm7exp4Wdo8NLewt xOqF3nfhBHU3Qo25vfjqP2lO+rc1W/yHIAm28jGonLCz6vvkTkj7w+ZPChpvIultMcBS 4oZLU6rX79k1g5uJXo8VeWjvvdahO+k0++YrqGDH9wp8p/AoOQYaROeKoR08cwrhrOJ9 zYrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701297819; x=1701902619; 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=DPlSYieAKeZ1ZlgSPfXPoqg/eW8uKpsVlCNZ8IU+hBA=; b=R4qLvf4pdq3in+c1gDMiUhpUi2dFj2WvZdk+DjCuPUrkZTLLVZoUENZWzGSwYWOSX0 FK50u1xUnFk38YAGwr/rMuI5ziz3AkuhxbxTEJXDuwFn+SdKdJCqvfOnbgTGH57af5Gd /bDYQF+Andaj6Nbo7Ka2m7JtbrmURNbKPsmpfWpsyP6ffvD9eJu4f17CpGgsHA4HTdRJ 8i/7m1k7U75QKp4oioiuUA7PPjc3iE4aCORXFL113qSljwCgck5SUz/2QrspFfXV1HhM Qe0qhrEBQhzT3TVKYc4zFBbVTMrkoFaawh/xtveJJeubOHw9VQxvE9js6zyroeU9z9Um +ChQ== X-Gm-Message-State: AOJu0YyhYSNs0p5HTiF1fMKtjlhqsadKoUXvYhc003/p61L471zYpCnk Ols0Tf+y5ldwV87ynaKSVLk= X-Received: by 2002:a5d:4d01:0:b0:333:f03:4640 with SMTP id z1-20020a5d4d01000000b003330f034640mr4906914wrt.1.1701297819067; Wed, 29 Nov 2023 14:43:39 -0800 (PST) Received: from andrea ([31.189.63.178]) by smtp.gmail.com with ESMTPSA id l9-20020adffe89000000b003330a1d35a8sm6287307wrr.43.2023.11.29.14.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 14:43:38 -0800 (PST) Date: Wed, 29 Nov 2023 23:43:34 +0100 From: Andrea Parri To: Mathieu Desnoyers Cc: paulmck@kernel.org, palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, mmaas@google.com, hboehm@google.com, striker@us.ibm.com, charlie@rivosinc.com, rehn@rivosinc.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] membarrier: riscv: Provide core serializing command Message-ID: References: <20231127103235.28442-1-parri.andrea@gmail.com> <20231127103235.28442-3-parri.andrea@gmail.com> <91ab0210-07f9-42c4-af7f-a98799250cf7@efficios.com> <0a84c0e0-2571-4c7f-82ae-a429f467a16b@efficios.com> <53aac2ac-46ae-46b8-9fdf-34527b79a63b@efficios.com> <041c83e6-1ca5-4953-bcec-03571135165d@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <041c83e6-1ca5-4953-bcec-03571135165d@efficios.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 14:43:45 -0800 (PST) > > So I should probably stick to 93917ad50972, which apparently selected > > CONFIG_MEMBARRIER on RISC-V, for the Fixes: tag in question. > > I think it goes further than that, because you can explicitly > CONFIG_MEMBARRIER=y, see init/Kconfig: > > config MEMBARRIER > bool "Enable membarrier() system call" if EXPERT > default y > help > Enable the membarrier() system call that allows issuing memory > barriers across all running threads, which can be used to distribute > the cost of user-space memory barriers asymmetrically by transforming > pairs of memory barriers into pairs consisting of membarrier() and a > compiler barrier. > > If unsure, say Y. > > Before 1464d00b27b2, riscv just happened to set it to =n in the defconfig. > > I suspect the initial port of riscv merged after v4.14 was already broken. I see. Oh well, guess I'll have to leave this up to the maintainers then (I believe I've never managed to build riscv that far), Palmer? > > I'll look into adding the membarrier feature you mention (as a final/ > > follow-up patch), unless you or someone else want to take care of it. > > I'll be happy to review it :) Sweet! :-) Andrea