Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp326252rwr; Thu, 27 Apr 2023 01:41:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7D0POo6o8ubYiP+olp3+oriXg2zyA7bt0k23xaShu6DuEppdK8KzTQ5bODhWnmPp7tXBfE X-Received: by 2002:a17:90a:12:b0:247:a17:9258 with SMTP id 18-20020a17090a001200b002470a179258mr996805pja.2.1682584889299; Thu, 27 Apr 2023 01:41:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682584889; cv=none; d=google.com; s=arc-20160816; b=ndydT/bh3kQ549ldU4IK8z9IUNtO4mbK+6k3sUEXJQgh0jEtL3AL2kHuzNH5kEcXc1 Doy6wB/hY5sTkMOaSfG/fKd6Qrli8ud6b2HDD5R09qyL4X+nwsSsUP9kRldSLQZqaGOk oernjehjth6otwCtbSOqM8VBCfnLPpDKC3lVvlwApE/QvsN5lrpMTy6Ddxcb7TroEbZQ vqOi1Tqx6hsg3uwTgao0+upBrhiMkV4K4atqdl6/rJRCWjR9AzxalpfjIEUFU37FGkCc SLAZVdTVDLP0pczEpX4qzgMxD/GKGrsOyGt/pUToj7hZm8UA84tlVfy4MpmLJ0VHg6Ec NcJA== 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=vMrvZyqM9F6NwS2j3x4LD6uk7Z1GCte7sBQp3tSyrI0=; b=0f6ZYw4m4W4QnCl3nnDnFkZCM+b+KNhr3hcB/bw08yr9qe9HUj+kWIGiWhP8Wir9+D BJ6q8BOHS/AqtE37sbBE0LQBSlquW4X4ttGa43Ij87ZDg0HUCr4v3tGzRLLuq4QG3rMZ a12gx/EY+Io1ii+DsKuIHPisSweUXRwFTvjoJqdcEGm/zJ/VL0/IuMRkNWF33nSAiavM CwF1r/uJW5LPms5bTtFb58bHCz9fRZUH+ttcuhjZZFSLe9B2KAyFMUCek0DXZipCrbPX Wuo2Rd//ERMlRPHb7jICy8lAksWu4CJWJuHiQ8yuQvzeKJgJSH03m3HuQqqHx2Z9/WOQ J1XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=X353Ltqf; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot7-20020a17090b3b4700b0023369af18e2si20316217pjb.72.2023.04.27.01.41.14; Thu, 27 Apr 2023 01:41:29 -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=@suse.com header.s=susede1 header.b=X353Ltqf; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243132AbjD0Ijf (ORCPT + 99 others); Thu, 27 Apr 2023 04:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242876AbjD0Ijc (ORCPT ); Thu, 27 Apr 2023 04:39:32 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B02A4C39 for ; Thu, 27 Apr 2023 01:39:31 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 057BE1FDE6; Thu, 27 Apr 2023 08:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1682584770; h=from:from:reply-to: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=vMrvZyqM9F6NwS2j3x4LD6uk7Z1GCte7sBQp3tSyrI0=; b=X353LtqfV+6pqSyB966vqMy9+ztle3Z/pqW67hkJRs/EoH5ZR0mfDLsDhPOngvMQURlcG6 vCrV3rrt7OVsXzGXuO+nEKNZxlYWJRbJ5bstwD5oXZDa9hsSE7KNAUcyGxlvI8faB7XUcA amefGyok16OH+ZV2mZvvAX9AtVY4Pos= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E6665138F9; Thu, 27 Apr 2023 08:39:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gKb/NcE0SmTpWAAAMHmgww (envelope-from ); Thu, 27 Apr 2023 08:39:29 +0000 Date: Thu, 27 Apr 2023 10:39:29 +0200 From: Michal Hocko To: Marcelo Tosatti 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 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