Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp271396pxv; Thu, 24 Jun 2021 07:36:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZqjY9wDf8wdOQnzZWsjhljDRP9i2jpdZOBhmJYS/YFxCgzbkUtfRqv821S8OMu/jCYfcT X-Received: by 2002:a17:906:39d7:: with SMTP id i23mr5559338eje.121.1624545375731; Thu, 24 Jun 2021 07:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624545375; cv=none; d=google.com; s=arc-20160816; b=jlGsSq62cs5Glhbx1UkN6N2QSsEDRg6ZI6WDTYTHrXXi49VkPvHb8I/SZVpXX5ZJxR oI9tFZ5XQWpl7j4Xj/G1AL/P1SQTEkJ1UE6SEDzbUcdSR7ajxIixDKmvKIVErsU+RmkQ duQ8GQab/vRveyDzCu6vnGhRgKmwYINuarzxr+TiZdR2GKOlwKDdoczUXOlIWNap8qfp Q1KcrPplt8z06WZ+TZRlKIeeF+hYb4Q2fh3hAgRjX5VPjP9AOKQPtm7a9gC3PaOOiAL4 ldazE5IfQTJ2EWZGpA+zvHffPg1lN5M6BxiwN4L9ORSiU68iZTDfBKJjwq6p9ZzYz04k +OJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GJrgmUk4MBeaLhPgL5J6HKmLfh86Hi7USjfP1jfq3Xg=; b=TKe2VSd0Fqeomk0Ow3Y6xut5yU5AAkee9koTaETmT687H6xRGG+b9apo2y02anbgJ+ KrIglGTL+6knwuvhGauRpXhrKEKXUWTIJ1WzgLFulRXpu8CIzkIiv17giqQNmX/alHcr psi02JHWIg/GncO9mC60raPSsvVeRcXWwmxhmKeuZJtdzT+pyvtzK0z0cOhghuAYfMVU uN4WLFfeIEwsuGuHdVY1h/oSBym1IgyQ21VfeQ2mBdcRrsWU3C5p9cA4Oje//ulbBh7H 0+Ybn0F3yxeBehGKJP9wM2HAxCiQggAwM9/uhs+4Evyd3fUPxm+X/2BDQr2UnLjdmtHD E4DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HkKrqNlJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq17si2857527ejc.70.2021.06.24.07.35.49; Thu, 24 Jun 2021 07:36:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HkKrqNlJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231417AbhFXOhM (ORCPT + 99 others); Thu, 24 Jun 2021 10:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbhFXOhM (ORCPT ); Thu, 24 Jun 2021 10:37:12 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BC02C061574 for ; Thu, 24 Jun 2021 07:34:52 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id u13so10708433lfk.2 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=oRgPY1+FuL1EvpcUqogIEaTnPlHYqsrC9LReDdWDg+4namSMTFERx3lJUhNtqOO6FQ nVdKDrEQXUYqhNWSeMUQmJErh7OZUVAP/6hCyqmpOdgidh0JzS3s+jeZzwgDthGtyCfB OtLOXl7oIThtw3fB30b5/UJfzo4RdO7egC03jFnRrYDMXbPyacF3QN7SwlI7wnjQWt34 KKCDtbjPfJjFfgqGaTX4klCfRyE3ulRiMn6aDcvtn/5CiNXdchh5QUWB0eznSA9aciNd YSFEkUzgZc5NgK2mnSVuK1MV2toFsKidAV+h80EqllSexQKtPHhgR8eC6OefBde/HLgY 9Whg== X-Gm-Message-State: AOAM530n2DQryWdLYukOQ5FYxFkrOkRBEWwZ7wWJRV+dHDt6rN6iAIqV 0lL9l2CiV5/0Np60VSKUgzXfz0aWlepdmtrFFhBOZw== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.