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 X-Spam-Level: X-Spam-Status: No, score=-13.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D4D3C49EA5 for ; Thu, 24 Jun 2021 14:34:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 37F65613EC for ; Thu, 24 Jun 2021 14:34:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37F65613EC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0351D6B0036; Thu, 24 Jun 2021 10:34:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EFF986B005D; Thu, 24 Jun 2021 10:34:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D52CE6B006C; Thu, 24 Jun 2021 10:34:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id A0B2C6B0036 for ; Thu, 24 Jun 2021 10:34:52 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B831C824C447 for ; Thu, 24 Jun 2021 14:34:52 +0000 (UTC) X-FDA: 78288864024.21.27087BB Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by imf08.hostedemail.com (Postfix) with ESMTP id 6DFA08019358 for ; Thu, 24 Jun 2021 14:34:52 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id p7so10702931lfg.4 for ; Thu, 24 Jun 2021 07:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GJrgmUk4MBeaLhPgL5J6HKmLfh86Hi7USjfP1jfq3Xg=; b=HkKrqNlJCRqVpsIJ0cu3IhrKJ2TsbGOb9M1uFceUtw6oX+ZSkuYkbbg4tyuKiUqINX FWkLJOsD3N/Wd0VK3P431vkL+OQ3kakrPNc8UCnvSL+cJYkadLEzexqZiJqn37a9Yvs/ e295QEmuKGLZEHicPtisW9GeALJg0px/oJqTtl58TFFhrPxJTbFwhezbnfIig+GO0QbO wyNFQVAEzc3GbzAp3M/Oe+Py087BDI5VZBiZP6NJyItpoqQ0faP1RZWyPW43wEnNCHpa y5crsTxCeneBsRlbpXvfVTvRb02W5dLX242iJx2LReJimvMRz0c4DHNyAOYmMVqA7ls1 xsBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GJrgmUk4MBeaLhPgL5J6HKmLfh86Hi7USjfP1jfq3Xg=; b=l23TsqIsYJlJed6xms4/zAwxgGqVO0yZBRAwS1bfFS24qafFsnSY5aq9hZX46vYMNZ tJWQlIxfbDbffuqrnLiIg2fzbgQZC79XjmQmU7+v1dVjEtwrxOC5R5F4i2Yi7U56++uJ HO72g+eVTnMaQ3+TOBRYyltBFtAVd+cMxXFa4YggySz8JPbFhyJziahJ+v4OiRe4joeg +hkQs2XOUiT7pM5u8R0bnFHn4aXG3g5DXgrOoFlWvPZUwIhp0Cd9DHqzAVs8h4WPxZA9 SVmeNCguHWsjt7h8I7MSrkDeh1Y8PWxRU7DjVb4ENLsx8Rm0APIyDyc/Hfib8xiEqF1k MsVw== X-Gm-Message-State: AOAM530wMrfmfDslaO/uSCrAU+aOGQnYYPswcwz5b461h7pF5L0djIP2 4TUtx5VWd5BPBOlBZ/c+7v/MJHZcNPxRzly1NQO0Bg== X-Google-Smtp-Source: ABdhPJxBYv0UJTTLxHw1kaaaspf3Pmt0iwRN3IFZOKILLHVb0uLwmK4KT9JpC6yVOxPpLZDIvKuugOV8lPtmkTuH9DI= X-Received: by 2002:a05:6512:1104:: with SMTP id l4mr349702lfg.549.1624545290734; Thu, 24 Jun 2021 07:34:50 -0700 (PDT) MIME-Version: 1.0 References: <20210624102623.24563-1-sjpark@amazon.de> In-Reply-To: <20210624102623.24563-1-sjpark@amazon.de> From: Shakeel Butt Date: Thu, 24 Jun 2021 07:34:39 -0700 Message-ID: Subject: Re: [PATCH v31 01/13] mm: Introduce Data Access MONitor (DAMON) To: SeongJae Park Cc: SeongJae Park , Jonathan.Cameron@huawei.com, acme@kernel.org, alexander.shishkin@linux.intel.com, amit@kernel.org, benh@kernel.crashing.org, Brendan Higgins , Jonathan Corbet , David Hildenbrand , dwmw@amazon.com, Marco Elver , "Du, Fan" , foersleo@amazon.de, greg@kroah.com, Greg Thelen , guoju.fgj@alibaba-inc.com, jgowans@amazon.com, Mel Gorman , mheyne@amazon.de, Minchan Kim , Ingo Molnar , namhyung@kernel.org, "Peter Zijlstra (Intel)" , Rik van Riel , David Rientjes , Steven Rostedt , Mike Rapoport , Shuah Khan , sieberf@amazon.com, snu@zelle79.org, Vlastimil Babka , Vladimir Davydov , zgf574564920@gmail.com, linux-damon@amazon.com, Linux MM , linux-doc@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 6DFA08019358 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=HkKrqNlJ; spf=pass (imf08.hostedemail.com: domain of shakeelb@google.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: z3daxsc89a9cq6hx45tu43hpac5x5ter X-HE-Tag: 1624545292-924584 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: On Thu, Jun 24, 2021 at 3:26 AM SeongJae Park wrote: > [...] > > > if time() % update_interval == 0: > > > > regions_update_interval? > > It used the name before. But, I changed the name in this way to use it as a > general periodic updates of monitoring primitives. Of course we can use the > specific name only in this specific example, but also want to make this as > similar to the actual code as possible. > > If you strongly want to rename this, please feel free to let me know. > Nah, it is ok. [...] > > > > Any reason to not use kthread_stop() here? > > Using 'kthread_stop()' here will make the code much simpler. But, 'kdamond' > also stops itself when all monitoring targets became invalid (e.g., all > monitoring target processes terminated). However, 'kthread_stop()' is not easy > to be used for the use case (self stopping). It's of course possible, but it > would make the code longer. That's why I use 'kdamond_stop' flag here. So, > I'd like leave this as is. If you think 'kthread_stop()' should be used, > please feel free to let me know. > Fine as it is.