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 DCDAFC4345F for ; Mon, 29 Apr 2024 20:00:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 522576B0099; Mon, 29 Apr 2024 16:00:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4D2846B00A1; Mon, 29 Apr 2024 16:00:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C18B6B00A2; Mon, 29 Apr 2024 16:00:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 203336B0099 for ; Mon, 29 Apr 2024 16:00:17 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 997B4C029E for ; Mon, 29 Apr 2024 20:00:16 +0000 (UTC) X-FDA: 82063636032.15.CC6F5CF Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) by imf28.hostedemail.com (Postfix) with ESMTP id DBDC0C0024 for ; Mon, 29 Apr 2024 20:00:14 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=upUBjJS8; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf28.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.188 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714420815; 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=QQ5FcjaYCyg1Mr1CGy79zC22GmrlSZ/10SszbgWtzIY=; b=T8ylaXaCRhLti4xyUr/bIwdc+U9Zs1LbDPjlQ8nTZEGnNud9EE6ZZlMIymwG+0UK10XFGA HBM3nM/p8X2mAKeTRg6SNeS3JcZXOcVZNLvo1RnCMyhSEak4Ar8F+37dQJ8aTG0RPEgp/d Z3QuskwdnfJXZIzs7vbYKsQFVgYtIQM= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=upUBjJS8; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf28.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.188 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714420815; a=rsa-sha256; cv=none; b=rZiwc/9H34AS5Ub4MHaa2fMia1JlaLpD0/6Lk9l7Yj/a+U6Xj7CF1hQkQEhORNkDhasJjP A5Np+o55QeZehH5AglsWpNzYd8H3Bsr04qD8RcSPnoYgLycV6MWzWsvB6Fdluoj7NrMImb UplwHrq1VoiMY04N9hK5aZrfhjzOU6o= Date: Mon, 29 Apr 2024 13:00:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714420813; 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=QQ5FcjaYCyg1Mr1CGy79zC22GmrlSZ/10SszbgWtzIY=; b=upUBjJS8WJNxYCju+dzj7JEkoZILGvcJRS/jL9TRfeDHDAhNO80uHktKWufdqJaVXvz37c Na3/fPiwWSmrWlcX32RkGMqkuq3gWdF+v0x5XCozLMfbCGz5N/0wHNuhF7VwnIWSygCI0f ECuVybXOUfs0o4AsVHmfPlkt7GUCASU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Roman Gushchin Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/7] memcg: reduce memory for the lruvec and memcg stats Message-ID: References: <20240427003733.3898961-1-shakeel.butt@linux.dev> <20240427003733.3898961-4-shakeel.butt@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Stat-Signature: uwtjr48rb8bxqwsb75bgpehjtfqsuwqa X-Rspamd-Queue-Id: DBDC0C0024 X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1714420814-277521 X-HE-Meta: U2FsdGVkX1+AUcm+L34SHFhysSr7SAmveKONREhGT7nwz1A1xy30mfHt3RMC8qI9+bJ+CrkqSagpeFkHkouEADvVtkm7zILNC2IdXzve8KwCZTACeAIVlv/gAxs2Y6OntHOZabXD29u9Fw+Set5sYtHc1Wx1GaeQ3ILrZXgPC65HXuRU8W5TKdP2dpatZaH2V3yTfZaRhCTKxs8FIcLFsVN2KYwmNfpcVUkrGIzB46EFdOCOfghSutrw6TMO9oifbcgSpZlfymv04YV1ZfCjuE0MvA97VJgwzl6i+YjRToe3ZnUri/usKF0Xyg9x2IaGahRS3BySxCVJwnWC8acOhDXLtRw+KzJ7/PsMKa30Ca/d9G0zT+/Aw/XSTi/4HXWo3vef+dBRsDtSTL1GOLy6/nCzAmmyh/L7CyKCgt99NM4pxLyRb9L3xN/FO1tPaipoTpobAD4pQmc0tPSEUGth7FKjOCVgov86u4Q71HOueF0OaFvPZ+0anvMVyJJU9yi/Z9lPnLwISuu8PKFRLZhFKnZmZJch8lxpzMiem91N3pbcQfXzTrqZjWF80ZpeiTCakib+S9enGd0EnMReAg/BtJaWxniDpOlBrAJNkE6mngj1j5vXwcyhLPQd8Rc9uAV+JBBhvZdD6OS/s/5uqweD2QELn0ZzgaKu0cMFh7+Th9JtLs7ZT2R3/XjEAQYxbQPuNi87kqCLWkfRHSSh4uT09Ix60EVeBLXW23JCdahICocCnSTsJKUNLkKG5f7cc1/AFjhQxYG+/c5yyjch+T/2Sc6+CguAoKJC9eBJRBSlaqU= 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: List-Subscribe: List-Unsubscribe: On Mon, Apr 29, 2024 at 09:00:16AM -0700, Roman Gushchin wrote: > On Fri, Apr 26, 2024 at 05:37:29PM -0700, Shakeel Butt wrote: [...] > > Hm, I'm slightly worried about the performance penalty due to the increased cache > footprint. Can't we have some formula to translate idx to memcg_idx instead of > a translation table? > If it requires a re-arrangement of items we can add a translation table on the > read side to save the visible order in procfs/sysfs. > Or I'm overthinking and the real difference is negligible? > No, you are not overthinking and the update side is very performance sensitive. On my simple testing I do not see any regression but I am hoping that the Intel's performance bot will tell us if this is really worth exploring. > Thanks!