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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45069D374B8 for ; Thu, 17 Oct 2024 16:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gsU2+hsDP1JpASWksnLZSchRN7kDdrA2+jWf+1Q+v4c=; b=B1HncYdwDPgTM/+2Of2S2DGEi0 ksVuzcFgCT6Y6gSVrxHaocv6l2nBEecqo5eCCqgKVhff4M18nPRQumBNLXsDD1cKLJARTGg5qkeK/ 0Z7CkTvQeQ/2PJVHCLAXngSw6p8SvoxFYF1UmU6A8PXCUBFYy190hHfgj9xIueKYBd/rF8vcyvgZH J2IwInYj/BTNmDocz65p94Dq87DhYY1Wj89OubjzGTdhE8zcw1VoCMqvtdureLRzhj0hufUqMJMO1 dnL4IR6gyN4IjXZpfrhSDBjidX2CFH7h8OEG76tOAZHtcJkOGPHcS0IsonhUvVG4bYYeigYkZvBjy Ox6lfYeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1T5k-0000000FQkR-0z08; Thu, 17 Oct 2024 16:11:12 +0000 Received: from out-171.mta0.migadu.com ([91.218.175.171]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1T4A-0000000FQDU-2pBm for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 16:09:38 +0000 Date: Thu, 17 Oct 2024 16:09:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1729181370; 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=gsU2+hsDP1JpASWksnLZSchRN7kDdrA2+jWf+1Q+v4c=; b=s7EPobrdGTdJjE6vOEu1ImAGAdHmLOxhf62tWT+WGH0YyZaSo7wT8ZEgve2WUzQi0/mqIi AYsSR1KnzbjJ3ctQlIdOoX3w8oj7Fi05sglLqgW2vgc0dcY6GlCPZRp37D1l5malRGnnfP 1zsVPsRLT/PeIsFjknO2y5TBJNC/ge8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Ryan Roberts Cc: Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Greg Marsden , Ivan Ivanov , Johannes Weiner , Kalesh Singh , Marc Zyngier , Mark Rutland , Matthias Brugger , Michal Hocko , Miroslav Benes , Shakeel Butt , Will Deacon , cgroups@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v1 03/57] mm/memcontrol: Fix seq_buf size to save memory when PAGE_SIZE is large Message-ID: References: <20241014105514.3206191-1-ryan.roberts@arm.com> <20241014105912.3207374-1-ryan.roberts@arm.com> <20241014105912.3207374-3-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241014105912.3207374-3-ryan.roberts@arm.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241017_090934_901476_41BABCC0 X-CRM114-Status: GOOD ( 13.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 14, 2024 at 11:58:10AM +0100, Ryan Roberts wrote: > Previously the seq_buf used for accumulating the memory.stat output was > sized at PAGE_SIZE. But the amount of output is invariant to PAGE_SIZE; > If 4K is enough on a 4K page system, then it should also be enough on a > 64K page system, so we can save 60K om the static buffer used in > mem_cgroup_print_oom_meminfo(). Let's make it so. > > This also has the beneficial side effect of removing a place in the code > that assumed PAGE_SIZE is a compile-time constant. So this helps our > quest towards supporting boot-time page size selection. > > Signed-off-by: Ryan Roberts Acked-by: Roman Gushchin Thanks!