Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp89157pxk; Wed, 23 Sep 2020 23:43:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYncCV0uNtC+m2D5gxyWNpl/gBvEN6Pz3jcrcqzy5z8KgjL+WKUTPY5tZmjdPExJioULWM X-Received: by 2002:a17:906:c1d7:: with SMTP id bw23mr3278208ejb.171.1600929801012; Wed, 23 Sep 2020 23:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600929801; cv=none; d=google.com; s=arc-20160816; b=jsqe7lO7hrhzJm+osuGAj2oZUnCmyncbGIkp7h4eEu+D9Nu0DzBWXoXd0c6zo06ByP 0dfbMEErqGYHX5Oa+3r10/lnUylKOI9AiQBKfrHWQ16MPH7CIv/KH043Y58pl+zkJr8r k1OZa4Fd32YlaG0NCnJ593BN3RtNHQOZ40/PDlLXkrcjY6WMlGY3TN7ZGMKh6GzlH+a7 cbqcA52HbYqIBVX46opF1zTYXBBPqT8iEijkfXlIyobDBVCHOE2M/C9SXTSUyNeWIlOC LY53FdZAcEB5LBh+93oj/K08YyCx7irrQ749ojqfv6IzbH6kywGAy3TpPq7URbGinpRu qVqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=PW0B655DySKTSqtBH4LuirqSOsvQ6UdGky6VjqG365Y=; b=hWWW8+8RQuoodtJqXmTfmMnbVQwxanHGitOppnfqJK4bLy1LLCAt0BiZptZomxdLdH J6nlImAKPzuEo3JWqmOiVRO92OaXSDd0e4J/UgdnJP3hKznQ8FKVxPTdxlKqXHY1LMrn HZGYoDgaVmFnJnzQYVFOm77vqQoctK3RjQxePPwCDoSZ6icbLK6xnT6xjuOBr1qZEo+z sHZhW3WOwx6fCw8WyeODF0ls4/vH5a6kAw451fBuN6UdrO39RJGej4W7CJhxa9gIkGYT MxJDQtNy4a1SQzcmSm8ODxUpJCqn1eYl5Zw32Kec+rbEhe/moNT3+JPSZ9YQ8cgJTK1b CAxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=vkNobJS9; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z5si1355055ejj.403.2020.09.23.23.42.56; Wed, 23 Sep 2020 23:43:20 -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=@amazon.com header.s=amazon201209 header.b=vkNobJS9; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbgIXGjz (ORCPT + 99 others); Thu, 24 Sep 2020 02:39:55 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:37837 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbgIXGjy (ORCPT ); Thu, 24 Sep 2020 02:39:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1600929594; x=1632465594; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=PW0B655DySKTSqtBH4LuirqSOsvQ6UdGky6VjqG365Y=; b=vkNobJS9Yoo7KqqAJXQZR/x7nEV1B1apxzWlV4Su9MZuXqWDv2kkzjbR wX7hWd0V6MYmtETthFoUjVlL7cbhi/61hd/qaau/xOvEFIUAiLiQMQluo KyaGCNTNQ1wd0fZrHLFEZjvgTT7kvG0Hc0mWHbbPR0+bKiXKdr6Hjd30z U=; X-IronPort-AV: E=Sophos;i="5.77,296,1596499200"; d="scan'208";a="77594955" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2c-168cbb73.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 24 Sep 2020 06:39:42 +0000 Received: from EX13D31EUA004.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2c-168cbb73.us-west-2.amazon.com (Postfix) with ESMTPS id B322AA1BD4; Thu, 24 Sep 2020 06:39:39 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.162.35) by EX13D31EUA004.ant.amazon.com (10.43.165.161) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 24 Sep 2020 06:39:19 +0000 From: SeongJae Park To: Shakeel Butt CC: SeongJae Park , SeongJae Park , , Andrea Arcangeli , , , , , , Brendan Higgins , Qian Cai , Colin Ian King , Jonathan Corbet , "David Hildenbrand" , , "Du, Fan" , , Greg Thelen , Ian Rogers , , "Kirill A. Shutemov" , , Mel Gorman , Minchan Kim , Ingo Molnar , , "Peter Zijlstra (Intel)" , "Randy Dunlap" , Rik van Riel , "David Rientjes" , Steven Rostedt , , , , , , Vlastimil Babka , Vladimir Davydov , Yang Shi , Huang Ying , , , Linux MM , , LKML Subject: Re: [PATCH v20 00/15] Introduce Data Access MONitor (DAMON) Date: Thu, 24 Sep 2020 08:39:03 +0200 Message-ID: <20200924063903.12432-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.35] X-ClientProxiedBy: EX13D43UWC002.ant.amazon.com (10.43.162.172) To EX13D31EUA004.ant.amazon.com (10.43.165.161) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Sep 2020 10:04:57 -0700 Shakeel Butt wrote: > 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. Thank you so much! > 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. In short, because DAMON provides overhead-quality tradeoff and allow use of variable monitoring primitives other than only PG_Idle and PTE Accessed bits. I will explain this in detail in the cover letter of the next version of this patchset. > > 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. In short, DAMON will provide only virtual address space monitoring by default but I believe the lack of features because DAMON is expandable for those. Also, I will make DAMON co-exists with Idle Page Tracking again. I will post another RFC patchset for this soon. Again, I will describe this in detail in the next version of the cover letter. > > 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. Ok, I will apply it here. Thanks, SeongJae Park