From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47CD1C77B73 for ; Thu, 27 Apr 2023 16:25:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6063A6B0071; Thu, 27 Apr 2023 12:25:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B718900002; Thu, 27 Apr 2023 12:25:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47F526B0074; Thu, 27 Apr 2023 12:25:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 397656B0071 for ; Thu, 27 Apr 2023 12:25:33 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 01E1B402D4 for ; Thu, 27 Apr 2023 16:25:32 +0000 (UTC) X-FDA: 80727696546.03.90B7DF2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf14.hostedemail.com (Postfix) with ESMTP id 9B8BA100025 for ; Thu, 27 Apr 2023 16:25:30 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LaQjDca3; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682612731; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Q+mSfHIYwgygtxN4zqh6EGSnWzRFToL7aoBJGdpNRnc=; b=rSuAd8EET9OYIqpzTO0dtk0cGj2p8Cl6H6C6lCrcqShPfNWv3gHMqN+hD6afS4tABscIdi NzIIDRtsUtM5ctan0iaAxgYgl6XhlZmWA4OY+JARLRZyuya4Xo2Sf4KHIKSwfd0MRgMS+K WAQKyPx7VjDCEEEF3gi7p5hrwf2k3iI= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LaQjDca3; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682612731; a=rsa-sha256; cv=none; b=KwRE8YusaBmb4Vxuhp8Wxav2hviufzEtxpjL41/7RNr7LLDu/jlEtLB6Ui17WEvW4Ov70p NaIjytiDt6x8fCslZdO8ClKccI0ievc3epRh/+ZA1mloFwsB6GZwhFarG65gFt6fbwFApW 3YXxj2MI0qsTWK3E5kuf+ihw24FFlpw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682612729; 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=LaQjDca3MwEQ35MunmA+y5PURjxPATJH39tupqTP5b4W0vAceLSS00FKU3RtJV5HeQo7Uq 3MeQRbe+eRXRRpMA+QT8xAdJih0F5ocstLJpWWEJkmGDRHeG+x88iUCVqu8GuQ9YRy5gjX S0NegU96SUeL+JBbwiUjlhZ7ifUPSh4= 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-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 9B8BA100025 X-Stat-Signature: 1bozd7wy7f5ysj7n61f4hine6srjx5js X-HE-Tag: 1682612730-14450 X-HE-Meta: U2FsdGVkX1+w/VMeSCkIR0UEdIe5HjNLAb+Kq1A9RoqbK7J1FvyCG2uAeNyRQ33vvgILCnI13MDhdXKrSsOQFriefBJp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X-Bogosity: Ham, tests=bogofilter, spamicity=0.000021, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.