From patchwork Tue Jun 18 18:18:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13702823 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 183D7C27C4F for ; Tue, 18 Jun 2024 18:18:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 232458D004B; Tue, 18 Jun 2024 14:18:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F6C18D004A; Tue, 18 Jun 2024 14:18:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6ABF8D004B; Tue, 18 Jun 2024 14:18:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8F01C8D004A for ; Tue, 18 Jun 2024 14:18:29 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 320FC1C18BD for ; Tue, 18 Jun 2024 18:18:29 +0000 (UTC) X-FDA: 82244819538.02.95F6613 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf27.hostedemail.com (Postfix) with ESMTP id 1D32440019 for ; Tue, 18 Jun 2024 18:18:26 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Bv3wHdx6; spf=pass (imf27.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718734704; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=XMEwUC7FSP1SVRLTt1QIAO9000rnCRGabII8POKTyA4=; b=OB3AiiUwICqB2d5yX9B1FVMO+HtdYIv1soZU+O4HH5RV/ViiOY8Snd2c20LYxpvc7iZvYf gFbyFZVWE1tshwBWks53opUHwN4Gd7N9EeLXpBvz9nAA7QQohJgbeO+IqJ/6NrxzmXeCNp hbaEh4A+7x9bf/sHLaxzovsLOlagUKw= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Bv3wHdx6; spf=pass (imf27.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718734704; a=rsa-sha256; cv=none; b=5PYxEgt7vuLuVSd9tdq3qdRDC0/zTRKMaec7CUQeiL4agiC5K6ZwcMNPShJJczRB5PJYLy rjUqYKRTppwgnJ9mJadDxmfVj1FONzwjcX+rRPFJJ17uZORTzKXRtXf1tkkdeE3x3jH0+3 mpfUa3ZU700W/zXLUTVEyJo0HDra5Oo= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D50E7CE1C0E; Tue, 18 Jun 2024 18:18:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78C6BC3277B; Tue, 18 Jun 2024 18:18:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718734702; bh=50hBEP6CpX4UJy/Ydz/ykmHUVQkUp5qb7XdctlMxkUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bv3wHdx62BoXicPFD3PtWCmzu1QMbhv2f1y/yA6WIoKpljpHHt1SpeWSMp51QlqTh YRo9i5ZHlHsb8/rM5jZWPOZOJAdHlCUnI1ovNiJZyXBbcQCjvaa2bb40wetatKs/TA aw0ojXny1SKlwjKjhYhpd+0a5Hy6JFL5XOvQSKDN8mQ8Z5AiScjUsee6GCQXhbbpwD 8wT93MtFD7eBrhaeQvmcT7N1wSk+tll4x3u2s2Ku/osq8eZJffSqBJIkRbD9KyVIN2 yyYiJz4eJf2pWOUnSxMJ4EN7n2p7g9D2jtcyniabVB9N7eF3++GExlXmeU3iXTtaCZ 5BQVwFeCDY2Eg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/12] mm/damon/reclaim: remove unnecessary code for online tuning Date: Tue, 18 Jun 2024 11:18:07 -0700 Message-Id: <20240618181809.82078-11-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240618181809.82078-1-sj@kernel.org> References: <20240618181809.82078-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 1D32440019 X-Stat-Signature: 3x3dyjkmrb91ptbd4sr5hbheer1ymhhh X-HE-Tag: 1718734706-358205 X-HE-Meta: U2FsdGVkX1/7hD4hGRTnbh2ckxI+b5gQSVwn0EPSqdDLmO4MaMIyQFVyqair0iMaipJYzOjU90XYIG24xrpX7yI8bbJTflheACTD/A1Gad72YhsBIeH7Rt5PD6TUmDnNmNlaN0sgfoVzQKKO3yJS34IPbgWFZ/BItLwI/QTyTmcH2fKOPJQB1EXcoFASeYYT3caQjoNLUEuUB5BVZNADzOUWaKjbkS2/zhComcC6TknscUbac+BOq3g/sLJ3gehRhDTWT2p8FDoj3f8q58E1PffysQDEykabek6MhfIb3JTZr4CLnPVJLr2eHb48TVnqugTMu96fkg64WSrHA2vQAdzDqxuGnAgKd2VOTgEc8qYmNBscYEzfSkKT8BphdFNHelTCBeSQNZOtZnfyLjfCPv8LFSkHt5QBTl6idLIh1B01b6sG4+W7fqTy0MnySRwK5JHo5uR63jGy/nEneuyYsV4WZYx36m3jrz14rz4pVnN3KO18IOuI2QuuHtVyU1w57lhAjqF7IS1PyRQ6RqKVOlrLxBGE4IQ+BrPbaqwb00kXf2i5N+mo3HvYvOKhuV12/o1DiTCDaIGPb/3nytOChfOUxcqLldLe5W/CeVuCdYD8VqYk9/KJGMVnopXX82QhezaM3zeD9PlBiCROEDcTI+j6lGm4P6DKPDD/azb16lKCFjZXUKKO1D8gF8j0AW2x57E1mgsKXNkHgY6sKkdi35DV5wmtA8U5o5V1AY/kfrxt6PPZTxIdfMuMMFL67hXo2aln1RpWiXGvHh4LG8jSr1o8VP6zHgiIWsUz6QNv+oF/MV4gvC8F+o7SxcglcDrLuj5N3tAziJRZfaW0jeBdEMLf3hdhKrmGvsE7ZaFTtqCSFxPevIhnj09YVW8xwCnV5twOtRfHAL5fySOvLaQL5BT4v5usZ+JpCo4Kzs0oBc8flVnLvcM3PjmAFFThX1oEjR9nbyV2j8sLuwHdL49 GiNKXSbM gCh7vBJwDwS7sCGQ6uxm6Boh855Mu66MzPimaF3/7wiXntxGEbv0IBlzV2B4oSIiaSdOGI61SNvNyKWmNvhNAWScmrrbAgv5v4opWbgNzqkqb3kaNyP/FPAVEacOSa0fjhw3mF0cT0hTtXIh7krlh6i1fvevG6qD112Etu2ed8S6J+DSb6gQcMloW8vAjcDH9ccWDgiVKFtOxtZBZjWaFtvQ2IgICJwyknNpqdiNIlcjPJn4= 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: DAMON_RECLAIM contains code for handling of online DAMON parameters update edge cases. It is no more necessary since damon_commit_ctx() takes care of the cases. Remove the unnecessary code. Signed-off-by: SeongJae Park --- mm/damon/reclaim.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index be7f04b00d0c..9e0077a9404e 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -181,23 +181,11 @@ static struct damos *damon_reclaim_new_scheme(void) NUMA_NO_NODE); } -static void damon_reclaim_copy_quota_status(struct damos_quota *dst, - struct damos_quota *src) -{ - dst->total_charged_sz = src->total_charged_sz; - dst->total_charged_ns = src->total_charged_ns; - dst->charged_sz = src->charged_sz; - dst->charged_from = src->charged_from; - dst->charge_target_from = src->charge_target_from; - dst->charge_addr_from = src->charge_addr_from; - dst->esz_bp = src->esz_bp; -} - static int damon_reclaim_apply_parameters(void) { struct damon_ctx *param_ctx; struct damon_target *param_target; - struct damos *scheme, *old_scheme; + struct damos *scheme; struct damos_quota_goal *goal; struct damos_filter *filter; int err; @@ -214,11 +202,6 @@ static int damon_reclaim_apply_parameters(void) scheme = damon_reclaim_new_scheme(); if (!scheme) goto out; - if (!list_empty(&ctx->schemes)) { - damon_for_each_scheme(old_scheme, ctx) - damon_reclaim_copy_quota_status(&scheme->quota, - &old_scheme->quota); - } damon_set_schemes(ctx, &scheme, 1); if (quota_mem_pressure_us) {