Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6137138pxu; Wed, 23 Dec 2020 14:51:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1d6bgOFuvNNtd2jI5fl9EGp8weHil9YvNr0Ip33mdVjEeI5J8MvCVj0rJHNLN/rjiIx+Y X-Received: by 2002:a17:906:edd1:: with SMTP id sb17mr25470465ejb.118.1608763913947; Wed, 23 Dec 2020 14:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608763913; cv=none; d=google.com; s=arc-20160816; b=URh23z4TlfiHVzDmEuIXNzIn2XB/4N+SzxLGs0FXS+0UggvqFc0s219/s+XsUbQKCL QaYC/UJeYUMXUn09ati3ZIl4+OZ1zV6EZUs9wJAvUDWy5ZA3taIvTz7iPCXaEszcR9ZL DzvL6ZnX3bWV4qhTyB0jCejTfa5liZBqusCs2LpStc5+Z1/yIxdRREMW/W0gCyBmcBf6 m+SpPbWyS1D25c/1zOxlnN5h/BVkEdu2zf4gR3h2xShoCDJMN1Aoj5HCRl0yhFd3laHC vIGQVvk/mSvgkkmuBJcNsgKcbM+2ubGPvCQp78Tn05wFKKKga/8C7wsG1O0CJgArISrO 8lNw== 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=fUg/8XfBmtURDT5lBCWnW6DL77gquz8BfclV7WZ4WGw=; b=ayWhS+RZMWiv1fAjl8QoeroYaWtAqIjWRTi/gQs63TY0vyNm3++VHIeEmsvtlZs4uH PMnYIi+jvZSBnVJKPn9CetXUzSxvVx7iJbWLGMQPmRmeEI5k7m8zTxZyUY0CFG7RqGDH ECGda7zzAyCYWOXVNh7Wqz2z2dKt5405QkqzNa20QWEtKsFZTyoRiC+RPKieSJPRsrLY vh+tF+0G2tsaXgXshVeTc6CTeU87Yxx3DQIXHrAR2DsXaQKqgkwbOVrStIA9CXIxvS1m 8aFrcNKLG1DNjfb0MRn/AaWU0tguBAgdd9jPhAoWasNNReo1xqKN3azSsjfXvRBDNRKA sLuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="WXc/1DGf"; 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 df16si14127888edb.69.2020.12.23.14.51.31; Wed, 23 Dec 2020 14:51:53 -0800 (PST) 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="WXc/1DGf"; 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 S1727396AbgLWWux (ORCPT + 99 others); Wed, 23 Dec 2020 17:50:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727196AbgLWWuw (ORCPT ); Wed, 23 Dec 2020 17:50:52 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32A2FC06179C for ; Wed, 23 Dec 2020 14:50:12 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id m25so888349lfc.11 for ; Wed, 23 Dec 2020 14:50:12 -0800 (PST) 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=fUg/8XfBmtURDT5lBCWnW6DL77gquz8BfclV7WZ4WGw=; b=WXc/1DGf132PTO1txk0qMQlA5PG0JderjXg2RMviXDYMgUBTpn0MqJXVQrstbdvo6U sKm9x+TNynXiw6fdwNIhfb9WiW73WTA5/GgwZ63RKCfipWjrnCp/3sDrRiqtyLXe/pu/ RrMmKQzJmh06iQw8BhyxXv85Zh3l9UA6Ma1uzb62jIYj+VBrUW+UR+spV0IMA2cM7gvX 1WU4XzoMmfXN4HmmtrpXX/FjhnZfG0j4BuNb3k6ZhbP0/BDUHTMikjqdM0hs5QPto24B dHsBaQcvbYHG/SiToDbByT99rbRC3ga3AiXz2NEi+G5EjGn0LhHJ/kt3qh7dBINn1oiZ LLaQ== 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=fUg/8XfBmtURDT5lBCWnW6DL77gquz8BfclV7WZ4WGw=; b=daAKICqobHoFKnDxiX70OkOuWZHo3fqodVJta2HYnI4QIOUck8R0MkMAiUqR6mcYNf 6vrVbvXKq2wvuab/NxfZQBtHXzHac2Xxr/QeKU4NyYeEZIlxy7BhljJg32n03YamJDDW 41xDFoEB8hg70j68VTVLCm6usagnADHemxDHZNbQwcba7CRSKWMFKsqnVLFcdZ2D7mqX WzAh0P5xzcsKhOPoC0BtWnHxzNQf6BgFc1n30miy7OwD0kNTsYTjaxoya/7aSZP+Xp8i jPWpH1/B36mL7dzQJrySs+gepCcPJwY2UscJ/qA/+FJqWMVjrxgI0eSTymP2LYNyOimb 5Ppw== X-Gm-Message-State: AOAM533ctFOQLXTkpsygbIIKRW0Eg20u8t2o9tnGbRD2jTflB7UFsYMA 7Tq4qTVyE+vi9fbvb5yMPvQ1o0g2E2AwypV+vPchFw== X-Received: by 2002:a2e:9cc3:: with SMTP id g3mr13689242ljj.0.1608763808708; Wed, 23 Dec 2020 14:50:08 -0800 (PST) MIME-Version: 1.0 References: <20201223163317.25979-1-sjpark@amazon.com> In-Reply-To: <20201223163317.25979-1-sjpark@amazon.com> From: Shakeel Butt Date: Wed, 23 Dec 2020 14:49:57 -0800 Message-ID: Subject: Re: [PATCH v23 01/15] mm: Introduce Data Access MONitor (DAMON) To: SeongJae Park Cc: SeongJae Park , Jonathan.Cameron@huawei.com, Andrea Arcangeli , acme@kernel.org, alexander.shishkin@linux.intel.com, amit@kernel.org, benh@kernel.crashing.org, brendan.d.gregg@gmail.com, Brendan Higgins , Qian Cai , Colin Ian King , Jonathan Corbet , David Hildenbrand , dwmw@amazon.com, Marco Elver , "Du, Fan" , foersleo@amazon.de, Greg Thelen , Ian Rogers , jolsa@redhat.com, "Kirill A. Shutemov" , Mark Rutland , Mel Gorman , Minchan Kim , Ingo Molnar , namhyung@kernel.org, "Peter Zijlstra (Intel)" , Randy Dunlap , Rik van Riel , David Rientjes , Steven Rostedt , Mike Rapoport , sblbir@amazon.com, Shuah Khan , sj38.park@gmail.com, snu@amazon.de, Vlastimil Babka , Vladimir Davydov , Yang Shi , Huang Ying , 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 Wed, Dec 23, 2020 at 8:34 AM SeongJae Park wrote: [snip] > > Overall the patch looks good to me. Two concerns I have are if we > > should damon_callback here or with the real user and the regions part > > of primitive abstraction. For the first one, I don't have any strong > > opinion but for the second one I do. > > I'd like to keep 'damon_callback' part here, to let API users know how the > monitoring result will be available to them. > > For the 'regions' part, I will rename relevant things as below in the next > version, to reduce any confusion. > > init_target_regions() -> init() > update_target_regions() -> update() > regions_update_interval -> update_interval > last_regions_update -> last_update > > > > > More specifically the question is if sampling and adaptive region > > adjustment are general enough to be part of core monitoring context? > > Can you give an example of a different primitive/use-case where these > > would be beneficial. > > I think all adress spaces having some spatial locality and monitoring requests > that need to have upper-bound overhead and best-effort accuracy could get > benefit from it. The primitives targetting 'virtual address spaces' and the > 'physical address space' clearly showed the benefit. I am still not much convinced on the 'physical address space' use-case or the way you are presenting it. Anyways I think we start with what you have and if in future there is a use-case where regions adjustment does not make sense, we can change it then.