Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp923110rwr; Thu, 27 Apr 2023 09:48:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7omjf/mbNgh/jYEP7EcBdjfIljMalfCPDFo9PGTRNJ9fMlV+qWMtz7QwFsloUiAAYiA5Qr X-Received: by 2002:a17:903:244b:b0:1a6:5f92:3ba with SMTP id l11-20020a170903244b00b001a65f9203bamr2705957pls.0.1682614103278; Thu, 27 Apr 2023 09:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682614103; cv=none; d=google.com; s=arc-20160816; b=svojsKo4OKllj+hmbdVhb2IB1AN1WTLGN9xfsbSbw6FsP5C1f6MP/+pThCkONX9Fr5 3BJCA8rrRvB+CI+AtOmWr7uKaVjNG1UJ9c7e1mAd8B+hEwFYPyAdIiUOJtrHEp96oMEu Hl9FFvy3LGtBf3KQA2W4urLRjxfK1drbXdS+y2khZfpPk3hFQ2In5i9HO2MTfZ0nl0Y/ gYjbW+2CJkd3ow0ETSHHJl+kwz3RQ+5tZMZ6jJBXUCOPI+tc8+Rp+eW7OT1Sl/9vUybS W1Z7018MEInqzmKAQ5u0S6nwvFeuzwfyRdiGeoAUCZebgHpPvBALtJNaQSV0Dlnb37VM dVPg== 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=Q+mSfHIYwgygtxN4zqh6EGSnWzRFToL7aoBJGdpNRnc=; b=X/BBct0xj9mSuMfBG+NBxpK1Z1/Abrn/qePaMamsa+3FM6Xmyw62PKDdK0lBQV0kpJ a79aVU5AlpqYyCl9FCo6OUgwRMrOmyqZaC30wzvWSxYgjsmbcKQ3TZxXpiSHoa8QWiAI vOx/LOY3JOGqhoPegtWl8oUOcCKbfml9OvaY81BG5itFBzZj+xZJ8zT/gfFFtGBOFM0L pDr7w9d3lYL2puwt568OfC3yxULwmqWfJIewdc7wmRTX0k/qe2mOjZuJfD7qfSkzDEvX fd7DCVPCxRBUwpYME0qT9yJj+s6kmHZQEfE3lOAM43UdxgXSmXmEQKtRNcAscSkaGA1o T2dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bdic6POI; 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 f6-20020a17090ab94600b0024753ec4dccsi17380pjw.124.2023.04.27.09.48.11; Thu, 27 Apr 2023 09:48:23 -0700 (PDT) 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=bdic6POI; 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 S244273AbjD0Q0U (ORCPT + 99 others); Thu, 27 Apr 2023 12:26:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239857AbjD0Q0P (ORCPT ); Thu, 27 Apr 2023 12:26:15 -0400 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 A21D6AC for ; Thu, 27 Apr 2023 09:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682612731; 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=Q+mSfHIYwgygtxN4zqh6EGSnWzRFToL7aoBJGdpNRnc=; b=bdic6POI1xqLpIeipFZSoD3edhltlV9/PDgnOh5cpyl5yizszxeEI1gxVMmuWZAfDwLdhP y0smU0X6TCLcVquIiLSS4yGmwKN2N1uoq7GPyimzzNYgHSgdu+0hnVLuOtgoXXSCvTP1ut FpU/yX25scn62IWSkFR3gVRamO/LSj4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-352-GkWBjQSnPwanr_NMARvn3g-1; Thu, 27 Apr 2023 12:25:28 -0400 X-MC-Unique: GkWBjQSnPwanr_NMARvn3g-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D7AD2808E74; Thu, 27 Apr 2023 16:25:26 +0000 (UTC) Received: from tpad.localdomain (ovpn-112-3.gru2.redhat.com [10.97.112.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5438F492B01; Thu, 27 Apr 2023 16:25:26 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 5E59E4038F56E; Thu, 27 Apr 2023 13:25:10 -0300 (-03) Date: Thu, 27 Apr 2023 13:25:10 -0300 From: Marcelo Tosatti To: Michal Hocko Cc: Vlastimil Babka , Frederic Weisbecker , Andrew Morton , Christoph Lameter , Aaron Tomlin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Russell King , Huacai Chen , Heiko Carstens , x86@kernel.org Subject: Re: [PATCH v7 00/13] fold per-CPU vmstats remotely Message-ID: References: <44f2df1a-ace4-0c44-166f-4f2fef49e0c1@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.3 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,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 On Thu, Apr 27, 2023 at 10:39:29AM +0200, Michal Hocko wrote: > On Wed 26-04-23 13:10:54, Marcelo Tosatti wrote: > [...] > > "To test the performance difference, a page allocator microbenchmark: > > https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/mm/bench/page_bench01.c > > with loops=1000000 was used, on Intel Core i7-11850H @ 2.50GHz. > > > > For the single_page_alloc_free test, which does > > > > /** Loop to measure **/ > > for (i = 0; i < rec->loops; i++) { > > my_page = alloc_page(gfp_mask); > > if (unlikely(my_page == NULL)) > > return 0; > > __free_page(my_page); > > } > > > > Unit is cycles. > > > > Vanilla Patched Diff > > 115.25 117 1.4%" > > > > To be honest, that 1.4% difference was not stable but fluctuated between > > positive and negative percentages (so the performance difference was in > > the noise). > > > > So performance is not a decisive factor in this case. > > It is not neglible considering that majority worklods will not benefit > from this change. You are clearly ignoring that vmstat code has been > highly optimized for local per-cpu access exactly to avoid locked > operations and cache line bouncing. > -- > Michal Hocko > SUSE Labs Again, the values fluctuate between positive and negative performance difference (i happen to have copied a positive value). So the performance difference is in the noise (its not stable at 1.4%), but rather close to 0%. So the data is showing that there is no negative performance impact.