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 43D23C77B7E for ; Thu, 27 Apr 2023 08:39:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD5766B0072; Thu, 27 Apr 2023 04:39:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A84E3900002; Thu, 27 Apr 2023 04:39:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 973EB6B0075; Thu, 27 Apr 2023 04:39: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 899106B0072 for ; Thu, 27 Apr 2023 04:39:33 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 587D8A0172 for ; Thu, 27 Apr 2023 08:39:33 +0000 (UTC) X-FDA: 80726522226.30.BBC85C8 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf03.hostedemail.com (Postfix) with ESMTP id 6EBA62000A for ; Thu, 27 Apr 2023 08:39:31 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=X353Ltqf; spf=pass (imf03.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682584771; 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=vMrvZyqM9F6NwS2j3x4LD6uk7Z1GCte7sBQp3tSyrI0=; b=Nxc+NZM4I8gC/h8CRmV4GQCT1i0mg0SMR8Hd5OBfGqpBP6d+aSSkHY09ZzZoXiGnM0PGwJ 0Mj09hWNDb0RRUFUOF6iV8O0VW3JLqiGf9lLxDzkAqwJuLi+YMEk+7pvuSPkFjLZrlO0JQ UpF3YJ33JMpjrs9pcq9EVU8CWeXhy4w= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=X353Ltqf; spf=pass (imf03.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682584771; a=rsa-sha256; cv=none; b=r/tPXJ3JgWI+b74L/VHv9hZOHF2txq6X1MsJBXjapwWHO65S8IHepjOhRVTYaobmKz0lab f+98YaKDNALUm1zHkC6GjUgfA0I+clFBDviG9RYyyqxalt7ElIE1hZJ1G5IP/Oy58IxSBR hLCDM5aHZe2mqJnx6yqIeMdZSE5WIUc= 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-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: k6hzcefte759sup98zcbtdonwq58i9t6 X-Rspamd-Queue-Id: 6EBA62000A X-HE-Tag: 1682584771-149677 X-HE-Meta: U2FsdGVkX1+tjBi9c3Rw6Ti9BbmvxIwG9LHgRaK5I8PUC9AFqgXwqREaLln7KHdZ0sOf9eKKqeGBTg0AfYEdL9rEhxNKh9rij0bpI1RCyUwduN2YjnsfxdArAmjEOzfuZDRxN2DNKhXCSbE1rIXV9QQ2nXRfafJysNk56AKu9v/TX+t3uYSEyzHTugEL04Dbxz1XSc3m+CWeQHwZ1hsTYFp8un6jFjMfWOK+stfQkEjGuOMrXt4r34uO4kWX8LuI79VtGVaO00lM1TyL/FwjB8nFmXLw0kD00qqJI+6dKdWkwkTaw6KznT+wMh3oKrRBonQqsCn6Uz15A2oYvWcosHTJkrfFnN1rV7kHovsTRaXlDFxF2/TuIoo1n5DLUCPEd64BKw955JkMRMM4a0CEXsXWdggM0w94YRp/Ax/PIsZYLq8Mo4sB5rfbW8vFqieD7Kgr6udsD6aiPbJRSwEex1PTlpWRIoJtK/O3IFnRaV2pY41SnFJvVpSHeQnylugtY2YmusqKDwSQTCvbHCQKyjvcUziyANRbcE+S3XIvCbpvpXvPf79OC+WmKqjZwoC0PjXN8h+C8MMWU1Xm2G/eW4lWrz16YJDKk9YkJLarHLcxQfDq6L8AL9tBQX7o2hjFLza28KTIIQjyPc4qSprxIafxzLkzESA/aLwv7McA0+CSdJLgPugGANjK73PUErbUmAijR5zONCWFZvJsazAaBNXI6syawPwfu+DftUlVdEpjrLH54wle4kPtv3A9LmP0ekMdvwKgCL0wrSjKnG5M7HBCEW92noBr3LfCBA51T90RsnHe/4OJuKnQ/F4CD8HOxqRWCUORZ3A7sPFLXjmjaDfaQfcETT/ZtxBoRz3t3ErP3h3HXMfhY6lGam3vgZgMVuAJOOssVmoxdGEYtjWD/cAO7RP6Iz3VlRL8rQh/eDSkxSM9JiTPz0AGCbN8ymG/EG1ZxPrI5vljK3vSmmM OGxWBpl4 vL5E+iOJVYvVPcHfAekOC7+836xi+sMEZ81a5TYOVLyJf0Fx09fw9AuQcQN9f4Cjsuq1mhnDCElmpYHS4tWlnczOfCkO6YyIVnHiTXwmGuRKpWAN+X4J0hRZ0+uC8PVvvSd1h5wyNnrkYtGA0n43hRgUnLFzGz4nC85L7XqXSY+V716E= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000664, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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