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 78ED6C3DA7A for ; Mon, 2 Jan 2023 16:09:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 135CC8E0003; Mon, 2 Jan 2023 11:09:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E6468E0001; Mon, 2 Jan 2023 11:09:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F17698E0003; Mon, 2 Jan 2023 11:09:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E3B238E0001 for ; Mon, 2 Jan 2023 11:09:52 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B1372AABC4 for ; Mon, 2 Jan 2023 16:09:52 +0000 (UTC) X-FDA: 80310345024.13.E53FACC Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf02.hostedemail.com (Postfix) with ESMTP id 682F080016 for ; Mon, 2 Jan 2023 16:09:49 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=QTi3UzxN; spf=pass (imf02.hostedemail.com: domain of mkoutny@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mkoutny@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672675789; a=rsa-sha256; cv=none; b=7lCwqB6jJEKKzwa6BvuXzAKtzAO01XI2alnITo0Dm7bqJQbCoU5MHhlJMEXZrD5hW6bieq l8SJUZ1yJV+FL5HFdlBRO47eHhv3hytCr5UT4iFX/G+Q+3tTEPXPGYAEhf6klPi8XH4xHg VILbndTN/5VqtS0m3FKGSUvJlA0W4QA= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=QTi3UzxN; spf=pass (imf02.hostedemail.com: domain of mkoutny@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mkoutny@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=1672675789; 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=3TXMFafqZSk+G4FHe0dFtLpO4ewGe6qnJ+N0wbs8SPY=; b=SRHRK/zyiZIik8OcGvLJK2gv4+nFvu9+jayc1RaKgEH+NiPu5EPvQSqVuqsNLcaYQkGOAY lQxLkdAfzsgM765DdwbfQXntRzBEDqTmVtRKjPvn4kQsobYelYDhCx2NhJjqgpUyY23o8G 9I8X0P630i30Q2I6w/Kv98T/BxQICMI= 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 D17AE5C4B4; Mon, 2 Jan 2023 16:09:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1672675787; 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=3TXMFafqZSk+G4FHe0dFtLpO4ewGe6qnJ+N0wbs8SPY=; b=QTi3UzxN6Jw/VzGJjLhZQdsQ+UBM7B4GAP4tthZfQGXeYmVgc6UTwe+BvVvpUaumfvoFOC pDu4+IXoLkjUUez0lGE1mlsK48eJaXenqfirr60jtzJzW9r835sNXpqfDa7As9HZ2CZPx1 9zOUopaIcFyvLCNDzjWv/+lTgbqQR0o= 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 A0E4B139C8; Mon, 2 Jan 2023 16:09:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id p/lUJssBs2MKfQAAMHmgww (envelope-from ); Mon, 02 Jan 2023 16:09:47 +0000 Date: Mon, 2 Jan 2023 17:09:46 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Roman Gushchin Cc: linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Shakeel Butt , Johannes Weiner , Michal Hocko , Muchun Song , Andrew Morton Subject: Re: [PATCH RFC 2/2] mm: kmem: add direct objcg pointer to task_struct Message-ID: <20230102160946.GD16704@blackbody.suse.cz> References: <20221220182745.1903540-1-roman.gushchin@linux.dev> <20221220182745.1903540-3-roman.gushchin@linux.dev> <20221222135044.GB20830@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0eh6TmSyL6TZE2Uz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspam-User: X-Rspamd-Queue-Id: 682F080016 X-Rspamd-Server: rspam01 X-Stat-Signature: f1ddo9k1tffbf8zxg3ust4g3jcr13cq1 X-HE-Tag: 1672675789-318694 X-HE-Meta: U2FsdGVkX1++gbFa44OCfBRRLK1iu+numeVixaGRcMnyRSzbr0ehlyCqfFBCpBErwm8PhuL0QTSdttnQsktiNnR3ouQQnw0Fke5OJCp7RF/Ypz4dQrTXq3EbA+Mx4Gl2neKoGHWfv58cT1knbf69i6/tKbxClrXW18GSLerKcP2GdxdrbqgwdoXACZ+OISSJgGXm2Pm9dXxnWFbbXhpA+lOtDsv+NnGPcpSxgtUGcGpqw3KRsAVtPlWpYogVRUNPgTa/7QB3Aj69nwO8Hi7ju9ABWkdWaM3h8diRZgfiuaZI9j6+IcXOLX5q4KvSztxEznwVIvguI3PqEuPvo0bjb4rUhbEw84CAdifRTZQ63aJa9sqiu8msXgliujR5oYSeQjiXQK919bF44VnyPWDFrEp2bPZwkAa7YQwdMkEcsyo92KBBK4TKnozLMzUM8UY3U3TuBQGpIvSmVzdN5/hku88YDi75rFcDT6Znr69fe07IIhcKBZkweRmR0Isxe6xTVhaVnsZf1FKcGRPTELl5M+avDVdw3T2yFe1aYux3XHy8ozuFSIi1Q0122ni4B2Pwh8LDz0XGB4bCSDzKTE5PxxO4bNYbq9GDCC2ubZuSH0JeBgsasEEX0XvNLwP9ZZdbZoAlPy6oCcH26+Iqh8WXzGQrh4Abgp53mre9E6YcVJjP3GFYkBjFAiRc9PwpTCXPB/0HV3A2R0pLLgrFALNIScYRXEvn3s7MCUjLcjfmx+hOt/5KN4kr2CeFKY1GqnpmW4wh4j+K82cruvD5L4XJxy+sfM5vQ54ZMmCVqdkc3GEI3GYQ/bKCCYDW5CT9z6B7UvQMnDLPC4E78TW8SuD9HE+oadGiyVt7h4SR9t2lKyUitHz3ZrS9ovJCR2pNAsJLAcXpUMojM+KounB5UxhxxBz9yQavisySzdbARwdsahGe1IRVwLc9XQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello. On Thu, Dec 22, 2022 at 08:21:49AM -0800, Roman Gushchin wrote: > Do you have any numbers to share? The numbers are in bko#216038, let me explain them here a bit. I used the will-it-scale benchmark that repeatedly locks/unlocks a file and runs in parallel. The final numbers were: sample metric =CE=B4 =CE=B4_cg no accounting implemented 32307750 0 % =C2=AD accounting in cg 2.49577e+07 -23 % 0 % accounting in cg + cache 2.51642e+07 -22 % +1 % Hence my result was only 1% improvement. (But it was a very simple try, not delving into any of the CPU cache statistics.) Question: Were your measurements multi-threaded? > 1) some people periodically complain that accounted allocations are slow > in comparison to non-accounted and slower than they were with page-bas= ed > accounting, My result above would not likely satisfy those complainers I know about. But if your additional changes are better the additional code complexity may be justified in the end. > Btw, I'm working on a patch 3 for this series, which in early tests brings > additional ~25% improvement in my benchmark, hopefully will post it soon = as > a part of v1. Please send it with more details about your benchmark to put the numbers into context. Michal --0eh6TmSyL6TZE2Uz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCY7MByAAKCRAkDQmsBEOq uUG/AQC11XKCM/wWsjYXa9wOcZSD924NsT+jZ2ZVsvw96HBebAD9EYkrKAMMTTlE Zk65EirkknPYoU5zwvfnv8zzrOvGWgk= =ihb/ -----END PGP SIGNATURE----- --0eh6TmSyL6TZE2Uz--