Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp881761lqh; Fri, 31 May 2024 23:39:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhH7aBVmgLvgKaCvh8i1J3S8lH1BtJdHhlB2Kru9fndpIBsXhUNhhrNZTM0eMvNf90xSOJYUI+7SjhKnIAGG3BEco+OAEj2gD3ivAyhA== X-Google-Smtp-Source: AGHT+IHp1IO/CKACmfcQmjF3Gb7MMYHIYntMom3Kf42jqBUJr2Xt3kYaKRmIgKULpPUnt+K1m1wV X-Received: by 2002:a05:6a21:78a1:b0:1b0:18d1:c46c with SMTP id adf61e73a8af0-1b26f1855femr4573592637.27.1717223993621; Fri, 31 May 2024 23:39:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717223993; cv=pass; d=google.com; s=arc-20160816; b=vPOY3VRBqUR30+pBcxvLnHMsTngcFUXAIEXGs2sX6CxY+G/Ff2h+z2/iRJ8fKbwYMJ seW1ammsgywoDv2lYgO691y1F5V2V3wNHXhz2wycA4lUU/1PxzOTioZDj2L3UJxJ9ho4 pdsxQW/DM4aesnmNwqB5JeKCC1gf2+9hkO/l8x1HvMkpwjButv6+nMHH2lq3QQNkyDEu KfqnXLfvQG6RWN0lDDZJ2P5PYNvlfsfAbBUi7bIAfbdhHIwAlQF0uJw5Z68KLQHQ/zRL lBE70BQGlU5FG6q9ISg+yguBM1s+lmv7vkGASNvPuILiYMles/vpy65HlPsWjnTnx9yM Kv6Q== 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=Hm9DbePAxZcy5wqy3IhckEJObhpoh9YOVaNcMwxBlYo=; fh=V6GbPCat9tMLabJCBxD7jX0Vrhw7hVwYdPayKl4sW6w=; b=0b6+HXRYdAHxcR1DXxpoyOjvdZ0B1+sbsiCwvSbbrrvisA4LUCwbfm253ZlWIF28Ov 9q1y9Zc6g8PTQgIfUgmViym7N+iTVGhmRjGxm9qXlhGzqzEG16OYJJsjU0N1lWxaiKZ0 kfTLaxFN6c3UqE62H43mKOpodedbtciAJDh06h9fC9W34w5od0aghgf5UfKIxLa3SBm6 XfjSRSWk9G6MhuxHP938f57nE8TLRjLxYeb29l21tz2iiMYh+YazmKfHRdQ2qBrBTw6d P3MiyQ9HdSUnjDdUSFb31QHKiFMATdBMGfvdPOU7hBd1Hqf6d1rm0RbDgnMlJT7z42Ao ZJvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=sjTM+oLf; 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-197728-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197728-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. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35a0e6a54si2760456a12.365.2024.05.31.23.39.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 23:39:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197728-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=sjTM+oLf; 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-197728-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197728-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 32334289D45 for ; Sat, 1 Jun 2024 06:39:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91747134A8; Sat, 1 Jun 2024 06:39:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="sjTM+oLf" Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (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 9E1573D8E for ; Sat, 1 Jun 2024 06:39:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717223986; cv=none; b=lnq4zKCpf788NaAPz/+s/T4A31rPZGYh3I80fAraU6NcsYePBD2uM9BmgrvDIauHUpQuWAAcOM7OIT0Xc5c9SiglvgZeOWRe9aVzxzLyFAJmgLNXg7+qqGAJIks6EZ+UR72DG2xrAC9HFgnA3eYwcVpTH5ewdks7R8J0joWYVVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717223986; c=relaxed/simple; bh=542MK8VuOdG91ZNpdSaYyMqOFHbvTF/wtaA7IMeJHAk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SogXOmIF8cckp+iG8g0TIllDO0WPxvMRR27RZlPejvSPiVG3Y34/NmaJLMt1/5uk3uPkUviJLeuprkiX0FWUdE78bIyqrCKeOXoFiSP3Vm8noXbFCI4/SglKhVW/tMyBwnDFSvRqh3klZYXhwIvXx6TCSkhlDT1Lcedo7mUxi/Q= 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=sjTM+oLf; arc=none smtp.client-ip=95.215.58.179 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: roman.gushchin@linux.dev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717223982; 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=Hm9DbePAxZcy5wqy3IhckEJObhpoh9YOVaNcMwxBlYo=; b=sjTM+oLfqfdeuMnKKb9nsH/8FjelAbWqfbe1Rg2hCmQrZRBPlgBw3PLVcVLqO/Nm6KSAEj WtA57GjtQ4kjBevZ8vxdmblTnAh1bVaNi2ElG5qQKj0b8Zzc2cPHQxlSWYrw+efxmewX5y 9B5UlySR+W/hcn63V+tOA4d5BFMvEu0= 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: Fri, 31 May 2024 23:39:39 -0700 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Roman Gushchin Cc: Andrew Morton , Muchun Song , Johannes Weiner , Michal Hocko , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 07/14] mm: memcg: rename memcg_check_events() Message-ID: References: <20240528202101.3099300-1-roman.gushchin@linux.dev> <20240528202101.3099300-8-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: <20240528202101.3099300-8-roman.gushchin@linux.dev> X-Migadu-Flow: FLOW_OUT On Tue, May 28, 2024 at 01:20:59PM GMT, Roman Gushchin wrote: > Rename memcg_check_events() into memcg1_check_events() for > consistency with other cgroup v1-specific functions. > > Signed-off-by: Roman Gushchin > --- > mm/memcontrol-v1.c | 6 +++--- > mm/memcontrol-v1.h | 2 +- > mm/memcontrol.c | 8 ++++---- > 3 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c > index c47ffb6105931..8b8c2c9516349 100644 > --- a/mm/memcontrol-v1.c > +++ b/mm/memcontrol-v1.c > @@ -835,9 +835,9 @@ static int mem_cgroup_move_account(struct folio *folio, > > local_irq_disable(); > mem_cgroup_charge_statistics(to, nr_pages); > - memcg_check_events(to, nid); > + memcg1_check_events(to, nid); > mem_cgroup_charge_statistics(from, -nr_pages); > - memcg_check_events(from, nid); > + memcg1_check_events(from, nid); > local_irq_enable(); > out: > return ret; > @@ -1424,7 +1424,7 @@ static void mem_cgroup_threshold(struct mem_cgroup *memcg) > * Check events in order. > * > */ > -void memcg_check_events(struct mem_cgroup *memcg, int nid) > +void memcg1_check_events(struct mem_cgroup *memcg, int nid) > { > if (IS_ENABLED(CONFIG_PREEMPT_RT)) > return; > diff --git a/mm/memcontrol-v1.h b/mm/memcontrol-v1.h > index 524a2c76ffc97..ef1b7037cbdcc 100644 > --- a/mm/memcontrol-v1.h > +++ b/mm/memcontrol-v1.h > @@ -12,7 +12,7 @@ static inline void memcg1_soft_limit_reset(struct mem_cgroup *memcg) > } > > void mem_cgroup_charge_statistics(struct mem_cgroup *memcg, int nr_pages); > -void memcg_check_events(struct mem_cgroup *memcg, int nid); > +void memcg1_check_events(struct mem_cgroup *memcg, int nid); > void memcg_oom_recover(struct mem_cgroup *memcg); > int try_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp_mask, > unsigned int nr_pages); > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 6bc9009bee517..c14b1b01bcf53 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -2632,7 +2632,7 @@ void mem_cgroup_commit_charge(struct folio *folio, struct mem_cgroup *memcg) > Once we have memcg->vmstats_v1_percpu field, we can move mem_cgroup_charge_statistics() to v1 file and the following code blocks can be abstracted out as well. > local_irq_disable(); > mem_cgroup_charge_statistics(memcg, folio_nr_pages(folio)); > - memcg_check_events(memcg, folio_nid(folio)); > + memcg1_check_events(memcg, folio_nid(folio)); > local_irq_enable(); > } > > @@ -5699,7 +5699,7 @@ static void uncharge_batch(const struct uncharge_gather *ug) > local_irq_save(flags); > __count_memcg_events(ug->memcg, PGPGOUT, ug->pgpgout); > __this_cpu_add(ug->memcg->vmstats_percpu->nr_page_events, ug->nr_memory); > - memcg_check_events(ug->memcg, ug->nid); > + memcg1_check_events(ug->memcg, ug->nid); > local_irq_restore(flags); > > /* drop reference from uncharge_folio */ > @@ -5839,7 +5839,7 @@ void mem_cgroup_replace_folio(struct folio *old, struct folio *new) > > local_irq_save(flags); > mem_cgroup_charge_statistics(memcg, nr_pages); > - memcg_check_events(memcg, folio_nid(new)); > + memcg1_check_events(memcg, folio_nid(new)); > local_irq_restore(flags); > } > > @@ -6106,7 +6106,7 @@ void mem_cgroup_swapout(struct folio *folio, swp_entry_t entry) > memcg_stats_lock(); > mem_cgroup_charge_statistics(memcg, -nr_entries); > memcg_stats_unlock(); > - memcg_check_events(memcg, folio_nid(folio)); > + memcg1_check_events(memcg, folio_nid(folio)); > > css_put(&memcg->css); > } > -- > 2.45.1 >