Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8795293rwi; Tue, 25 Oct 2022 10:54:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4aIfJLmbghKmq9oxczUWZ6iqchGkmBZpMKDUYgUylCEKBpu46DZD0VIM6Cc5zuzTkt44uJ X-Received: by 2002:a63:83c6:0:b0:46e:f5ee:e27c with SMTP id h189-20020a6383c6000000b0046ef5eee27cmr12067579pge.603.1666720464239; Tue, 25 Oct 2022 10:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666720464; cv=none; d=google.com; s=arc-20160816; b=EeSId52BOlwLEfw1kKPz0MQZY+wl+DieW2TnribhF4q2zu8Q7BFL3PyRDXKBMZ/2/w xYiY5zIUfX0RddEe+NgUwBdptSOOVS2B4EqCYL1HP4hO3n0SALYpLdbTcoJhuJ1i+l1C IXD/Y8v1EeygfR7rsK7ruYRSaCGo8633yloVdIjH0jLn1+SmgW/++uhkLg2tsGk3S63z b1QXhbKLGAvkzzhOPdy3b7Z1eJDaRGUD2ZQuOQV7g/X2wjXa74EtidbSLOO5/Th19exy UWhjMrlmA4B8W8jSXJnpQa9/glHT7jtFrf/AiVAZ6AdlruKgRYzI7X6DyRAUwAQyBDy5 R6/Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4q5kp4rzWcEoTMfVr5HwbJsqJM5ur/giaRa2ZJtzTic=; b=MBBNRbzGAUyVVjNkclM4Md2EtX5G5JlZl6bbS0gCCGaqsNaCXBMegpRlQRDJo7moog max2YiLfuKYOTgQUgJjEZ+vIkTSfn0zl0LikIcaDj0S47cRcWQ1ejhhYGdgaarNuqZI5 fcK4KuDGBhFfZ7JkeVnd99q6fPNziYjxK3mLtk1hki842FexfsL7lc7RxGa8gTc9ixAp wR6dAgGTYUjST7G4K3Unntj0er21aUL0DlrKmrr+FWyjytPbz0KMbC8LFsuaqaJT3I87 IvqpDSQqm1onOaW/8Pvn0TApi/0g2PliQoEu0x2gknpFC9m8xR4yTY5FwHDuJTL8Vkf3 BWGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lazaNRn8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a170902ec8c00b001868d5fc27csi4407035plg.254.2022.10.25.10.54.11; Tue, 25 Oct 2022 10:54:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lazaNRn8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbiJYRhA (ORCPT + 99 others); Tue, 25 Oct 2022 13:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbiJYRg6 (ORCPT ); Tue, 25 Oct 2022 13:36:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C048ADF47; Tue, 25 Oct 2022 10:36:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 77811B81E06; Tue, 25 Oct 2022 17:36:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86ECCC433C1; Tue, 25 Oct 2022 17:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666719415; bh=HOB4aTLZQqyg6IBEsmWZTH1iutjsiAnfu+qigl+jZVQ=; h=From:To:Cc:Subject:Date:From; b=lazaNRn8EkkviKiw34mfcZGNhFWKifzw2xYqZxaJYj1c0h6Eljo+ghLlQlkk2LYm6 zpnt0+ppKGm3PMZG7/J76c2/qRfdJjk26XRkm4Hvxonpk5q/3h+NY+VA0mNXjAaShJ +l+pIXxnUwFeTN5VSS2syen9t2NkfhJ9WcHWWlP3CSnrRY+xG0mOHLIrxV4E2bRDsM SJoL7w/7aPxw1nIH6C/JVs+QtMiJiA+peoUiwjsjcRPk+hP7qtAzh0WZO81O4fXoAl SJUr6tcSb7cGeKfyCpB25v+Dj6s6X9CsFj1yrVy234GoBdlGRqIN86pHiedxJIbYpY gG4F7sxBS4eJg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Shuah Khan , damon@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/4] mm/damon/reclaim,lru_sort: enable/disable synchronously Date: Tue, 25 Oct 2022 17:36:46 +0000 Message-Id: <20221025173650.90624-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Writing a value to DAMON_RECLAIM and DAMON_LRU_SORT's 'enabled' parameters turns on or off DAMON in an ansychronous way. This means the parameter cannot be used to read the current status of them. 'kdamond_pid' parameter should be used instead for the purpose. The documentation is easy to be read as it works in a synchronous way, so it is a little bit confusing. It also makes the user space tooling dirty. There's no real reason to have the asynchronous behavior, though. Simply make the parameter works synchronously, rather than updating the document. The first and second patches changes the behavior of the 'enabled' parameter for DAMON_RECLAIM and adds a selftest for the changed behavior, respectively. Following two patches make the same changes for DAMON_LRU_SORT. SeongJae Park (4): mm/damon/reclaim: enable and disable synchronously selftests/damon: add tests for DAMON_RECLAIM's enabled parameter mm/damon/lru_sort: enable and disable synchronously selftests/damon: add tests for DAMON_LRU_SORT's enabled parameter mm/damon/lru_sort.c | 51 ++++++++++------------ mm/damon/reclaim.c | 53 ++++++++++------------- tools/testing/selftests/damon/Makefile | 1 + tools/testing/selftests/damon/lru_sort.sh | 41 ++++++++++++++++++ tools/testing/selftests/damon/reclaim.sh | 42 ++++++++++++++++++ 5 files changed, 129 insertions(+), 59 deletions(-) create mode 100755 tools/testing/selftests/damon/lru_sort.sh create mode 100755 tools/testing/selftests/damon/reclaim.sh -- 2.25.1