From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81316C54798 for ; Tue, 27 Feb 2024 09:19:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 194316B0072; Tue, 27 Feb 2024 04:19:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 11DA96B0074; Tue, 27 Feb 2024 04:19:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F00EE6B0075; Tue, 27 Feb 2024 04:19:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DCF1E6B0072 for ; Tue, 27 Feb 2024 04:19:50 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B914D40B62 for ; Tue, 27 Feb 2024 09:19:50 +0000 (UTC) X-FDA: 81837036540.01.DF3D1EA Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf05.hostedemail.com (Postfix) with ESMTP id C01C6100011 for ; Tue, 27 Feb 2024 09:19:48 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=FZ9fUI1F; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf05.hostedemail.com: domain of gregkh@linuxfoundation.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709025589; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Uk9KsMCMEtaZ5ILyjfOJpS5t1tY3A/HFP+9HeW0rXTE=; b=Ov1IwlK7yfYg/LJUWlFvriMGNdLKyKdAIH2INZZdjiXz/V7h4hhUETTEl6HCEs164IdlDp XuBv1+WKYH+GTd1lJqryWk5DNf6GuiN816o/bSly/GWkb0VXF9Pg0ta8HMVkstxBhiMnwN x6aEryaY83Uhlj5incJ4ZzD/qQBZ8Eg= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=FZ9fUI1F; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf05.hostedemail.com: domain of gregkh@linuxfoundation.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709025589; a=rsa-sha256; cv=none; b=ZfvqMlyEwYlQ1fzGxrNRRn7OXclhI+ufnfxrZpsdvsNQXWZIQW/nwe8BQpeHBCwTbWF8/+ OKI77ntbydMU4+XSSNc05m0v6liGw/aOQyYR8QP00bSbsTGZFR7x2LZg++NAEY/l928w52 xENB0In4xsFVEv6H5iKb7movPb0iti0= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 6FFCACE18D6; Tue, 27 Feb 2024 09:19:45 +0000 (UTC) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240227051335.168121-1-sj@kernel.org> X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C01C6100011 X-Stat-Signature: khcbgj4q7zfzsepah6apzxn6rj6w36w4 X-HE-Tag: 1709025588-25307 X-HE-Meta: U2FsdGVkX19nSUNsOQeicW62dYGr4ZqwIpi1s3KC5N2Uew+lr9uzU/fKxRABulUFw+8MJSiqLrKxGHaigSQMQU5ZYd1FMKQrgGp38HLxsnWrXMFVcKSRZV8HJvW782okK/8lAxUJUY+zhnkdQCOqbdeZ5DeEQPviXqpAavzXvB/Zrv04EZWIKPOnRILjrP1ZXZoZ6KQCnq1g3OoW+PZkYcFVpaoRRywKJj83RPaCBIRfNvkfWWWSVvGwpmaIVbsGOwdSN6i7kvrqN9gsClZFfz4hsg/nqC91fxLGVL5G+SbZqtoPtQMtlyuOUOdEZLc/TIYPK1v2yad9MQfp6tnnjZKb/meCEfwq7LEy+GbiHtrXzPFW1KDSB4c7jttq9D/55Pq0tAYSTVpc0RkPgGGWNAHMjvgaTAP2Tl5aWjuk0jxWy6jzdy7kCIEzYhILimTQaF4yLKGyDKccrnh9W+9eVsDGf3VrPNeFYNVKnKuPibsd6HSILq2LCpWj99H30dWFDK7/vqVQfehMjesUaaaqSbQZ3vG0atAXB33f/Ob9Gqu/VSyWC1jnOzci4282/7X5sFM+D93pX9mHIIj4Od2LmpqxwhsoMxo22kiBzfyFbERd80ar2ySONwu3apJvAsgUxvIjKw3zFO55eMiGgB19qNMX3EC1KyqlRrSUKxd27wjRiOEhhB5q8MEPgtci1ErjhmFJlhWRpkwsfYJPLMbP2XveGnfGnmywdxPGiqIF96/z9da44y9hkEf0cVZN59XQ7Et/8H7QIvdtARFyo21PHTK1NMRArYDw5MT6plf6h9fB3mRkOkrE7P9wSMo8n1q+xSI0R9QSU+d32CaFr+xh9UayteYNNqaZhIgMkrdLifdabzX7JXeUMa+F2uSZBQQWFQZtJ/pfWZAwo9n+v7Va/3WnD3ToAs8s X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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