From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 758633EA946 for ; Mon, 13 Jul 2026 11:39:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783942751; cv=none; b=OWoae9kUnsODgvH6lA0SegFREhPBy7Ji6zHgsGk8hb94sXNfkQyYbx0MYtiDzvBav+J5psLW2AFW4X0ejixer6WIA7xO62I9d1QHCUoFCvCKdznepjR1WjTln+7zD6bmOvc9MIurAHFe4O6lFTjj7bZks31/1WHVeyxkX49vaqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783942751; c=relaxed/simple; bh=A4zo2+xQeX1vbXQna3iVpqkY6KIz76I1W77x/MUxy0U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Cw73/CXyyhYCu72MGd9yLITi9gMPDNlrTQ774SxDCbAIdYygYua+tpn62J7EiQiEnH08SfrFIrDuHxBtqCaio5uhbSIuI/jLtWC02BPgm/8J53sc76ZbUuK10KFYW4MxznNy4THkTW6eSjaNA8wRRFj4YgtS3oi38XMDRiqSwDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=VA8CuCvg; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="VA8CuCvg" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-493e497643fso18203005e9.0 for ; Mon, 13 Jul 2026 04:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1783942747; x=1784547547; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=SyGrauJ6Z/D7QxLsQH4fnjbmvOpSdbv71QSALvp4E6s=; b=VA8CuCvgfGGkCyqKmHeOkFtpBz32Tl6QHxXPxixf9osP8opwAIWCbsAwwYyUxgIiad 94hjON7VcI5h7qGfptpg+PsOVw1jSgDP1bsvQFGdho7u1E6mqFjVud2rSCN39mtGyFcr escfbKYAw5x+LNSXeZqEgzOAYNa7MIk5DED5rfAuHptJjeWGsrTgud1fo1CtNm+DBNHS fQSKKYbcA8zTBR/FPxNVAFzwjzdWmLOYP4uzmduu6MiwEhY3hAkyvM4ditxI8ZDtukML JLGTjmj7EQ2GVRPKux3PbRm2UK29kEOVVeWqtz33oV7tmYq7WmBrNQIQmbFIDr4eXmsV ylBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783942747; x=1784547547; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SyGrauJ6Z/D7QxLsQH4fnjbmvOpSdbv71QSALvp4E6s=; b=WPkWHKyFaO6SRRM03aTxOj3IX6XSBMRof6NJ6cJUEV6XpObqqX+nejFpM35IqNUEa9 /Rf4BmqtnjWoq7Ti5HeiluWqbg6jFRfuG3QC3/L1KxONoZoWsPnZaislLdbHG5+wA5ns RX/R1838BW9mk3o0XFzOiSleHkjm3djqy5+6Qqq34DBePjNlsvnLd54SYLaRfUZAXooU n8qGBiP4yWKzBEw2BeM+3oWI952fUlhvTeO9xTDTVogoqB2WajLbcIkr2B1IYujveQI0 issq0qFbGcEdtG+BXfDL6QxbLIZ8npE6SGNrqXMYu/gYBk6JkD8Ax19t7Wy3Zb9VCR3K +JYg== X-Forwarded-Encrypted: i=1; AHgh+Rpv9PLfWNJ7xyJcNaZqo+PypGNCnAascY/AA4cLC7gimn4L0fUZLR/7KXD53+qqWdd8AXr9S6/SgYtI/qw=@vger.kernel.org X-Gm-Message-State: AOJu0YyTix+Mpn8FvPSS3Wl78xDTnHd2f31X7e3X/zBiW5WnGbzjdQbe ZNSxyzbQvPbyOPQddXAgNpGkWvMQ+ZNOnNnBHLQmpQDcPOixa8iggbAZDmMBipkck6o= X-Gm-Gg: AfdE7cnMBux8mMj/60rzEdofL0cibIKYwFYVuP8VY0YweVntMz7ohrfPD4AxtmNUFdK 93NoIGBwU0aMarA9zrCLuR6jHlRrFRbcdqpk/SiksKrGIxs0p4XTlx+cXzoWyHjL9Bc0icraepw U4WuyieOiOOG+/B2ij0bjC/ftuGnCN7mtw28yRpQP7CQTf/RT/tCiBIx7IRO9yzHsP77AKUBfwH 1CvcnjWE9PY6dWYL0NjhZFiRvhyrLmOj17jrWbT8wTLAF7/rMGHKbZh9FM13o1XeiJFn+XtntRd PRRaGcr/S8KP9+zTCLdiUmyf4Y+dxL1QKqAvEMPWdHSmSK+j7hnWQlWNvlABHV9ylt626Jwphyx rs62t3q3DQ4tqfTqKGold2cRayUh4fDxVAgXZrpgyWTSPXBAXrC4xw3g7x+qN8gpkCn4GuJVvWc WPbLLJ+Vo/TA== X-Received: by 2002:a05:600c:3acf:b0:493:f176:dc69 with SMTP id 5b1f17b1804b1-493f884f5f2mr85117975e9.37.1783942746646; Mon, 13 Jul 2026 04:39:06 -0700 (PDT) Received: from localhost ([2a02:8071:6401:180:d892:bf43:a0b4:83b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493eb6ccdbbsm372032495e9.3.2026.07.13.04.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 04:39:05 -0700 (PDT) Date: Mon, 13 Jul 2026 07:39:01 -0400 From: Johannes Weiner To: Guopeng Zhang Cc: Andrew Morton , Shakeel Butt , Michal Hocko , Roman Gushchin , Muchun Song , Vlastimil Babka , Alexandre Ghiti , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Guopeng Zhang Subject: Re: [PATCH] mm: memcontrol: update state_local when flushing NMI stats Message-ID: <20260713113901.GG276793@cmpxchg.org> References: <20260713085053.2916813-1-guopeng.zhang@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: <20260713085053.2916813-1-guopeng.zhang@linux.dev> On Mon, Jul 13, 2026 at 04:50:53PM +0800, Guopeng Zhang wrote: > From: Guopeng Zhang > > flush_nmi_stats() updates state[] for kmem and slab counters but leaves > the corresponding state_local[] counters unchanged. Local kmem and > slab statistics therefore miss updates collected through the NMI-safe > atomic path. > > Update state_local[] together with state[]. > > Fixes: 940b01fc8dc1 ("memcg: nmi safe memcg stats for specific archs") > Signed-off-by: Guopeng Zhang This issue affects memcg1 but also the workingset shrinker. Acked-by: Johannes Weiner And we should probably CC: stable # 6.15. Shakeel?