Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp643062rdb; Thu, 30 Nov 2023 14:23:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgm9RxF43XKlYrashOomZcszM+u69f2I0LmD6G7DvKY8F57ZhWXh+eC7MYw3FSGfBC4RFB X-Received: by 2002:a17:902:dac4:b0:1cf:f353:6e47 with SMTP id q4-20020a170902dac400b001cff3536e47mr13244971plx.20.1701383000641; Thu, 30 Nov 2023 14:23:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701383000; cv=none; d=google.com; s=arc-20160816; b=sirr8moox3pl3k3bxqkjb6As4FUmAy2TgEH8C9prhE625+8++rMy6L8yOFwqy9cseP ZQ9AjK1vKssDcf/sDCrGB4hyGrqxPbs6lkFk/uvmG6eApq3l0fEnzaUwso235JUVJXWC sBcPm6n1/UfInuxofFsiPN0MimqrYiw3lEqXQnyP3cuRAY8w1jn0uNQlFMdzsL+R5NN9 Wpp9Q1jePatY+5m1hAgbvpxXzGcmBRR5vnouAHtwXk2mPP/JW9HVU+oeaC514/o+FgbG Dr4ChjzhegsEUhuSPsfgpBBOC6PbMtIFrwHftTUfA/4u8fVinsvf+dsX4g61mstpkcSW Lxrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=5uSZjXJmMfJ4v+k5cCkfO5itIGYSIdfBsYH+7IYgjbg=; fh=JtJDSQNKTE7Sp4s0S0oIwVSnz1W4IogO2dS5Cek4VLc=; b=svaa8qgGL1cQt9HSYipklAz4oO+fJ5X1zGCk1r9x/b8TA9hDgEilgvklYDhURHPyyV gokRe45hbBRcuJnYby6fNGHJAU7ExXEj3hOR0vETsQ6IdE2UnVUOuIfNdyYVKoVo29iu LGFr53cuGqzt08s/dxnssQmcL8sf48236bpRQ86MEBx60J15T7JDldNyd1Hr+Kz/330F 08m/v5DCY4ctG/bJPaHQEboetS5PSGehbHFn6QDS7H9YJR9sQI3Z6K6sDu89g8w0AEAP cEmC9B2x8JD/tqVLJG+I7DItsp6JZ30A9vo5xhYesyPU1tRucSk/OMC24hQVNJ24IA01 hEHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=hMuAYQac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id m1-20020a170902768100b001c7347e993esi1951166pll.17.2023.11.30.14.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:23:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=hMuAYQac; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E604680926A3; Thu, 30 Nov 2023 14:23:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377134AbjK3WWy (ORCPT + 99 others); Thu, 30 Nov 2023 17:22:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235171AbjK3WWw (ORCPT ); Thu, 30 Nov 2023 17:22:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E89910DC for ; Thu, 30 Nov 2023 14:22:59 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1B0EC433C9; Thu, 30 Nov 2023 22:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1701382979; bh=I70BdKU/73bt3bINwbAQDlbPPsOr3EaYr337MLhm72A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hMuAYQacI3uy8MkIewi8Y0e99BqFxrdh+u3R7OkSUWJESruRNEZqWOS/YIYOr+3oO N7WBa7oVTjiSY7xIos4KFgVnq9iIxpGl6vaCtEWq68ZV45Ot+Zw49VvJKxZCPVVu6S 1NpX40MRKfdKgScLv4ZYbYBe5D2rNfhvzA+Py8cs= Date: Thu, 30 Nov 2023 14:22:58 -0800 From: Andrew Morton To: SeongJae Park Cc: Jonathan Corbet , Shuah Khan , Brendan Higgins , David Gow , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/9] mm/damon: let users feed and tame/auto-tune DAMOS Message-Id: <20231130142258.c06fcb7c0c9abd339bab5c32@linux-foundation.org> In-Reply-To: <20231130023652.50284-1-sj@kernel.org> References: <20231130023652.50284-1-sj@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 30 Nov 2023 14:23:09 -0800 (PST) On Thu, 30 Nov 2023 02:36:43 +0000 SeongJae Park wrote: > The core logic uses the below simple feedback loop algorithm to > calculate the next aggressiveness level of the scheme from the current > aggressiveness level and the current feedback (target_score and > current_score). It calculates the compensation for next aggressiveness > as a proportion of current aggressiveness and distance to the target > score. As a result, it arrives at the near-goal state in a short time > using big steps when it's far from the goal, but avoids making > unnecessarily radical changes that could turn out to be a bad decision > using small steps when its near to the goal. fwiw, the above is a "proportional controller". MGLRU has, in vmscan.c, a PID controller (proportional, integral, derivative). PID controllers have better accuracy (the integral feedback) and better stability (the derivative feedback). Generalizing MGLRU's PID controller might be somewhat challenging!