Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1355663lqj; Mon, 3 Jun 2024 20:58:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXf9Ploey8BCFyWp9Hh6lHbUPm9j3Z8BaR75tignYwGaCD/NvbptwBMvhC15yjkc5qVSlTG000mZtB9clzekrgRPr3ztQmXH1foDv34BQ== X-Google-Smtp-Source: AGHT+IGI8baouzJ8g5DyOWxHLTK0bkmctbgv5FvgRyomfHNYqTZ2pawmcgZIHa+81JYGfjAaA1QV X-Received: by 2002:a0d:ec10:0:b0:61b:e645:3e94 with SMTP id 00721157ae682-62c79688396mr112667597b3.5.1717473482550; Mon, 03 Jun 2024 20:58:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717473482; cv=pass; d=google.com; s=arc-20160816; b=te4/Xly/45Lo0WvS3A3RLfOLjaWSae2g5/f8E635H+MFCumnpgWniUCpA1zZDFVay6 6wHAAbdHiqgqMon1c/5f3GJt3HwZFKLr0IRNqj8XpUiTPg4ysPRtElROjLCUsrVHJCTc qy0RoIz+ZSo0HA1ELy4hQekQId4pfxGBpY92ISJk/MiErC7uEyymKiPNfBekz74zPpXn YIs3bn2Fnr8LvvB1QXeiLwcEQa6tgqnFkCwxAYx4Spclrnt2D6dBkrZSvsDs0BolDZ1Q TLsTYeNWmv0krS+ZpW/cpyo92AdEtPpTqzN8ipgFvDAh9XE5sz1kec9E2jCTwsb1KOIf kFPA== 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:date:dkim-signature; bh=R6d6WXIvaz3gcm62V+C/H0QUwbpybzVpITkvGw7t1Mc=; fh=f7WiuGRZIX+sL/QZy7eaDlpPNwFDoYegkK23ZZzAwyk=; b=FHhM41hUTQJ0tB+YA4zQPzOrWXiMuCOCW3Fx4aRgvQdCISDx2ZBcQ8MRBbKNgqAcKG npVO5BTtVRq+9/zGMESQZ5DhWMUBhtKMGkT+GxrDBz7YCkwn8q51e0fihP9UlsUqWB0+ U8whtC+FX57BeS08vGSG/mG8swP7aHAsHSUeQMo7OV2By2b1NIvke9IKqa0C9iKXmuD1 TTTmpB8pPr9Ga9mMbq7HzGGsU1EbG0vEHEzxr+u+7oBdZ9OEgK0mG0hfP/ubWM54ybhw rVqI2qtQEikHQXDhmvCG0AUeFVUVbh7pvhsoOoZ8n4YQjgQG1JURaNNfZp9Jpgdms7OH FyNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ZOwBFQfx; 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-199992-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199992-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b4022bdsi103087296d6.227.2024.06.03.20.58.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 20:58:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199992-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ZOwBFQfx; 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-199992-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199992-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 480481C23591 for ; Tue, 4 Jun 2024 03:58:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5759013D882; Tue, 4 Jun 2024 03:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ZOwBFQfx" Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 39A8312E1CA for ; Tue, 4 Jun 2024 03:57:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717473475; cv=none; b=u1E3zp5UPn3o0jm3UOtBlaXrWn9gIifHgW17R6rfKCex+KY5jjYAvNcTdoHQ2bwrDplY6FfCxxnxiBWp9yVoQdFH1D54M+o2v6/zIz/69fo/xH6HEGCDq/s8E4it2oGfQkiCFbJnzk+FWAFHOH/QZxZQzXsv2z5m9iXSYLY9jQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717473475; c=relaxed/simple; bh=iwRxwTH8zwIRcx9nQ4Oaaif7P+pfLS8ReV7DgkHzc/o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DBGZ79OqDC7ASGXoDXLgquJcxHJQi9HH6dGUWNCQLSjxySUSI+A7D8jPIogbHhQfarYNBnW1+34wXOJLeiKlUloYRALyxpzJ6z1U3K2E5ECzujOFIC0XYnRqeglWMzEfB6M6UhdWBav7YmP5yuA8YN4ZrT3+k7BAg+e/7cl8PQY= 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=ZOwBFQfx; arc=none smtp.client-ip=91.218.175.186 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 X-Envelope-To: shakeel.butt@linux.dev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717473470; 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=R6d6WXIvaz3gcm62V+C/H0QUwbpybzVpITkvGw7t1Mc=; b=ZOwBFQfxKJJ7/6drU8LYL33lE56csQSX+LeZrPWum+B+3BZCqRfrJxBtTTa2Eg74BPFblX K7DwFyU8aS+U+o2ViQw4UMSB7KT/OT1bg8QrTgYPWIduFsqnzHhpKm0BNbo6OBwlo2cxlE dFclKDMO0dN9g62xWaGmOTgyjrmsHfg= X-Envelope-To: akpm@linux-foundation.org X-Envelope-To: muchun.song@linux.dev X-Envelope-To: hannes@cmpxchg.org X-Envelope-To: mhocko@kernel.org X-Envelope-To: willy@infradead.org X-Envelope-To: linux-mm@kvack.org X-Envelope-To: linux-kernel@vger.kernel.org Date: Mon, 3 Jun 2024 20:57:43 -0700 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 , Muchun Song , Johannes Weiner , Michal Hocko , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 06/14] mm: memcg: move legacy memcg event code into memcontrol-v1.c Message-ID: References: <20240528202101.3099300-1-roman.gushchin@linux.dev> <20240528202101.3099300-7-roman.gushchin@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: X-Migadu-Flow: FLOW_OUT On Fri, May 31, 2024 at 11:33:46PM -0700, Shakeel Butt wrote: > On Tue, May 28, 2024 at 01:20:58PM GMT, Roman Gushchin wrote: > > Cgroup v1's memory controller contains a pretty complicated > > event notifications mechanism which is not used on cgroup v2. > > Let's move the corresponding code into memcontrol-v1.c. > > > > Please, note, that mem_cgroup_event_ratelimit() remains in > > memcontrol.c, otherwise it would require exporting too many > > details on memcg stats outside of memcontrol.c. > > In the followup work, we should decouple v1 only fields from v2 fields > and then we should be able to move mem_cgroup_event_ratelimit() to the > memcontrol-v1.c file. Right, agree, this is my plan. In the RFC version I had a lot of #ifdef's in mm/memcontrol.c and now I plan to do it in a nicer way, moving cgroup v1 - specific stuff into separate functions. Thanks!