Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp881397pxa; Wed, 19 Aug 2020 18:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH1TcdsZtTw2O1KY1ASfgphS9AFC+SnZ7p9eALfhRug9BBYkGLX1bdR1gmLVtPdp09cSf0 X-Received: by 2002:a17:906:289a:: with SMTP id o26mr988742ejd.309.1597886612487; Wed, 19 Aug 2020 18:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597886612; cv=none; d=google.com; s=arc-20160816; b=hg0aSt0h7sz1o5RXzw5ddK9ocWNMCztpTJIAXnXL90g17jqmexK2d5TtUTHmNmb7M9 VyvZMYNeIw/OJm2sM00ZTF8VWHWwZjxOXd2y9v3AscEMrTUqyK/FRL6r5bIoJBrj5zdV ZXawHfNbQ0qZ8EqAFe69rRUCWMfKt0yn44x2pkyatdABjC1QiW+lK2OE4GOaBHTwHPEJ 4jLZ1s5Ih80TY654NAzyqkaZZMLcmP0YKdThwvxI6wVSwQmer09VhBS7Siyvp7ApkZrL FHu9WvNkEfv/cs/7l5LQcQ7sdhVju3uIMyZaL+8aMlGZ1aD9doy57m2Rs0qWQXuskCPs Mj2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=f2YYW8edHeX1XU5Hyd3BTnCfsz4e6RGc2J6WqCLqZNs=; b=0QJKzfP1FP0Zo3M6z2W/GG3xX5VukUBPS3QnQwdpIwt9fPEVEme8HS3iaes+784FLv azVAVOstWOJhycCVvcF7LB7GkL9iT1DqrioV+erCDYOOv2kEN1MKeCFuUMbOI6IM0SVM EkuIA/tms9aW5JLfBy3P+RuyC+RGU6kPSrYVRjSbxeBTdQh4yz2Hs7h2JL3wIy34hBF/ S/MwpVDlY2vLbM37o6x93CLGUTVMielCteHf4Ai+sxUbUtaNCy1KFH2ClxfuNIbu593p p0/RQ8yWC6SlGKYD9qzYuMidkVEsEnuwqBqa1Dg9CJoCgYd7e0Ai56SX4r+brN0L+G5b kNMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QecQW2KN; 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 j12si239285ejc.680.2020.08.19.18.23.08; Wed, 19 Aug 2020 18:23:32 -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=QecQW2KN; 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 S1726715AbgHTBWA (ORCPT + 99 others); Wed, 19 Aug 2020 21:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726700AbgHTBV7 (ORCPT ); Wed, 19 Aug 2020 21:21:59 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AA79C061383 for ; Wed, 19 Aug 2020 18:21:58 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id 185so373994ljj.7 for ; Wed, 19 Aug 2020 18:21:58 -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=f2YYW8edHeX1XU5Hyd3BTnCfsz4e6RGc2J6WqCLqZNs=; b=QecQW2KN7UqoOPEbPzIa1X6BNdwEoPIK3Zx/Cz1cbaaaWzq0I96Bg2sxEjLXoWhVuK PbvXHn2Uii0TYpGDnCXfHmmE5XrHtrf1FGFTrn8xLggR1p7SiGD9AVvWs4E17GLlQa7i +9RrO2pb+ivo2qh5kdDdamSMyool04JXjvdTpV/WTFdoqvC3TWaq+DcnVBQyRrWAkEpv zXGfccmBw8kfZ3Bt8Ot5yOjSVYSdr5sTrBrHT/1eU3R2BLyb/87hGhY7iwc/z+zSRxBS oAePzBtUQ7cH/w548Cl4Y81xeBa3/xsK+VsEs77pv6y3y7buQY14LPj6t2wYozvtscQN x5vg== 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=f2YYW8edHeX1XU5Hyd3BTnCfsz4e6RGc2J6WqCLqZNs=; b=baNQNqPiIwmml+8lmy/3caRg4IA4ZupdBElmk/o1e5k4K5NNGiALolw4qH9hV7kTpq 6imIN0NUDJ2/7heWzfpsqWmTnS81qFz/oqgGUVqswKbPHL+V5vYlVlGgBMPeexqNLyE6 Vv2r3SAmFoKwr6U9DGR6y0XORwRPlXsRiKpqtPgVPsKHGb/jYIu1ikzViQjuDW4Hzf/e sKR9h6h+57zjC5blJBSR89nT8fyKTJA/vX7l/hQPaBYgGyTtiU4BkAEx4OlP225U7pUk 7pLmoohMci2p931YyJkFHqNQQcmzZtDcnp/wT48iQCIypE7HSur5n4lI9XjyoE1ZVB9a cVJA== X-Gm-Message-State: AOAM530jr6Xz682622LCQ2CCOa0KLNOO5fIwpa2fbPw3r7rrihuFKhoQ ar9Ci4s0vIQe1n8D3ut2EUSALcDeFYB52mhnk6cnug== X-Received: by 2002:a2e:9396:: with SMTP id g22mr442161ljh.446.1597886516487; Wed, 19 Aug 2020 18:21:56 -0700 (PDT) MIME-Version: 1.0 References: <20200818072501.30396-1-sjpark@amazon.com> In-Reply-To: <20200818072501.30396-1-sjpark@amazon.com> From: Shakeel Butt Date: Wed, 19 Aug 2020 18:21:44 -0700 Message-ID: Subject: Re: [RFC v7 00/10] DAMON: Support Physical Memory Address Space Monitoring To: SeongJae Park Cc: Andrew Morton , 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, "Du, Fan" , foersleo@amazon.de, Greg Thelen , Ian Rogers , jolsa@redhat.com, "Kirill A. Shutemov" , mark.rutland@arm.com, Mel Gorman , Minchan Kim , Ingo Molnar , namhyung@kernel.org, "Peter Zijlstra (Intel)" , Randy Dunlap , Rik van Riel , David Rientjes , Steven Rostedt , rppt@kernel.org, sblbir@amazon.com, shuah@kernel.org, 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 12:25 AM SeongJae Park wrote: > > From: SeongJae Park > > Changes from Previous Version > ============================= > > - Use 42 as the fake target id for paddr instead of -1 > - Fix a typo > > Introduction > ============ > > DAMON[1] programming interface users can extend DAMON for any address space by > configuring the address-space specific low level primitives with appropriate > ones including their own implementations. However, because the implementation > for the virtual address space is only available now, the users should implement > their own for other address spaces. Worse yet, the user space users who rely > on the debugfs interface and user space tool, cannot implement their own. > > This patchset implements another reference implementation of the low level > primitives for the physical memory address space. With this change, hence, the > kernel space users can monitor both the virtual and the physical address spaces > by simply changing the configuration in the runtime. Further, this patchset > links the implementation to the debugfs interface and the user space tool for > the user space users. > > Note that the implementation supports only the user memory, as same to the idle > page access tracking feature. > > [1] https://lore.kernel.org/linux-mm/20200706115322.29598-1-sjpark@amazon.com/ > I am still struggling to find the benefit of this feature the way it is implemented i.e. region based physical address space monitoring. What exactly am I supposed to do for a given hot (or cold) physical region? In a containerized world, that region can contain pages from any cgroup. I can not really do anything about the accesses PHY-DAMON provides me for a region. Now if you give me per-page information that would be useful as I can at least get per-cgroup accesses (idle or re-use data) but that would be as costly as Page Idle Tracking.