Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp41lqm; Tue, 30 Apr 2024 10:49:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2tCdKRlrybk3FKwIsfWUExTGsPvIekssRJyED2YTtEwKwsoWdwc89dHVUsVFadznVRe7fftTvPrWnLqeM80jjH1W4Hc9OEWS1DwNwUQ== X-Google-Smtp-Source: AGHT+IGxzwzSQ8IRF+LH5/DZADUEsLOaYI0BJiLII4fOTdaMQz0W/RWQOzMMYOfbPDMB9B8pt2WU X-Received: by 2002:a17:906:384c:b0:a55:6f69:a939 with SMTP id w12-20020a170906384c00b00a556f69a939mr353262ejc.41.1714499379074; Tue, 30 Apr 2024 10:49:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714499378; cv=pass; d=google.com; s=arc-20160816; b=WGiY5Na3XwLIWTfRE2DMB/ubtho8GptQaTfqFD5VD6ndhQic6C1jov/UAg5weq78LH 4cjPrDyg+qg0KGWb4ihnhAObW9GXemf8O0J+iY28c5FewYJsp6iKA9puqXS66UErKkZH zthz2KAFofmOriKyTCVQgfdYUFVCrAqNVeXdg0SBkKk1m0R6KM36EE/LWBo3DutAeMBR 5j9fdUIx4qPhRTzSn3nCU7FcUyMCRkms33xGEBMekaFLB7dwQnczW9wzdRd2s0H5taAc Auop1gmO/OAnLQxVhp16oPRMyO26sZBFQVXlCA43jTbzung371238sgl2fegsYqBtvKe Gocw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:dkim-signature:date; bh=MPJon94WVPTCJVxAuwEzMFjgEeJu/W5zYuiZ8N8gwdE=; fh=k7OS/AJKcwtUnXgEkq0FrLhMtZ79/y+iBZO3DpeowZg=; b=YjY7FnE0Fu8XD0aE2lGWMVkcMMp9Zrwj7qSmcEOTOs//HGjCiRiyh/sxn7/P9nHk9/ ZTnTM/AUA+tqJWwvdj9kJmnRrh07wliINzBANjiaUuKyXk+xQ/qjzaJvA/3pZpwyJBiv 1CmotqE56WXmljlcOo30izRXn+ZnBG1NVggdW1HacsEhpC6hjepyGlN1JScgAUp76wqR QRs9WZ6q7gFwGl9dWmMdJeXAwybc6s6kWi6o3UNhbNEY8PNdmpBl8JeZkShaHqelnOf/ 3EbiKM1IouDIb5KDZU6Jq+4oF2rbkKQASEr/o7l9SaS8Q0Rae0ZASizbUTrCAi8ZaGkx 0zuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DeMrA98n; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-164554-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164554-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g18-20020a170906199200b00a59257ca45csi1071454ejd.490.2024.04.30.10.49.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 10:49:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164554-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DeMrA98n; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-164554-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164554-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CFE0E1F25C6A for ; Tue, 30 Apr 2024 17:49:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 492D3180A74; Tue, 30 Apr 2024 17:49:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DeMrA98n" 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 41D2F175560 for ; Tue, 30 Apr 2024 17:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714499368; cv=none; b=pTA4aQ3/XQnLeyHDHctchRxZQBZ49rEBNhuOipAGTmdpTcO+I01aemk7hndKoU/QNyqkoxAGUM1wkHpo0PZvHkqj3ip5QzW+x3Cwx02tsjWOLKFtCAm4COONrsX5OyI/lKV945q7MnIc82pYJugmDryiYqXikGZ+QA22MSf7W/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714499368; c=relaxed/simple; bh=VFo6owDRX4b3ZWugSBJHygd6JuE30wLsH9HXlOwRwbE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RtDJGwTBGFc0wbopztdd7O3rQH/j4zsw/cSrQuFhaIfEIxSjsB8rtVMVJ0VeKRuk3H9DuUM0ctsCd2RK0ihkDwZdVS3xIRQ8FMQQgp8VnfunyFDkaxvzBqN4kU0vnwppdgJvTT8qULr9Z0uUU9SdiwKPOXviHwxLioBPJlWqtaA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=DeMrA98n; arc=none smtp.client-ip=91.218.175.171 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, 30 Apr 2024 10:49:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714499363; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MPJon94WVPTCJVxAuwEzMFjgEeJu/W5zYuiZ8N8gwdE=; b=DeMrA98nCGYXATxJeF3wx0DmqLgugaO1+GZRkfQf58xLwmlOH5vQIilQzcUHN3h/58EfUd nXesSNChK8Jgr0r+NHyJq+d/ZhBANoWk2e0ks40G+b3nTNMPTv04DyzncucEmQAtNTF0zJ W5az2Zf0YENBLvcJUS8gtUTvQ3782V0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Yosry Ahmed Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , "T . J . Mercier" , kernel-team@meta.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 4/8] memcg: reduce memory for the lruvec and memcg stats Message-ID: References: <20240430060612.2171650-1-shakeel.butt@linux.dev> <20240430060612.2171650-5-shakeel.butt@linux.dev> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT On Tue, Apr 30, 2024 at 10:41:01AM -0700, Yosry Ahmed wrote: > On Tue, Apr 30, 2024 at 10:38 AM Shakeel Butt wrote: > > > > On Tue, Apr 30, 2024 at 01:41:38AM -0700, Yosry Ahmed wrote: > > > On Mon, Apr 29, 2024 at 11:06 PM Shakeel Butt wrote: [...] > > > > > > nit: we could return here if (i < 0) like you did in > > > memcg_page_state() and others below, less indentation. Same for > > > lruvec_page_state_local(). > > > > > > > I have fixed this in the following patch which adds warnings. > > Yeah I saw that after reviewing this one. > > FWIW, *if* you respin this, fixing this here would reduce the diff > noise in the patch that adds the warnings. Yeah, if I need to respin, I will change this.