Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp567513pxk; Wed, 23 Sep 2020 10:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrPG38mVDwCHm/ZzIKvFd0gUuNXQA7vpAAqnEuajwCRgOJ9M4cjUoLZoP+VuRzkjI3bDHW X-Received: by 2002:a17:906:d965:: with SMTP id rp5mr605742ejb.364.1600880797424; Wed, 23 Sep 2020 10:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600880797; cv=none; d=google.com; s=arc-20160816; b=1GjK8ZOYoisZdEqPISnWwYzc2bRstH3zLPTGxshfw/UL+NizGXM6K8tUFoNSXd0E76 Uuz0f4efewYXmUvQaIUIoz24XLMG4g3X4aZsrSOoUFncwfVwzykXo/ZVcExV7/K+IJmQ +RrKx48hESqATNdybCKrz/c7CwndVJ35GE4vZDKtMKXHbFRfnBMhVMLvyoYvzFnqT2Cl ifJ7FNHnpoFOKOwodl1qzozqcxUBlgC0T8rXAP6NJ6kMz48q7MyN+Y17cunJaAGicEv2 DOn2AnA+tTRX0E/xo4CMP+rrrxJJNkHb3dHa0rHMynAoP1zVmtrbVad79EXzP74wiZut i5bg== 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=e4dEeErX3fsJf6YfVdhDLGuUkUQWGltXcsACjrY/uUI=; b=PqfJIhMBCnfaYsXNrH87kI7rwdIQSjQfj2e45/S9V1dMwVR7JHHIXnf+b7N/Rx+ulv jBLckttHHpXv1PeRLHIMHhHatuTai1Xgo5T9q9oqNr9dXc+SWpdNt40al71nFDJrPLlp 259X8iPOzQW0HhkNTrCy2Y4gq2MaYyJOQIiw/hFVsAx4Yo99cRrWrzeVlvCIuHz0nrtR 8z767cUG3tsL99ZjL1hsfsgVXDVi/qVMSjSn4DEb6Gq1HRJd8gfPmsJLLAY0n0pNwCOK hqZaQ08frEwmlebDhC3HQmw2FxLb8gcwdyNZ2GpHCvmC6pZIlHR6G5pDYB+vAhoUU4QQ EWSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="m+5t6/WR"; 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 mb25si417841ejb.320.2020.09.23.10.06.13; Wed, 23 Sep 2020 10:06:37 -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="m+5t6/WR"; 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 S1726684AbgIWRFL (ORCPT + 99 others); Wed, 23 Sep 2020 13:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbgIWRFL (ORCPT ); Wed, 23 Sep 2020 13:05:11 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14A8C0613D1 for ; Wed, 23 Sep 2020 10:05:10 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id z17so645946lfi.12 for ; Wed, 23 Sep 2020 10:05:10 -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=e4dEeErX3fsJf6YfVdhDLGuUkUQWGltXcsACjrY/uUI=; b=m+5t6/WReDb3eJGSXP+SUuLUwfRUdODd/gkzMeTwF+vQXEDdtXpZ8z0pgCktidjkqk dex5yOo+KZyYZt/RngNJ03vEPmDiKY3E6Rs4mxpYyUot6d8Pb2RWyI1hI3bhHzEwjIXC FbODuVFocd5UQvROdQS52y2Q5RL+//IYAHs9u9nL2lxRY/vSWnKlPmCaC8N4iirqRmrP 1RPzrLASW/3/fZQQEHL3ngFIxi/nWH0rIyY+RwDL7FZDsrQs8f1zsXwnhT2eoVSBZjL+ 6b8hFmiVlFaDmmzvZerKvOJ8l/WtRB1yCuow/q7JzeskhwQo2zn64WHaob2SmO5I0GdU NI6A== 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=e4dEeErX3fsJf6YfVdhDLGuUkUQWGltXcsACjrY/uUI=; b=N+BBErYORa+vL39ct0nvHQi4pUFLxhPv+g8D2UQ8N/ViZZpKUnGu+tPv3z6rxII8vP yhSyA/ZVxgQqY7CPOWuWla/0glmN9r7LbG/sBP2UJyoHofi1ZCftdzTz99d2ebmnD51X eiE6YhgTYLGAxTijk1mZGuwSoVUiiew4a2vDN4iIO07/AdPyaLhOvu21pbNYoGaZrLno KWtonI//n0zXfa9VqYyv00mSHf3rUQRbigX2bz9hyoG6d+HloFiyXfGSA/YDrPPj4Kni uAYVIl33QemGG9IPjEeOanOeYV7EpOGHaNun1SHYu59sQFVR3MYI7/LBvtPSCi+Cx+GK 9aWQ== X-Gm-Message-State: AOAM5310ZTEamhU/WyQF8azg/8t0asEsW+4U+KPm23nGJ2mue1nXXE8h /YqME6BZT3K1hU3I9Y/TiWepJH4dbhYfU/gTUjeBwg== X-Received: by 2002:a05:6512:304a:: with SMTP id b10mr229017lfb.475.1600880708833; Wed, 23 Sep 2020 10:05:08 -0700 (PDT) MIME-Version: 1.0 References: <20200817105137.19296-1-sjpark@amazon.com> In-Reply-To: <20200817105137.19296-1-sjpark@amazon.com> From: Shakeel Butt Date: Wed, 23 Sep 2020 10:04:57 -0700 Message-ID: Subject: Re: [PATCH v20 00/15] Introduce Data Access MONitor (DAMON) 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2020 at 3:52 AM SeongJae Park wrote: > > From: SeongJae Park > > Changes from Previous Version > ============================= > > - Place 'CREATE_TRACE_POINTS' after '#include' statements (Steven Rostedt) > - Support large record file (Alkaid) > - Place 'put_pid()' of virtual monitoring targets in 'cleanup' callback > - Avoid conflict between concurrent DAMON users > - Update evaluation result document > > Introduction > ============ > > DAMON is a data access monitoring framework subsystem for the Linux kernel. > The core mechanisms of DAMON called 'region based sampling' and 'adaptive > regions adjustment' (refer to 'mechanisms.rst' in the 11th patch of this > patchset for the detail) make it > > - accurate (The monitored information is useful for DRAM level memory > management. It might not appropriate for Cache-level accuracy, though.), > - light-weight (The monitoring overhead is low enough to be applied online > while making no impact on the performance of the target workloads.), and > - scalable (the upper-bound of the instrumentation overhead is controllable > regardless of the size of target workloads.). > > Using this framework, therefore, the kernel's core memory management mechanisms > such as reclamation and THP can be optimized for better memory management. The > experimental memory management optimization works that incurring high > instrumentation overhead will be able to have another try. In user space, > meanwhile, users who have some special workloads will be able to write > personalized tools or applications for deeper understanding and specialized > optimizations of their systems. > > Evaluations > =========== > > We evaluated DAMON's overhead, monitoring quality and usefulness using 25 > realistic workloads on my QEMU/KVM based virtual machine running a kernel that > v20 DAMON patchset is applied. > > DAMON is lightweight. It increases system memory usage by 0.12% and slows > target workloads down by 1.39%. > > DAMON is accurate and useful for memory management optimizations. An > experimental DAMON-based operation scheme for THP, 'ethp', removes 88.16% of > THP memory overheads while preserving 88.73% of THP speedup. Another > experimental DAMON-based 'proactive reclamation' implementation, 'prcl', > reduces 91.34% of residential sets and 25.59% of system memory footprint while > incurring only 1.58% runtime overhead in the best case (parsec3/freqmine). > > NOTE that the experimentail THP optimization and proactive reclamation are not > for production but just only for proof of concepts. > > Please refer to the official document[1] or "Documentation/admin-guide/mm: Add > a document for DAMON" patch in this patchset for detailed evaluation setup and > results. > > [1] https://damonitor.github.io/doc/html/latest-damon/admin-guide/mm/damon/eval.html > Hi SeongJae, Sorry for the late response. I will start looking at this series in more detail in the next couple of weeks. I have a couple of high level comments for now. 1) Please explain in the cover letter why someone should prefer to use DAMON instead of Page Idle Tracking. 2) Also add what features Page Idle Tracking provides which the first version of DAMON does not provide (like page level tracking, physical or unmapped memory tracking e.t.c) and tell if you plan to add such features to DAMON in future. Basically giving reasons to not block the current version of DAMON until it is feature-rich. 3) I think in the first mergeable version of DAMON, I would prefer to have support to control (create/delete/account) the DAMON context. You already have a RFC series on it. I would like to have that series part of this one. I will go through individual patches to provide more detailed feedback, so, you don't need to post the next version until then. thanks, Shakeel