Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp41055rdb; Mon, 22 Jan 2024 11:13:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvUI490E1bgwf74vac48nuAFwy0JKLIJAC7Clwt4u6zQa0XicGWQz44H2F/iJjHddFzG26 X-Received: by 2002:aa7:d4c5:0:b0:559:d04b:b7c9 with SMTP id t5-20020aa7d4c5000000b00559d04bb7c9mr233149edr.35.1705950798778; Mon, 22 Jan 2024 11:13:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705950798; cv=pass; d=google.com; s=arc-20160816; b=o9O7UcVgMlw4CgpMtGDnwLC1aolaC/+iaBhA65LZww2ef22DAL8XHfg0yD4Wfaega7 SpOxnLBldzRTVInvHtrMW78qgVlt+GnZo9XVJYcQBvxSTsWoLEVBtALlkBLrzbxDTNH6 i+aCQSB60zUby62EhGAqeRQoT7Jb+n0Fb7VNTBiXBC6RjNK2/cxeoxYEIbUCsqBkojW2 gnVP2HxfJWlsHFOMi0J/RcLjDCivn6SnjDmftYDxX/7DWEVKVo56BquM95AFSTbUUHt2 Iur95cnPY3jeMQWyi4cMqvQicqUo49D3zFfIaP8w0xPuSpCrQkl6rtWpvJ13b/0VWEvL 1xoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=p0Y9E+3pzP2s+EQdBjSE77FjET8jy9DFccLp3B3IzFI=; fh=OxYirASok6IFUjgLLn+OKACpN+k88us3rEZ2YfbytcA=; b=PHXaoMXYB45FIYrla/dmV4bDS+Ojf0nmPTXwNCQD10oXcNmdZTRCOkjPGRsjV910D/ HDpjUGpYornsi4o6hvfe06UK/36FRSXaSPKO8bKxFxcCOQ1tWkpMqIZ1pHm1sM2sZjN9 H+rqK/sl47kn1ylqXvcje2SEzW1j14C9ZVX1ZRqRodVsq5TrmCEPgHwY4I/fu5E4rtOd GJSOnEmWWTB95W+tfSwy93cd7q8j2UHmQ+2rS72MmAoOmR1T22x9MoHYvy96icLrCiVv u0BEjYUILg7bYn4Lj13cSJBypQqmiDNVTUYG6pBl3NTmSG3jS1GiYcrXIB2/HemhF21R zNUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=CDSOMCTL; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-33966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x16-20020a056402415000b005597ae20511si7457466eda.376.2024.01.22.11.13.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 11:13:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=CDSOMCTL; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-33966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 75CF21F2EDE7 for ; Mon, 22 Jan 2024 18:53:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC91A482DB; Mon, 22 Jan 2024 18:19:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CDSOMCTL" Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 E4C023DBAB for ; Mon, 22 Jan 2024 18:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705947564; cv=none; b=rcNWU2zuPdgGoMZM4ldXmphSFJBk/hCU9EYIb16UVhsoK0gJCYlXMCSnKPaenGs/LaLXvXgRtqnKVEfR/7awAiFDYTJYN19I6d8PNpKDkwdn1CLrk75+TypWwKjlkVy8nPNSBj0CMie/zXlgFHh6WWMK6Z7fwAhG91ZQnO3r4YI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705947564; c=relaxed/simple; bh=h4PO0st/1IuYHBIEltga1Ivy97tEPnri+qjxZXMW6hM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Hqqpu6khzEMRYklGJGGslM8E8r2bIzcnOuX1SrFJWDdOB9V85YTAOJ7I+Vg4fgrl/vU3ZsmjtsySe18qVgYupwDfPx6tPw0Bi/HoJB6CJMY19/2H9mFWcrr5CmXtfKOyphxa8rMTblZVT9+aTxoWiGuorUjxZtCgZZ3g+zDJPVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=CDSOMCTL; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d72043fa06so5475ad.1 for ; Mon, 22 Jan 2024 10:19:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705947562; x=1706552362; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p0Y9E+3pzP2s+EQdBjSE77FjET8jy9DFccLp3B3IzFI=; b=CDSOMCTLhpdPfghCsAKPFwC+4ARoHxLhob5RAo9m2XPGn96aumgVKHx1DKfEPioDTp B9WUp68IdZmQvFHk7vvIGpE+zVdoaCdjlsCMAdFBfoxpGjorsTOHvjQqiFzntala1Xza +G4Sgrxjt5AgAwewPkAjIErxJl09TCdGafkLG8qVJI4J2mgFhtQbeW+t3jyGbPoEvpWG ZBqErZgwLzeOJ4+gK6kZwpxh2AhcWftYeuMVaAWEOJUI2ZKA7EcIq3Onof2nZ5EI/ucT RobNz5DxN+cZavhGqrwnrME+Koj2pD6EJRcIftUUed9yjx+DIlXzNe1ZQQISkVfodvf3 cB7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705947562; x=1706552362; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p0Y9E+3pzP2s+EQdBjSE77FjET8jy9DFccLp3B3IzFI=; b=QyV9SpPZ8/CHdKYxX7xpB9QRZg3fStNSMqTH5vCz2LoeC135ZGH8xunrpHx/9WVRjA fD2gK8uz3MiLAysu/nWjwaAivhmDM9kbBX6u0cByL8E2US2S3I2PrgC4dBvtjwyts9nL yUcjrsJo0PYdOqFfR9AVvp0gozdphztJNuDp0Ntbk9A2wbDtrxWw9wVQLK/ulBgiqpwO LzFBy7EDHdwLxf7C0deG0ncwiAGSH5+V3DPJnQE8ynZsGFUbnyJ8yb4ctIHtcLe5xRVA Qpi7XDf9DvBe7iI3l+ggNQYqsGtNooITxZSSz+DCnOIN0rmpm9x+EkvdR1zz7o/MDv2D r0Iw== X-Gm-Message-State: AOJu0YzteWAeNo9TL51/EAWoLreLICQiGBh4kEbQOHXx+cIbiZsPUAS2 tssqNfHXj5pNz+fpq/htqxuDdm9Lhay/C8MNwtEV62kxWX5u X-Received: by 2002:a17:902:fb46:b0:1d6:fb94:10d5 with SMTP id lf6-20020a170902fb4600b001d6fb9410d5mr10331plb.27.1705947562078; Mon, 22 Jan 2024 10:19:22 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240118184235.618164-1-shakeelb@google.com> In-Reply-To: From: Shakeel Butt Date: Mon, 22 Jan 2024 10:19:10 -0800 Message-ID: Subject: Re: [PATCH] mm: writeback: ratelimit stat flush from mem_cgroup_wb_stats To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Andrew Morton , Jens Axboe , Johannes Weiner , Tejun Heo , Jan Kara , Roman Gushchin , Michal Hocko , Muchun Song , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 22, 2024 at 7:20=E2=80=AFAM Michal Koutn=C3=BD wrote: > > Hello. > > On Thu, Jan 18, 2024 at 06:42:35PM +0000, Shakeel Butt wrote: > > One of our workloads (Postgres 14) has regressed when migrated from 5.1= 0 > > to 6.1 upstream kernel. The regression can be reproduced by sysbench's > > oltp_write_only benchmark. > > It seems like the always on rstat flush in > > mem_cgroup_wb_stats() is causing the regression. > > Is the affected benchmark running in a non-root cgroup? > > I'm asking whether this would warrant a > Fixes: fd25a9e0e23b ("memcg: unify memcg stat flushing") > that introduced the global flush (in v6.1) but it was removed later in > 7d7ef0a4686a ("mm: memcg: restore subtree stats flushing") > (so v6.8 could be possibly unaffected). > Yes, the benchmark and the workload were running in non-root cgroups. Regarding the Fixes, please note that the regression was still there with 7d7ef0a4686a ("mm: memcg: restore subtree stats flushing"), so I would say that our first conversion to rstat infra would most probably have the issue as well which was 2d146aa3aa84 ("mm: memcontrol: switch to rstat"). So, the following fixes tag makes sense to me: Fixes: 2d146aa3aa84 ("mm: memcontrol: switch to rstat")