From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 1C9543838148 for ; Fri, 9 Dec 2022 18:49:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1C9543838148 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x635.google.com with SMTP id t17so13606683eju.1 for ; Fri, 09 Dec 2022 10:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BFVENMiC8I90Yv7Xwgg5bXqIOkjjSVhvVWkGZZB6Pao=; b=eHVWukHxpSRKJxKynBVUbtiuBU2XSqMUd8dNwiintg78P1I6RFMy0CwV1lY6ZDSV9u vvnLu7ks/abHifrtjMIbwfIMRhIGJ8QWKxA8TxMK5MXp+U/ZCEToZ2S3Xc+aCNhbhsBa sgjjW9RwgvvdxidhQf9/u5Q3wH6/xJZNmug2D3+feE9QJ4yvuOZmCruPtso5bQux4kiH XoQ1Xgod9TFEmEL1Njgh3P6SikXSr3cBjcegeQdOtlKKGAoN/Qh90Y5W2I5VG4C++6GW 5c8l3pAyOqZMFZlVgQCa4awSarIKYdWUroE2AGDyezU+YmUxbt82YFokMYfpmjLTSfmB IdDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BFVENMiC8I90Yv7Xwgg5bXqIOkjjSVhvVWkGZZB6Pao=; b=TcQysMA3VKVpOy+WKRAMWv4S2D3X0NPCmY7qWStOSF3Rlkud5aee4mqD3o87Lt7Sak XwcDXD5E/VIvRSXMCWsyLnxhRrpnH7aRkL/QP1mafHndJaMVUozch7lUjMZmPl6H8O0u /D2jkVXHykqDIMob/nt0zZ/ylzJtB8Rps89FD2xr8WIFCMzuOlhByC4DLyFR5q5Ip0h4 Z4ya7HuueFBMmn8JeGrKwiMf8iQxkaPzIjUTGrrx66t3PWvDSaX/ddK1yXHqqfpLhHdq PVej8+Giof86Kh81+xs5Xv2GD1VJcjj1XWWaf12fxQNgdvOmmOJINrBy1ZXyj96qpybR W3Eg== X-Gm-Message-State: ANoB5pnXwNrVjPjqOqduD0Pqd40txyBA3jS/oFH9waMi03C4AOMnlNhl 1SqQBj5lZLNMFzpgelfxaOyiYsimBerBdUinjziGi7VB X-Google-Smtp-Source: AA0mqf7qoRZhcdKgfCVetqZ29SmHKYvn+v8qtHOKhWkjvRCeQBr9cuoVaHFLGUejTeQnF51lsSZTS9MBleTXIHah4QQ= X-Received: by 2002:a17:906:809:b0:7c0:e4b8:7587 with SMTP id e9-20020a170906080900b007c0e4b87587mr16027263ejd.593.1670611753545; Fri, 09 Dec 2022 10:49:13 -0800 (PST) MIME-Version: 1.0 References: <6a3d9283-3866-e837-c348-6d2a4a701c4f@redhat.com> In-Reply-To: From: Noah Goldstein Date: Fri, 9 Dec 2022 10:49:02 -0800 Message-ID: Subject: Re: [PATCH v2] Add random locking benchmark To: Wilco Dijkstra Cc: "Carlos O'Donell" , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Dec 9, 2022 at 10:15 AM Wilco Dijkstra wrote: > > Hi Noah, > > > + /* Start a short thread to force SINGLE_THREAD_P == false. This relies on > > + the runtime disabling single-threaded optimizations when multiple > > + threads are used, even after they finish. */ > > > Is it worth benchmarking with some contention or is the goal > > just SINGLE_THREAD_P true/false? > > The latter, the goal is just to test singlethreaded is faster and multithreaded > is not slower. We could add a benchmark for the internal locks (which might > test contention cases), but trying to use the internal headers in benchtests > seems non-trivial. > Fair enough (reviewed this patch w.o seeing your next one initially so was missing the context). > > + > > Can you remove this extra line. > > I don't remember ever seeing that, another oddity of git apply... > I'll remove it in the next version. > > Cheers, > Wilco