Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3595949rdh; Thu, 28 Sep 2023 17:24:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/JxWheNIR43Lxsq4sRetb0vUKwbTyW3HYzFKLVXU5QfJ0GhxQ3z0Roe9kstWo+j46jXbt X-Received: by 2002:a17:90b:1e05:b0:26d:416a:d9d2 with SMTP id pg5-20020a17090b1e0500b0026d416ad9d2mr2851757pjb.45.1695947043282; Thu, 28 Sep 2023 17:24:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695947043; cv=pass; d=google.com; s=arc-20160816; b=X62Ym7yIKT9uoBYo4cIqxDqbQc40CXbI84ZSo4xae4/L25pFKQBrQT4Yvgf504aI+u 1OvPdSpcGp5l7e+hJz9QgBuseYE0zoMBIdG+A56nkHiAkr5JKn49tfwW8hurvQN+AKA4 9D3cxiOZSUWYZwdx15UOmGYS1C8eZQfX3W8eYs9g5xbRYnU16zHn71oFifAHt8gBi031 xxCI1HTQWSZlOhzE+dzLPJcGCbnox5GjMMIw5Ldo5mqfoLhMMf53zh+BDgOsJvFFxP9p InQR7QiG48KjqqasepYkbqVaMXEL06EUr7T5PjZ6dHRqGHcP211BK+jVSJZZ2wVfePna lVLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=fV4Zxk0FhT7C3XEli4MGvFTPX5hp1XlfXjZMP4aD39E=; fh=BNCW49RQqkSXg0kGVnz8amxus4AgDlsjgVBkNcCBCnY=; b=erTIdPjq5Q/iqIN6dD+3wEa/6IlzAe16Q1pK5ShBVNlZvE5Uk3B8QYdX3j/datDzhm q5C8LWsMqr2Q0K0ISRlhZerC0MqOqfyvIk46rTfhp02izAY6ofg+jZML/ehB5oNr1wWI +hkdzjWmaVg68H/W2e43ONv8gAxZ1tdGIWezHL2t5Kb1a+1u5Q6AnigBwNa2QCpsbL1X 358I1KRtOFi2wLKcskyc4i0xwLXiSLrSM+YHWFF0CqVNLN/YJK7BtjgbV1lFJ1XX1TXB ogNctzs9NlvW/NfwiZ5WoE721UP58YWCGuwIME3WRxKrAbc+U94hoaPDRTnEU16UcWsm L+YA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@stgolabs.net header.s=dreamhost header.b=YX3pGd+s; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id nn4-20020a17090b38c400b0027367e0c931si338215pjb.129.2023.09.28.17.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 17:24:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@stgolabs.net header.s=dreamhost header.b=YX3pGd+s; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 685F0807C55B; Thu, 28 Sep 2023 06:41:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232252AbjI1NlJ (ORCPT + 99 others); Thu, 28 Sep 2023 09:41:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231966AbjI1NlH (ORCPT ); Thu, 28 Sep 2023 09:41:07 -0400 Received: from crane.ash.relay.mailchannels.net (crane.ash.relay.mailchannels.net [23.83.222.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C21C618F; Thu, 28 Sep 2023 06:41:02 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E2EA16C13E9; Thu, 28 Sep 2023 13:40:57 +0000 (UTC) Received: from pdx1-sub0-mail-a312.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4657C6C10E9; Thu, 28 Sep 2023 13:40:57 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1695908457; a=rsa-sha256; cv=none; b=g9ApNVDpXUw8NbiVPB91whx+A98KefOUdvwQ3MYgplXW6DoYam+sUPQAu91KxM6lXmAxXG 4+lVY54zLzyyeGEiSaAH0MBOT3EuV9QBCa0z35Pjcv+ka5OdYgrOTPawDQ8X/6Hog0PECj +VCYPSQUjhUvfaQFeKTuTziLY1PYZ7zN0W2keRSHnvhhkZRSqGTT7nDSy/vr6QmB7kG2zE aKNFEeYHzAdw4/CP9pzCP/D5KIHZM+kN6o0Doinn8IGGWCCyXnD4WUM7GoCEAEmTdubvyH YNCN9PZ81xsNuE4W7RAYFXtAiT4RMIC4CXIiuJJCIv6I1MUs9hAY1OAbljCfwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1695908457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fV4Zxk0FhT7C3XEli4MGvFTPX5hp1XlfXjZMP4aD39E=; b=HoJv0cmylHUZA6FoIjPfBtY0ro3gzvVAMtGpG62BbF4JZKhTFuAeXbbMMWrMRmmHLMWbC1 Su1yYVFJnEg6+imcOYpfqRFBMKak44KKYR7GGJC1Y23rdaeyTn8Z1YRVOvAY8jdOJGmth6 ki1bCHAvCi1kba0drAKEAC254cmoOeUVO95JQzn7aFe1bnyaEsN4EX9DQLOFMWoci1n9Fq KgwUoMt97N7Npdr93dzqm0EXiacL/gvbC8ECImymDcwm4f2YFI3iSlGTyH5WvxP5xNjV4m qBqAkSJSA/OCTfaTx6sj6Uvr+90EujW3AM732SSUMEeK1om25hJK4lnP9RI4jA== ARC-Authentication-Results: i=1; rspamd-7d5dc8fd68-ftkct; auth=pass smtp.auth=dreamhost smtp.mailfrom=dave@stgolabs.net X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dave@stgolabs.net X-MailChannels-Auth-Id: dreamhost X-Plucky-Illegal: 128ccf8d5bc7bb01_1695908457686_874718514 X-MC-Loop-Signature: 1695908457686:2815361285 X-MC-Ingress-Time: 1695908457686 Received: from pdx1-sub0-mail-a312.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.109.140.241 (trex/6.9.1); Thu, 28 Sep 2023 13:40:57 +0000 Received: from offworld (ip72-199-50-187.sd.sd.cox.net [72.199.50.187]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dave@stgolabs.net) by pdx1-sub0-mail-a312.dreamhost.com (Postfix) with ESMTPSA id 4RxF481GpZzLJ; Thu, 28 Sep 2023 06:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1695908457; bh=fV4Zxk0FhT7C3XEli4MGvFTPX5hp1XlfXjZMP4aD39E=; h=Date:From:To:Cc:Subject:Content-Type; b=YX3pGd+sUWu1zeeF2pqWBMRrJZeNQkOmmn70Mqq6Iw782HyjKK/rQbp90x0CM28MQ ORUsj1thJvkFcftFmXRFJgwcTgcZAUIZnM8TWQkBbOnsfu3mrIjHTt1mt7DmYtaeo+ YA/JI9YuN/kkMCRAeJLVbjheB8a558IPuxjyzgYK1d4QDcG4sNAI3j9bKO3NwAPGWw xjMHvl+rpIZEnI4KMbpxd8720EKSNF/OzV/vX425Rpme0SB+CUYaGU/7bSv2i+dXCK 9ho7aXqOGPZPB7rqpNc5GGz+/Yg4v0H+teJQiEal+h5fLIp3hcmE3uZhGbuxwl2OWx hgJkWw+wEHVfg== Date: Thu, 28 Sep 2023 06:40:53 -0700 From: Davidlohr Bueso To: Peter Zijlstra Cc: tglx@linutronix.de, axboe@kernel.dk, linux-kernel@vger.kernel.org, mingo@redhat.com, dvhart@infradead.org, andrealmeid@igalia.com, Andrew Morton , urezki@gmail.com, hch@infradead.org, lstoakes@gmail.com, Arnd Bergmann , linux-api@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, malteskarupke@web.de, steve.shaw@intel.com, marko.makela@mariadb.com, andrei.artemev@intel.com Subject: Re: futex2 numa stuff Message-ID: Mail-Followup-To: Peter Zijlstra , tglx@linutronix.de, axboe@kernel.dk, linux-kernel@vger.kernel.org, mingo@redhat.com, dvhart@infradead.org, andrealmeid@igalia.com, Andrew Morton , urezki@gmail.com, hch@infradead.org, lstoakes@gmail.com, Arnd Bergmann , linux-api@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, malteskarupke@web.de, steve.shaw@intel.com, marko.makela@mariadb.com, andrei.artemev@intel.com References: <20230921104505.717750284@noisy.programming.kicks-ass.net> <20230921104505.717750284@noisy.programming.kicks-ass.net> <20230922200120.011184118@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20230922200120.011184118@infradead.org> User-Agent: NeoMutt/20230517 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 (howler.vger.email [0.0.0.0]); Thu, 28 Sep 2023 06:41:14 -0700 (PDT) On Fri, 22 Sep 2023, Peter Zijlstra wrote: >Hi! > >Updated version of patch 15/15 and a few extra patches for testing the >FUTEX2_NUMA bits. The last patch (17/15) should never be applied for anything >you care about and exists purely because I'm too lazy to generate actual >hash-bucket contention. > >On my 2 node IVB-EP: > > $ echo FUTEX_SQUASH > /debug/sched/features > >Effectively reducing each node to 1 bucket. > > $ numactl -m0 -N0 ./futex_numa -c10 -t2 -n0 -N0 & > numactl -m1 -N1 ./futex_numa -c10 -t2 -n0 -N0 > > ... > contenders: 16154935 > contenders: 16202472 > > $ numactl -m0 -N0 ./futex_numa -c10 -t2 -n0 -N0 & > numactl -m1 -N1 ./futex_numa -c10 -t2 -n0 -N1 > > contenders: 48584991 > contenders: 48680560 > >(loop counts, higher is better) > >Clearly showing how separating the hashes works. > >The first one runs 10 contenders on each node but forces the (numa) futex to >hash to node 0 for both. This ensures all 20 contenders hash to the same >bucket and *ouch*. > >The second one does the same, except now fully separates the nodes. Performance >is much improved. > >Proving the per-node hashing actually works as advertised. Very nice.