From patchwork Tue May 31 02:04:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengming Zhou X-Patchwork-Id: 12865037 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 97285C433EF for ; Tue, 31 May 2022 02:04:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 77D356B0072; Mon, 30 May 2022 22:04:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 726C36B0075; Mon, 30 May 2022 22:04:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48CDE6B0072; Mon, 30 May 2022 22:04:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 290CF6B0072 for ; Mon, 30 May 2022 22:04:36 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 0661C12027D for ; Tue, 31 May 2022 02:04:35 +0000 (UTC) X-FDA: 79524394152.26.ED5B453 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by imf12.hostedemail.com (Postfix) with ESMTP id 6752E40056 for ; Tue, 31 May 2022 02:03:53 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id o17so1256561pla.6 for ; Mon, 30 May 2022 19:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QVmLfgn1Nm0LiEUGoHnz2dUGee44h4bxPJzSoBNxosU=; b=uos1a+yHGla5I6drZ9n+twHQmjFUu6SMLxAAfWu7H8cv8HExB6g2cQTVyGmgnKTCEk pAagV+KHi6edesy4J8md/RWFKce8nc3wPtbxqYYIUbtCbRgoZeaa8MNgCld6R0U6AZlN L9kE5+HYnVFFRTQq5aHOyNhBBoYZSr/vQRqjQtPm8as8FHeUGqIlV/9q8ia9WA0Oq642 fcF33pHIdydP4sOxGuZgWseVrT2eChQ3dqWiimur9ncs+ilqT6zIbVitx9Qx0ABtxKgF IXMU9mK/D7n7vN9LhdYfrtm/hgwlxojRfP/6Aln0D+GVLpODRbQH7wNc49Tt0bkiPut8 g4Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QVmLfgn1Nm0LiEUGoHnz2dUGee44h4bxPJzSoBNxosU=; b=SNjcIbbC3lSElIDgaOjKK9mI8wL2YrQTr3FJzHTqE7YqdNxt2OTyWAW3INGIhOMoca uIZQKb6AH3WhqC+jv+5Pzm4Qd7sWtgBDXzJxaQ43U/bPbuX5eMOMJyd1BLi00w81XqK4 bJn7Kx5Y2afuY/Cha5aIg9XXMfQsVuwlCAFDfZ6WwPJ29nCFrhZdAF42QgdBALDzz9A0 vqqCi5vfAEakaZjxlQ+UbyAgpPc6Hq2eQDtvLXhECLGor+avL4cP39Y6a00aUmdFQkKp +9AmwTbhNUWVfZR24Ve8QqxMTFACufxMzB6dpsiZbCE8/Q0GJA/M5f7C3uxTbcjatkhK o82A== X-Gm-Message-State: AOAM5336rogQzqo1zOUfZZqVPj6MggPv1c+85EmXUVJwN5VzterZW0j0 FKfpE33cbT3XHo+Nr48TydJ4pw== X-Google-Smtp-Source: ABdhPJwqyfqh3TdM8rEWKG+tvJdNyCdIntwg0OJn3Jsu+EfLz1PnNkvtFHLVLTje863Tc3rsUCUElQ== X-Received: by 2002:a17:90a:b703:b0:1dd:1e2f:97d7 with SMTP id l3-20020a17090ab70300b001dd1e2f97d7mr26005094pjr.62.1653962672535; Mon, 30 May 2022 19:04:32 -0700 (PDT) Received: from C02CV1DAMD6P.bytedance.net ([139.177.225.231]) by smtp.gmail.com with ESMTPSA id q60-20020a17090a1b4200b001e2f8163810sm367573pjq.30.2022.05.30.19.04.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 19:04:32 -0700 (PDT) From: Chengming Zhou To: sj@kernel.org Cc: damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chengming Zhou Subject: [PATCH v2] mm/damon: remove obsolete comments of kdamond_stop Date: Tue, 31 May 2022 10:04:21 +0800 Message-Id: <20220531020421.46849-1-zhouchengming@bytedance.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=uos1a+yH; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf12.hostedemail.com: domain of zhouchengming@bytedance.com designates 209.85.214.182 as permitted sender) smtp.mailfrom=zhouchengming@bytedance.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 6752E40056 X-Stat-Signature: a5xx9wu5wypyxs6peiwr8ntb96aty43x X-HE-Tag: 1653962633-465655 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: Since commit 0f91d13366a4 ("mm/damon: simplify stop mechanism") delete kdamond_stop and change to use kthread stop mechanism, these obsolete comments should be removed accordingly. Reviewed-by: SeongJae Park Signed-off-by: Chengming Zhou --- v2: - explicit termination uses damon_stop() instead of __damon_stop() --- include/linux/damon.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 7c62da31ce4b..2765c7d99beb 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -397,7 +397,6 @@ struct damon_callback { * detail. * * @kdamond: Kernel thread who does the monitoring. - * @kdamond_stop: Notifies whether kdamond should stop. * @kdamond_lock: Mutex for the synchronizations with @kdamond. * * For each monitoring context, one kernel thread for the monitoring is @@ -406,14 +405,14 @@ struct damon_callback { * Once started, the monitoring thread runs until explicitly required to be * terminated or every monitoring target is invalid. The validity of the * targets is checked via the &damon_operations.target_valid of @ops. The - * termination can also be explicitly requested by writing non-zero to - * @kdamond_stop. The thread sets @kdamond to NULL when it terminates. - * Therefore, users can know whether the monitoring is ongoing or terminated by - * reading @kdamond. Reads and writes to @kdamond and @kdamond_stop from - * outside of the monitoring thread must be protected by @kdamond_lock. - * - * Note that the monitoring thread protects only @kdamond and @kdamond_stop via - * @kdamond_lock. Accesses to other fields must be protected by themselves. + * termination can also be explicitly requested by calling damon_stop(). + * The thread sets @kdamond to NULL when it terminates. Therefore, users can + * know whether the monitoring is ongoing or terminated by reading @kdamond. + * Reads and writes to @kdamond from outside of the monitoring thread must + * be protected by @kdamond_lock. + * + * Note that the monitoring thread protects only @kdamond via @kdamond_lock. + * Accesses to other fields must be protected by themselves. * * @ops: Set of monitoring operations for given use cases. * @callback: Set of callbacks for monitoring events notifications.