Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6880980rdb; Tue, 2 Jan 2024 17:53:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGf09K9O5Y9GIRVy+Axp1UyXbbsdsWBtFIOYS2OuDlSWMthpUM7uQ00LNeKfiQkQJmnlu7Z X-Received: by 2002:a17:903:11c3:b0:1d4:9c03:44cf with SMTP id q3-20020a17090311c300b001d49c0344cfmr2796820plh.112.1704246832605; Tue, 02 Jan 2024 17:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704246832; cv=none; d=google.com; s=arc-20160816; b=mO1x9JORVU4lM4KZUDk4Phm/P1m2+OcuegWscyyALyEc+NOVzxb/Kj8tzkbSOzFfIe eMjbcNiYE8pFaoWmtWtMIxrDos+sWsLQKQMdyRbRUhBuAUL7ifeasBm+IQ6KdCH6zdjH K3g6dpRCvMTzCpzkOEYuOLu6LI2f4oqyx4PPuf1n4DxntlmVPYptnJAOV0MMT3beSXJ7 cacmnTD9rhScnrEFKRV5dVRLW6IST/Q43fLcP4gRGHm7xXeIACbidrSkOZaVC3C69eiG EJwYybkmcQ9ROzVshJBM7naKddJ2O4v64dY6dN5HI8Z+HNfiO0l0+/5W59o/CkKNARst tflA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=wiVWBuGZIydpDJC/yno1hNw/poDUjUAbK2fa/TQ5+Y4=; fh=iijKHZvcFhpw7FXTCwKTmise8G0TPvtXRwukg3uBsxw=; b=hIhOepTcTQDj+qTUo1k1cISwymSmAm/IyGt5tRbaFm7r9e1G7rH5C0QpoJLDOKLApS A3VOTJz3lcGwZStGVmKwU7xox1kNNBEv4Hvql6Yr9oKOY2ARWTDraLR68LuYBJnQtcA8 iW4ufbiTN5w/uSHydOww6n8gIRpG7uvLNjVAImLRK8HKo0rUXl0XOG6vSNxVX1kPwME7 Gm9d7cQdCOPTnlvykUa01p+3I3N0+eE3i2x8KKshnmTFZ6JQTuieoYTXnIOfZIlqduVS ahssBabj35/BMi+dMYhxEms1SSrGnISp/CU+QzYVjZAkQHW1R9BSzvHJjaWTGGj/kMjC ulcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DX4kW3vT; spf=pass (google.com: domain of linux-kernel+bounces-15053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id iw19-20020a170903045300b001d06da42b0csi20577507plb.503.2024.01.02.17.53.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 17:53:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DX4kW3vT; spf=pass (google.com: domain of linux-kernel+bounces-15053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2A7032843BF for ; Wed, 3 Jan 2024 01:53:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECBB71798F; Wed, 3 Jan 2024 01:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DX4kW3vT" X-Original-To: linux-kernel@vger.kernel.org Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4675B17981 for ; Wed, 3 Jan 2024 01:53:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Tue, 2 Jan 2024 17:53:36 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1704246822; 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=wiVWBuGZIydpDJC/yno1hNw/poDUjUAbK2fa/TQ5+Y4=; b=DX4kW3vT1n+jkYbgYChJ+oqAtMuww/aSZPs+bccffY5xO8nFb5qkzqQW2oMZeWl9XSolAD 8jW+SRw8TzJmqwOdcFaibdkamk5V6UUco2ssEl+zdnrb0sc8ccIlTz6wH30Abw2CM6MXV+ GLYD7shtTkKdDQUOlbmcEvX99Xqey0M= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Haifeng Xu Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, mhocko@kernel.org, shakeelb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mm: list_lru: disable memcg_aware when cgroup.memory is set to "nokmem" Message-ID: References: <20231228062715.338672-1-haifeng.xu@shopee.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231228062715.338672-1-haifeng.xu@shopee.com> X-Migadu-Flow: FLOW_OUT On Thu, Dec 28, 2023 at 06:27:14AM +0000, Haifeng Xu wrote: > Actually, when using a boot time kernel option "cgroup.memory=nokmem", > all lru items are inserted to list_lru_node. But for those users who > invoke list_lru_init_memcg() to initialize list_lru, list_lru_memcg_aware() > returns true. And this brings unneeded operations related to memcg. > > To make things more convenient, let's disable memcg_aware when > cgroup.memory is set to "nokmem". I guess it's not only more convenient, but also should save a bit of memory. But _probably_ not enough to justify messing up with stable backports. Do you have any data on memory savings? > > Signed-off-by: Haifeng Xu Acked-by: Roman Gushchin Thanks!