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 3C1FAD16268 for ; Mon, 14 Oct 2024 14:30:37 +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=HcEOyQjDS7a6A9bsQE6vr5VWzjSUJouS2AgRnzgA9wE=; b=WzAWa5dhrTryJV/iR/OVH6Kc81 aadPZNrjazr1gDUgOnfhYyCbqMm6NqsiSaXqeU18VnvmYvwVaE91VGg/z0qUgZw5pMzDWCBl00S66 cxFX/RmJf5SNi3kZAn1VOh5FI2d/Z0FCbl8+DROtaZRPXv9memXW6oSP2Qvo5rE5t86xl3TpQEtPq 4NEJa+yEZr8t3v8UH0sZks2JkG636ePJ2Hhb3621uuJDRo7lOj9Jd7L2m3pwJM5jV4ltKSSjmgSCO HWbvRygmowZ39SyZuKQQHDn1mOlSKdfs+ILQfVlfVl+XBN6jKiNCCIpPAjVKiKkjFXAL9V4A8+OGS U0l7yVVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0M5Z-00000005Tb3-0OCA; Mon, 14 Oct 2024 14:30:25 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0Kgi-00000005AtM-3LDj for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2024 13:00:43 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-286f0dcead5so3184670fac.0 for ; Mon, 14 Oct 2024 06:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1728910838; x=1729515638; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HcEOyQjDS7a6A9bsQE6vr5VWzjSUJouS2AgRnzgA9wE=; b=SnVG5CiJoJBXAnQB6TP8eB6shSWrEQXjB+l8Z6i+EI22zSfKPBVxIxp01CEqJqC72x ucfo0O4o/sHu0YsLxUWZSRz+D90qUzXX6Ppzv/hAj7GE83pzqbPJszJHy47ME1NBqzEG dVY2iCnuvEdl9ZUQPe3/C3uHzxBd1R9QRK/2waZ9Ato1RFJIBEFxJVlsf8u8wQZC9jwZ PQ8ubfJMR67n3LEg26LfKqWUE4e+65LkxtcEHsKL36PlUzX6E2vCd9iyXVM6Jm8QRW6M 6EDpwSHtWnEW4s5D6PgfOrqr0vmGOaAGidSXR0sDpftDLkVS5gtZTz2ggj2WBLUATW/V xRPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728910838; x=1729515638; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HcEOyQjDS7a6A9bsQE6vr5VWzjSUJouS2AgRnzgA9wE=; b=Q2UP6vmev97SbAnmAiUtbmXjhvmQJkYBfZkZHwZjXxfEq5VhNjdxHPsraNyQpnyDB2 M3Q7oyXWbQNQhEEvM05wJYPOnyiNj+rTkCgPCHeU6K/QOhfzFJYvMRG+9cj0mZ4xI9uj R9QhJHIB91WXppCPVTqoRnq9ZQXaCB9YRzh3ciSO8X6Xet3zVxVgBm4q6mm+6RgkR8Bp yprmTKzFcUIIIDKsDjAvHE/ra1SwEY2HW4Xf3cjd2jq6xbfRDX1nTON4YJC8zVvr5WzD ny9JX2DV5dX5im04UcQixRf7SAUO3OvWMIib8TRP1/a8HviO5Zue+UFrxll+mdwmO+9P E89A== X-Forwarded-Encrypted: i=1; AJvYcCVZUK/cXVwEgUOPExp4M0mmBquyEQRp3l3GmTXVS7XlXV5YorY1CIZTXkFtbTgbiUXHw3gu1l1sTYrUeqGJyCIx@lists.infradead.org X-Gm-Message-State: AOJu0YyNWQxZ/sD2Ydld299OTguFxEQ0d0stBO96u2O6vO3ed1D5L9iS zgL1dzrR+tZNts7DG641f8N/2JJI48Z2UofKkj98P2lRdQfzbRpdaFE1ytPnMZxceg5xXJZfHrD z X-Google-Smtp-Source: AGHT+IGls0KX1bRa/5udb60IOUG7S3+RObbDPF9EP/nc4moCuctIsvmDxZp8/MHeexJO2YJQ3fajDQ== X-Received: by 2002:a05:6214:300a:b0:6cb:55e4:54d5 with SMTP id 6a1803df08f44-6cbe5239cc6mr302364356d6.10.1728910819640; Mon, 14 Oct 2024 06:00:19 -0700 (PDT) Received: from localhost ([2603:7000:c01:2716:da5e:d3ff:fee7:26e7]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe85a5d49sm44835096d6.29.2024.10.14.06.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 06:00:18 -0700 (PDT) Date: Mon, 14 Oct 2024 09:00:17 -0400 From: Johannes Weiner To: Ryan Roberts Cc: Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Greg Marsden , Ivan Ivanov , Kalesh Singh , Marc Zyngier , Mark Rutland , Matthias Brugger , Michal Hocko , Miroslav Benes , Roman Gushchin , 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: <20241014130017.GA1021@cmpxchg.org> 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_060041_067276_B75B7FDC X-CRM114-Status: GOOD ( 16.17 ) 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: Johannes Weiner