Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1802589rbb; Tue, 27 Feb 2024 01:19:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVshrIYng29lm06RaEND4IfoxceaYvlTgLfgcQWeKYYrRYM9KWtH/8yhJluu2kGsA5NHbBaxd2vcVNQ3yFLg5O5KGHMzr3+MQQdFXpinQ== X-Google-Smtp-Source: AGHT+IFqlBcSpTM1OmM46riMuXlPFgzHa3jFObeciYPEocauCuIkuSHmVQyuYijMII0Kj97FZHWf X-Received: by 2002:aa7:cb45:0:b0:565:14dc:a503 with SMTP id w5-20020aa7cb45000000b0056514dca503mr5973130edt.32.1709025593227; Tue, 27 Feb 2024 01:19:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709025593; cv=pass; d=google.com; s=arc-20160816; b=PVruuZ5IRNilDQ+1HtegGDg5nBoMxcnF1TPlQ3zhoeVtnIYuM5ATdx75XXCiNiUAxB zRTTO/uGp3fqeG+2AVFiqd2a5K5ch0OcWXSau/cdaNskqRHO08QzumougGtXeRdpz1cJ TzP23i4au1igNX91R19IMGQ2zryrbkua7d02UYHw8uYgheQ4GFynwTRJO/eHGKPzW2rp ndpR2haJ9d8grRw3SJyOeq9GSQGp9Gx6YoMlKQmJswKJzkbGEDmlCBvEaUk847XZpHAR a8qnYJEvPAPmf/xjJmW3UGFD0M6SlHGpYF3K3EtvkFMbLUO+9miBicy9R6Gmm/1ujxLy De8Q== 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=Uk9KsMCMEtaZ5ILyjfOJpS5t1tY3A/HFP+9HeW0rXTE=; fh=m1gY3NYT09xGXxb9axs3ilfBlRB1zMWoUgFt0vkOnoI=; b=HSnIzeTulXFxGdEf8cg48NDORS6s8QlUuR9oSommlv9dv4Im9e4xqMhz8ZHnEoHPpt 1Ybk3Sqk9D+K+gD5yo4cT+cU+Unh+RHIhApTnWW+KTgGuFVkMDS5jDRU4OvizsXb+Cso 1A96bc6kVlWKmG3yTB9QoGbv+Z9zUdOmIcVzi271I720avzU6byFmEow1yg8X3BK/Q3r wI+X3Ga4CJs4hCNayX7KJbtbRImVQqcbe9yrguT4coWgvahN/ON9VlluBU2yHdu+yoo7 l619EQRCwwRnq1QBSnMaOUr015K3D00YBWGZCKqzvNCybfYYFWfQESalpWhTwYfI0V3z 65jA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FZ9fUI1F; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-82944-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82944-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r23-20020aa7cb97000000b005653ef43be5si531918edt.464.2024.02.27.01.19.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 01:19:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82944-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FZ9fUI1F; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-82944-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82944-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 BA7421F22F7F for ; Tue, 27 Feb 2024 09:19:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B695213664E; Tue, 27 Feb 2024 09:19:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FZ9fUI1F" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D0E4A15D0; Tue, 27 Feb 2024 09:19:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709025585; cv=none; b=K1/LZxav9TyWweSU0X3VON56Y5R7cLXxbl3kHLRVQ2KL58ap9qENaPpe6usODzIb80g/LG5g9pY51x9no94TXFbIHGQg5B2Fl3LtrjEk0lV41sSAfCnkPkN5fja4mdL5D6Mg90JMahBIxYcezGyr1yngjHifysJKz6IZey/vuTk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709025585; c=relaxed/simple; bh=mWuQqMS4uz9qq4fM6oWFzkCwnWqLgdXy4FqN58EEn4c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N29ntVRvZCgXblh6WKAAZznnbhsSA+cpTJXAysAkxdCe1+eZ2naCFd80cMu1NqEmQ6PbAkJ5WXdkX8Q04IasOOASVD+v/tcA1Yy8r4kLVouednvGM8GSE7JTCNlLlaNCacph5fBHOlPd9nx1z87GfVpvVLO0YMYVrIV8762ASmI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FZ9fUI1F; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B2D7C433F1; Tue, 27 Feb 2024 09:19:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709025584; bh=mWuQqMS4uz9qq4fM6oWFzkCwnWqLgdXy4FqN58EEn4c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FZ9fUI1FOL0OHcqIyA1oNWr2JN4APMm470UwK4REcPHycyrp7PaHwnZsss+fZcKTm lrQGaD6NgMzQ9yDMzvqFPwsarXiQshHptPGTnPOvse+em35/zAQrgi1D2t96j00G/S NYQUFFjozZswRZAfsvZC8/hZibXJH7PqT0ewI2H0= Date: Tue, 27 Feb 2024 10:19:41 +0100 From: Greg KH To: SeongJae Park Cc: stable@vger.kernel.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH 6.1.y] mm/damon/reclaim: fix quota stauts loss due to online tunings Message-ID: <2024022731-varying-underpaid-c855@gregkh> References: <2024022643-scorn-filtrate-8677@gregkh> <20240227051335.168121-1-sj@kernel.org> 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: <20240227051335.168121-1-sj@kernel.org> On Mon, Feb 26, 2024 at 09:13:35PM -0800, SeongJae Park wrote: > Patch series "mm/damon: fix quota status loss due to online tunings". > > DAMON_RECLAIM and DAMON_LRU_SORT is not preserving internal quota status > when applying new user parameters, and hence could cause temporal quota > accuracy degradation. Fix it by preserving the status. > > This patch (of 2): > > For online parameters change, DAMON_RECLAIM creates new scheme based on > latest values of the parameters and replaces the old scheme with the new > one. When creating it, the internal status of the quota of the old > scheme is not preserved. As a result, charging of the quota starts from > zero after the online tuning. The data that collected to estimate the > throughput of the scheme's action is also reset, and therefore the > estimation should start from the scratch again. Because the throughput > estimation is being used to convert the time quota to the effective size > quota, this could result in temporal time quota inaccuracy. It would be > recovered over time, though. In short, the quota accuracy could be > temporarily degraded after online parameters update. > > Fix the problem by checking the case and copying the internal fields for > the status. > > Link: https://lkml.kernel.org/r/20240216194025.9207-1-sj@kernel.org > Link: https://lkml.kernel.org/r/20240216194025.9207-2-sj@kernel.org > Fixes: e035c280f6df ("mm/damon/reclaim: support online inputs update") > Signed-off-by: SeongJae Park > Cc: [5.19+] > Signed-off-by: Andrew Morton > (cherry picked from commit 1b0ca4e4ff10a2c8402e2cf70132c683e1c772e4) > --- > mm/damon/reclaim.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > Now queued up, thanks. greg k-h