From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (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 1515E2C2ABF for ; Tue, 11 Nov 2025 18:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762887498; cv=none; b=PaJ3gD7ZNkHtHk0yukwq9VXooeUZhYe2p5UA2vpJd5Bzh/UjdY8oZg/9bQ2Pi6+b3mbubZwETt3/1HyRFqGxvz9Pp6oLPg79kfWOSUZOUaR0t0pHgD6475i8tnAObsYeyqSo39HajBxOuV2k5cAXIRL1iGIMxywmtD6exSgpgD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762887498; c=relaxed/simple; bh=Kx+FXBuhKKRAGKrr5/plFPqCKumMeNYYYtkhE4HBypE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=sP7JIsj0MRBXyHHx2FzTCCjft6UMs1lZglNhjERYAHbyPW1XKjWJMOSd01xb6FjEY3JYkI4FseZJ7LQn/pAXOcSsf/K3shjuVKdKhmVxxu5HtvLa+MrQR86Ennc8SujwaOfsPBFVXTPNA/PzKpywS3pQ2t8BSNXJij7V+y3CQpU= 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=rHob7y7U; arc=none smtp.client-ip=91.218.175.188 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="rHob7y7U" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1762887495; 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=Kx+FXBuhKKRAGKrr5/plFPqCKumMeNYYYtkhE4HBypE=; b=rHob7y7UWymH1inhA1ByOYabtPCUkfecfAjIaljlgEHiACDBJFHtSRnSanQ5oSsgZ5Z1fH z8kMqD4pdBecZSRUvP+pOZ00ZD+9iEjeQ8tA9GB2z/gu5UR5HxNvSKYl0XRxAuNjm27kt4 d/V9G4AruJodXnPdobBbAcDYHa4jikc= From: Roman Gushchin To: Shakeel Butt Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Muchun Song , Harry Yoo , Qi Zheng , Vlastimil Babka , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Meta kernel team Subject: Re: [PATCH 1/4] memcg: use mod_node_page_state to update stats In-Reply-To: <20251110232008.1352063-2-shakeel.butt@linux.dev> (Shakeel Butt's message of "Mon, 10 Nov 2025 15:20:05 -0800") References: <20251110232008.1352063-1-shakeel.butt@linux.dev> <20251110232008.1352063-2-shakeel.butt@linux.dev> Date: Tue, 11 Nov 2025 10:58:08 -0800 Message-ID: <87zf8ss8fz.fsf@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 X-Migadu-Flow: FLOW_OUT Shakeel Butt writes: > The memcg stats are safe against irq (and nmi) context and thus does not > require disabling irqs. However some code paths for memcg stats also > update the node level stats and use irq unsafe interface and thus > require the users to disable irqs. However node level stats, on > architectures with HAVE_CMPXCHG_LOCAL (all major ones), has interface > which does not require irq disabling. Let's move memcg stats code to > start using that interface for node level stats. > > Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin