Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1822102rwb; Thu, 15 Dec 2022 15:05:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6aHq5kBgZDNv62Vo7fAJAmTrKsEe6117r4eIHTgSFhRpyk7vJU9mzjK/89WWJ9bsN/CSVv X-Received: by 2002:a17:903:248b:b0:189:c8d9:ed30 with SMTP id p11-20020a170903248b00b00189c8d9ed30mr29347882plw.24.1671145505930; Thu, 15 Dec 2022 15:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671145505; cv=none; d=google.com; s=arc-20160816; b=a8fiZQ0liel59a9sr7269sZs8ctuZJY06wDy/4BGMRAj3/vUh9aL/e6/PDYwAIINB1 AhUUfMp/psUE2ddJynPIEbFZSJcAfjqi639hs477tUVJO5J+WxwRlJ4u4iL2tF7Njr/L rs6CoPuB3a3Q8xiFtiKLHSBJBP+rTQDgG22XOsu2/10Q4+Mmql+qTR/Al4kGE7rWcnrj +wYLxWWQwi5/UhEQK5bvHli2ckuQuJNJNgAuBKZzD3InTFa0etanCn/NZsrC0iXDIJpw XXeK01Sj7Q3p4/8zIH2/wk2UWro7bTgUbcgEqh5+VthPm4XV+qzukUl1y8QiLgiXjro/ qS2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BPKipWOXSyP8E5uQq5bsZzZCMqia+WCVTmajdnr3pN0=; b=eshM2LSYz0ZFtKKB8p0J/MHB6q/GfTETwa1Ed05ogrCyq0XOTrmbUpcImsPiJ9y/Ff EpZ+xquVtyOG/YzDrCtJJvITtUCCGAB8fGwZAr6oQyC66Cs2mni3pfYTi2oR8uOgRYTk CwueNsqYhnDbd0+S/Uw2+f4SSAHcutRKftMjU8A7MZNHxHBcX1l4TqzWmtRRaBXaoyzH n+RfDGnJOvjtmj8XkI8LTYF0LlQ9DWLAZuujOrb6M4tgItDYgegLA5HV2i654nYDhwsb MVYnBOIEY1Rpof6mCn9/fyuZ+inFzlOodTQaNTlXG11ZAwTZ8HUfOM0W2QkX2P188SiS sFRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="U9sbdwN/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a63ef4a000000b0046040a8be4esi720192pgk.754.2022.12.15.15.04.56; Thu, 15 Dec 2022 15:05:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="U9sbdwN/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbiLOWEC (ORCPT + 68 others); Thu, 15 Dec 2022 17:04:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbiLOWD6 (ORCPT ); Thu, 15 Dec 2022 17:03:58 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60FA8248E3 for ; Thu, 15 Dec 2022 14:03:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671141793; 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; bh=BPKipWOXSyP8E5uQq5bsZzZCMqia+WCVTmajdnr3pN0=; b=U9sbdwN/phURgPc14MFFGW/OM39VfOq+6ys2z7IWrxSQJR03lm0OYq9c6snnLRljPeefg2 ZOplp797Z3ItwA7PVEU9sTZG3rpcI1Jn70o5sk9ZjHc0Fxjhm1tlMSJE7vvtP1rUJvBSCC MyKRpcU06JqiC7rudBtqw6Lk28cAp/8= Received: from mail-yb1-f199.google.com (mail-yb1-f199.google.com [209.85.219.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-94-uj1LpNuXM82DfnBVzgRuYQ-1; Thu, 15 Dec 2022 17:03:11 -0500 X-MC-Unique: uj1LpNuXM82DfnBVzgRuYQ-1 Received: by mail-yb1-f199.google.com with SMTP id y6-20020a25b9c6000000b006c1c6161716so399674ybj.8 for ; Thu, 15 Dec 2022 14:03:11 -0800 (PST) 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=BPKipWOXSyP8E5uQq5bsZzZCMqia+WCVTmajdnr3pN0=; b=XegbD+RyvbaGj5gbp1xEI0VZ3xGDJf5MOV3urigUFCA52Nq8ujW7TWmT3yQhUVeQzB 1tgADtGZ9c2rFup7LqqROM0ATEXz0ryLbyi+p/6t9ZRvl+Q9Eluz/WEt2TmvSoOYvsfw GY3Ll7u+RC5SiG60binhtXAofrmB660JzKzwgAndBfKxR4lf2pjOPe6cxnTSqjcuGzLe wgqKcdid+EZ/V0vvsGA4lB+N6gZzxgV/h+aTwNNCZcwaxEOLWGCOMelZ7t7Q93uKdntV cjA1xRO4e/8koe60nbE+aVVMs5C1fbeP/O+tD1RTfxjWNbLFpD1ITqq/hyzGaIEsC30E Kd6w== X-Gm-Message-State: AFqh2kqgrvmatXbDJS0G7uimCGSbFIHq34hIFcCHWuTgVhY6nwqcQviy ks8MJKN10f//74kL3Rfs6IyMN2uXkqGNZ9l5zPBnDtvkyBSPaeiLm7VtjMFMF69Oe6DkK+GPrlv sgoHJZ8asfYy4iVcDYl95xd6ceq6fK5n6qvDiUfIW X-Received: by 2002:a05:690c:b89:b0:3d7:66df:9b62 with SMTP id ck9-20020a05690c0b8900b003d766df9b62mr416823ywb.133.1671141790974; Thu, 15 Dec 2022 14:03:10 -0800 (PST) X-Received: by 2002:a05:690c:b89:b0:3d7:66df:9b62 with SMTP id ck9-20020a05690c0b8900b003d766df9b62mr416819ywb.133.1671141790717; Thu, 15 Dec 2022 14:03:10 -0800 (PST) MIME-Version: 1.0 References: <20221213234505.173468-1-npache@redhat.com> In-Reply-To: From: Nico Pache Date: Thu, 15 Dec 2022 15:02:44 -0700 Message-ID: Subject: Re: [RFC V2] mm: add the zero case to page[1].compound_nr in set_compound_order To: Matthew Wilcox Cc: Sidhartha Kumar , linux-kernel@vger.kernel.org, linux-mm@kvack.org, muchun.song@linux.dev, mike.kravetz@oracle.com, akpm@linux-foundation.org, gerald.schaefer@linux.ibm.com, Waiman Long Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 On Thu, Dec 15, 2022 at 2:47 PM Matthew Wilcox wrote: > > On Thu, Dec 15, 2022 at 02:38:28PM -0700, Nico Pache wrote: > > To expand a little more on the analysis: > > I computed the latency/throughput between <+24> and <+27> using > > intel's manual (APPENDIX D): > > > > The bitmath solutions shows a total latency of 2.5 with a Throughput of 0.5. > > The branch solution show a total latency of 4 and throughput of 1.5. > > > > Given this is not a tight loop, and the next instruction is requiring > > the data computed, better (lower) latency is the more ideal situation. > > > > Just wanted to add that little piece :) > > I appreciate how hard you're working on this, but it really is straining > at gnats ;-) For a modern cpu, the most important thing is cache misses > and avoiding dirtying cachelines. Cycle counting isn't that important > when an L3 cache miss takes 2000 (or more) cycles. Haha yeah I figured so once I saw the results, but I figured I'd share. We have HPC systems in the TiB of memory so sometimes gnats matter ;p The 2-3 extra cycles may turn into 2million extra cycles on a 2TiB system full of THPs-- I guess that's not a significant amount of cycles either in the grand scheme of things. Cheers, -- Nico >