Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp561824rdb; Thu, 18 Jan 2024 11:26:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHY5x2huyBULTkzEUkwnREimFv0072OpN1aBC0yr90x1AcRdFgluZRV+QpUHw3EWT0RZx+5 X-Received: by 2002:a17:906:f817:b0:a2a:dfac:8518 with SMTP id kh23-20020a170906f81700b00a2adfac8518mr401273ejb.243.1705605974501; Thu, 18 Jan 2024 11:26:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705605974; cv=pass; d=google.com; s=arc-20160816; b=AVJffBWmoF9z/Cof0i3x4VuVwpBj51qBLkE2chH93616LoJqVS2dSqk8+QGIXWTIUA ICSbSw43fHKroZbX0+zBwcmNCxGHH5cALb6EZ3rHRMYZHpaR5pDrLFxte3yQlWWBbfA6 9YKoeU46867dYTp2GqP8/Ww6mVaMXnFJjvpbjdjq4MGJiBhQXkgB2aZf9tYgcxFfA0+i 7coNB7lF1EaYFgj/OM4DRgRh1g+FEHttkwWJdy8FrC7+Gc8Uh6wOzkzfp03wHbdEFFrN PKUtBKmLiRJomQIBGAEFEKE/PTs/zlV62hxAKEn4Sts27Ra2c8RMtmjORgEr/qUNxHAK BDuw== 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=9MU572EdVLdUkapQWYdIbhqtVcpdD79Cvhg2J7pciqk=; fh=cXOpFmH8OVxlqQXond1Xg6M2OhG4TYN6lUeQwaze1II=; b=wfGnG31uQrQgn+x8KZMlUhKd6BKG+7y0IoodrkTePCE7246J5TOU4iM3d/zuiOMg2e bQSMiBQ09nByltblajPquBh5GorV1LQxwF7BclRtm01Z8mP9zze56H1P/SxXmWNwLHF3 sDzXSI+OfIFahQtndJEZBoVbSr7aASiaU+LV+YK6r2FVSlApifqiqaaoF24NmzzJjah8 iEDzgVbt1fkLd7tp0UmJ2VOrcc6eKIiBudyBpwxM2877hzzDH3mNncG9RJDeLuY6s/GN 2EW+HyBoIAdX1LKFQb0fNgcl15P/Oq2nzZVdkXRZBaML67KO/OQGXTpdnRU1u2VU3/pr rrLw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=fG0aH+Do; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-30500-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z24-20020a170906271800b00a2ccdffd938si5774002ejc.867.2024.01.18.11.26.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 11:26:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30500-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=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=fG0aH+Do; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-30500-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30500-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org 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 8EDD91F28E0C for ; Thu, 18 Jan 2024 19:19:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99F682E40F; Thu, 18 Jan 2024 19:19:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="fG0aH+Do" Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (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 6C3BB2E3FB for ; Thu, 18 Jan 2024 19:19:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705605569; cv=none; b=oqO35Vr70prnqP5dHqBU1LeCqFlQwCAiuMvp8fKK9QM+Zd+xnUSRe0Qn032CXJVXtT08W8j+Vqt2/u/8yOJkwQwrwmeaDMnky5SYIwGOAGr4Wo0E9k7OwiMtyv6ZGMfPY9po9z4TH9cBd2b9o0OceB1duVKBAbY163ZNI6NUT1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705605569; c=relaxed/simple; bh=LdQBpPSFJZHAxiRnzyNT29aUGLfrazztcyszNCh7pSo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ckuAFIR4O5eDQ/6/aGgbeyKtvjZjmgPE92IVtBKr+8lc04soSAbPdeQUJAl6B6CqPvUBJ8xjsksam7kmNTu6ObTubXaczVRPSy+W3E38c/z9IhGtLUqxismqlT0Use0hiueovwpgMjs3gkZ8tokNz03Dt1NDOVA2x7xDShb+w0U= 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.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=fG0aH+Do; arc=none smtp.client-ip=209.85.217.44 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 Received: by mail-vs1-f44.google.com with SMTP id ada2fe7eead31-467021612acso3096354137.1 for ; Thu, 18 Jan 2024 11:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1705605566; x=1706210366; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9MU572EdVLdUkapQWYdIbhqtVcpdD79Cvhg2J7pciqk=; b=fG0aH+DoYij4ZEzRUztp/ojc8RpIIsAf7UwTvSnfWKcz0La4x+Ct3BW641mq4lVArJ BsNlKYaPYPTMvlQG36Tje9XJ8Gq2u0RgtbVloUNgICreHryw18K0YHR7wFnmz9txKzZy Dz+YDuThPHnuYA8rFddVdr65vxdD+BClcHyU30Xq8n/2KIrQg2nwarLwoVASABN+GIB8 iqQJwn6vUg5IkGq73oeDyQsC4R8Lo0b9+TSAYxiJlb5ZtRH7ZAhAMZEhXQF628D6H79U b/UCF9+JxbnHY7qUpbNM9PGUDdxRyGzcO8IqB1h5r96qb4JU1Y4vPlks7XWWSusSKdC0 laPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705605566; x=1706210366; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9MU572EdVLdUkapQWYdIbhqtVcpdD79Cvhg2J7pciqk=; b=CSxQdtnHK1KjTBhtLWxzqD/tgb7+ECvm8yFzsq9RCACg2QCg0DjNbcuzezqX9HtFWX mTI/0CIpVvuSEwEMDyzvzb1RIi0JplMjtepnQW9N56tIqBtsrAin9+bBMnYpU5nwTZI0 OMDzaB9t/Nq30YuwcR2GvXBpQGIL1AzT6VPVqQ12qHpOu/y93iJ5eX+UUCHWR5Mckwe3 JCYvU1JcqqauDBXoORtlDVLsVJ3a1e2UW7Mn6Hpkk+CDL6mmpbb7eJdhsbe+MI2txZxj m3OZi9WJNTuT0DZaxRYmNAGzF7KO5fCuECOpp/rlxeIBbL+Kuk6BcNL1nnuGpskRUCuE IpUw== X-Gm-Message-State: AOJu0YzO/oYvcYwxcAA+WGha9v189KiZNZ4tz7XuaVxLmxg0ELe8WBnv Q+liuEou5qkAFW4Opg6qM3m7bOEAnrqSIkyJotwbCRgiz2xb8FOjRjAcUaBlMZI= X-Received: by 2002:a67:fe45:0:b0:468:1083:39ea with SMTP id m5-20020a67fe45000000b00468108339eamr1375691vsr.20.1705605566127; Thu, 18 Jan 2024 11:19:26 -0800 (PST) Received: from localhost ([2620:10d:c091:400::5:8773]) by smtp.gmail.com with ESMTPSA id om9-20020a0562143d8900b00681a83650b9sm64917qvb.41.2024.01.18.11.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 11:19:25 -0800 (PST) Date: Thu, 18 Jan 2024 14:19:24 -0500 From: Johannes Weiner To: Shakeel Butt Cc: Andrew Morton , Jens Axboe , Tejun Heo , Jan Kara , Roman Gushchin , Michal Hocko , Muchun Song , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: writeback: ratelimit stat flush from mem_cgroup_wb_stats Message-ID: <20240118191924.GN939255@cmpxchg.org> References: <20240118184235.618164-1-shakeelb@google.com> 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: <20240118184235.618164-1-shakeelb@google.com> 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.10 > 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. So, rate limit that > specific rstat flush. One potential consequence would be the dirty > throttling might be decided on stale memcg stats. However from our > benchmarks and production traffic we have not observed any change in the > dirty throttling behavior of the application. > > Signed-off-by: Shakeel Butt Acked-by: Johannes Weiner