Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10854703rwl; Mon, 2 Jan 2023 09:12:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXtHiJ6xdcM4VQkWp7BKR7cJYOlZ4q22aYph1gzi8itwfIv8AzmNRlzcGeTEffm6bf+ubynh X-Received: by 2002:a17:903:ca:b0:192:9fda:7665 with SMTP id x10-20020a17090300ca00b001929fda7665mr15828269plc.53.1672679548886; Mon, 02 Jan 2023 09:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672679548; cv=none; d=google.com; s=arc-20160816; b=deel9/E0nEN2mS3xxTJbpqeZp+bwLQ7qDc4IgJmp2NJLN2gj14O2MRVn/HTsALzq9r 9ujKBw77//bcQJzfeT9VhMtL7rjF69j7E4uGq8xZbnqEmSFRx0qCnq0SykID4oA3l82Z vNgKjwRmx/VHWYzIYZFlHxSxLueeGuWd5D070/HAgF3XxZvMR7yl4V7C0vnnBIAU2yga BqDk7PDtqO30mHjuKkBQ91jJoRaYFWlvhdSVCe74smMvH4RiSpJB6TrfpLKfFZeoknSO +xNlMBHzOiBtAGxlpWYA8PHELZDpKYaGOR+vyLFTiVnB7E2XLVH2YZYGuWl7aU1l0mjh YEvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3TXMFafqZSk+G4FHe0dFtLpO4ewGe6qnJ+N0wbs8SPY=; b=sQUyR616+2bssmh2uRkU8CMP1P+bHs9xyn33rdGzNC+FH635M3w/Pi3BXLpXFXiK8J SQ2fq7lJEaFcG7rCbFqt/puI9659ccjvXDqQzEOFtsxh3tTux17tX4kHZ/YOp8suSzDs tCiDlOW7fVg8z739FSpegB0DnsuIC2L8O8VT4uPXSq0s/erOMoytL5MdIf0z45FL7+EY brPjTUhMisIRE5mKrJ0DeHeH2h+ewJhIwmRbq6L4/DzgMVfj12L/ivIHmyGUmZh4Fn1v p2cyBeHHrAMlwprtniSXRynQMxQNyrTk1pkQiGJb9tgnU6roY3Tad9Go4/OA746/eHp4 BvyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=QTi3UzxN; 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 p4-20020a170902e74400b00186f22a06absi32378413plf.253.2023.01.02.09.12.21; Mon, 02 Jan 2023 09:12:28 -0800 (PST) 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=QTi3UzxN; 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 S236548AbjABQKS (ORCPT + 61 others); Mon, 2 Jan 2023 11:10:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236368AbjABQJu (ORCPT ); Mon, 2 Jan 2023 11:09:50 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 526F7B1C3; Mon, 2 Jan 2023 08:09:49 -0800 (PST) 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-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 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 --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--