Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp789525lqm; Wed, 1 May 2024 16:23:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVizg08jwvlGOd3/irMjVQUZZT/huN9+EsxF9FOkcZXDZ5ePKQynN/gc9p2kYdFdI6vkjbWh0Cku1301DIQ4xiKTjp6uG+hoyOKiXPU2A== X-Google-Smtp-Source: AGHT+IFDjoY6szR0PvxiOl0pFTpW6YPG6Yv6fD6gT835ob5AeeOtC6lsGcSs1bJZpr88NDzmjKgr X-Received: by 2002:a50:8e1a:0:b0:572:6ee9:5a2d with SMTP id 26-20020a508e1a000000b005726ee95a2dmr2332786edw.12.1714605804913; Wed, 01 May 2024 16:23:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714605804; cv=pass; d=google.com; s=arc-20160816; b=eZcWOh16k+xexYIWkykdxJQtqdqAQuBbj/483aVkdZAFLfNdaO1aNyYz/48AKDuuld uIGH4mw67QIfD1/+9oUL047tx0dwIhisq8VliR/2tZcP67W08un3284ErH/2IrL/k0MJ RgGmUyo5NnzHqTilMYexIEmZUboJ+HaQRJsoJFYIW5j7t3p3lg2SM0Fy9I9bHbwRW4UY VxJ7wm0yby709otkdPauR5g1tjCLNmuXnxEuTNL7Vqc55MkO6wgUNFcfGC3SbcADCog8 zcU2Q0MHu43ASSsFLyX76GrQ4Z/ckluzQPgQv1xoX9QRVP7oQB9314mcJ7ZV2r1p6gaE E4tg== ARC-Message-Signature: i=2; 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=Nzw2cNZaB9iCUYH814uKzdRXqDcmilZfSkUkIOiCcz4=; fh=eRiufWnjPA3EhuPXgfdkrXSOa7zf1EnYInj/GSYzabg=; b=NOxAdfTayxspVN0VUloloxAnRiQ9sJsuwPY+tNVtI1arBiQ0Ag0iivxxf0r77g8aZz yWP63C7xUZG9ZiQu2YyyJkZnu9kPd9Fgv/07LFkALy5aDdgqgIQkm9wOF0rdw0EpoDjq DLycV/GDmmj+gFlBOsssb/6uh2iKjCtOoVCYxotB1zbaXc2kwwsRxl/Qotp7L3vcYcqk CNgY/DM+HQA+M2J3v6m6WfjbRT5xsQ32rMiVTF09/jkax+PKmF5f/Wb/545zqdnt4rEd hfqFGC5L2ij5cd3tdq+RjPWYJm7jzQbl5lIPpGjm44Zo8pBw1FqWxnv3xEEBd8nSmkZG OV1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="J/hoNWCl"; 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-165842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165842-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k9-20020a508ac9000000b00572248efc3dsi9984010edk.94.2024.05.01.16.23.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 16:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="J/hoNWCl"; 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-165842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165842-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 A1E591F21B2B for ; Wed, 1 May 2024 23:23:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B648417C6B; Wed, 1 May 2024 23:23:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="J/hoNWCl" Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (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 83E14168AEE for ; Wed, 1 May 2024 23:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714605798; cv=none; b=SEZpnBEPjUnHgDwPJvoPHow9q2QpMdB7X9Op/naHFV2E2ePoV9AT5wzkZyd2X0HAi93tXo0w/oaFycZ7K8gB8T0lygzTgB/v0D2bFHPQMd8vKhQGHBPD7Wp0UCUOX1jwCBM1H7g2TzUMyv+pAAb6G0kQg0fFltD6abjcxZsWpxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714605798; c=relaxed/simple; bh=/2S35HzstemFIS0ibte+1aIjk3+p1hGYgadH69AbJ24=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iPsSidAW3I/Pb/jCmr8qLmes/m1XvDE+J8IEgs2ysRv9W24T7axVf8vAQX1drWB7n+ydmOKay7GXCLXzPR28bprB58rFY/QdnYy0OjQR4xFhNlJXZszmMlHOBilRL3Lne+DJ+UKPBOOCF2F2o1FFkEOugJws8c5UEbMqd3XRt1Y= 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=J/hoNWCl; arc=none smtp.client-ip=95.215.58.180 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: Wed, 1 May 2024 16:23:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714605794; 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=Nzw2cNZaB9iCUYH814uKzdRXqDcmilZfSkUkIOiCcz4=; b=J/hoNWClgHwe/o6LeoXRbPcIreMprVW9+vLqQVTT0AjUdVWRvfn0FWuAsZq2A/sDj2wEmn kTDTiuDBbzv+4nqDGtFXgbAdTicMyv17dirzPUw1Es47BQef3jlm3lHi0/eA6BVHy5Y9Yx u7WVWfQ89zSqQj+LOxFbSkM6RhLDGNo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Shakeel Butt Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Muchun Song , Yosry Ahmed , "T . J . Mercier" , kernel-team@meta.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 7/8] memcg: warn for unexpected events and stats Message-ID: References: <20240501172617.678560-1-shakeel.butt@linux.dev> <20240501172617.678560-8-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=us-ascii Content-Disposition: inline In-Reply-To: <20240501172617.678560-8-shakeel.butt@linux.dev> X-Migadu-Flow: FLOW_OUT On Wed, May 01, 2024 at 10:26:16AM -0700, Shakeel Butt wrote: > To reduce memory usage by the memcg events and stats, the kernel uses > indirection table and only allocate stats and events which are being > used by the memcg code. To make this more robust, let's add warnings > where unexpected stats and events indexes are used. > > Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin