Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp875871pxk; Mon, 31 Aug 2020 03:51:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpe3FHaJADTbFaGVTka//7GlTWzwGfPi/2BYCvdf/7lxzwhwoOCZt6xH6vxR0WYejva09W X-Received: by 2002:a17:906:77d1:: with SMTP id m17mr584428ejn.96.1598871096461; Mon, 31 Aug 2020 03:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598871096; cv=none; d=google.com; s=arc-20160816; b=aFGBrJPuA1W+m2yaXyUzgf5K2mIkljZXPlcyJsteLq94Jxrz2qwYKMW/3Ps1LTvw3M DV3JuyNQuBPTSrFcJHq2NJRf8BPuJLnEYESB8kelOtVL+M+b2c1F4m06718RIgWMWEO7 NfwOiz8SPlxafc7R4nXyqJneVstyS2J7oKsHOjOhdZ6cIz7IDc/GEB2V+gqV7DVSRAjM OObTc9K5IcSNPkOtq3s7OK4eKurolV7UsW0BzIZjz5PAFEn5RKlTQHbYjyFURaJUxYdD B9M9EIAT04lMebVfKPT3uXtbdw3HwaOzmR9ZSzLEss+R1IvOk/cPxidXIizWOW1MDOTM ao+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TaBhL5HojO46LzRrtNTJtjXeDGLmPmatGGRehayYLuY=; b=YC4REi6wZ8vFxrV5U2OP2TKBnypk9p6XUqCf1Ab+QPuqBwLUglZu14dC8zW+vqCY7L N+QQiJdMF1nA/MPEmdhmaA5bIOGyUehg/jk9c5H4J6UaDzx1FyFG560iN3/vIjdXg0Xz pd2wdiTwyMJxKdej1t2DcHrUds3ImWq/wuRhOL5bOoWaNxDoHVL4BBJwl2STOyFFLzuz QZjuOG8Uc9A/e+B4BMtl+ozP+OSa6c66h+ljjSUILp2LgwDhY24/OzDAZABKiNm8/q+Q qPCcOfkmW+oUNftzxWgmd685CljUW/hVU7ks87sTTth+S9CFabbHkwdYuHBB5KOmRNBU QvXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=Nl3dc5on; 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 cm14si2145504edb.346.2020.08.31.03.51.13; Mon, 31 Aug 2020 03:51:36 -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=Nl3dc5on; 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 S1726930AbgHaKtp (ORCPT + 99 others); Mon, 31 Aug 2020 06:49:45 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:60016 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgHaKtg (ORCPT ); Mon, 31 Aug 2020 06:49:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1598870975; x=1630406975; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=TaBhL5HojO46LzRrtNTJtjXeDGLmPmatGGRehayYLuY=; b=Nl3dc5onbEfXYg6IWFdtfn3e2oYsQXmTIZadKp2+DGVbhK59sagvIAXL UfIHMZIEypDsMwclI3TLy7xhTIV70L3Mp/ABCwpuZGxC2rwhUijfqXrDc XwS9xz9aXeF/t4dlZriyowDlnKI0nEMRXdfcKp/8LDa/6LPoTz0UM5Zib M=; X-IronPort-AV: E=Sophos;i="5.76,375,1592870400"; d="scan'208";a="71144192" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-119b4f96.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 31 Aug 2020 10:49:33 +0000 Received: from EX13D31EUB001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-119b4f96.us-west-2.amazon.com (Postfix) with ESMTPS id 11D311A0476; Mon, 31 Aug 2020 10:49:30 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.160.100) by EX13D31EUB001.ant.amazon.com (10.43.166.210) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 31 Aug 2020 10:49:13 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v8 05/10] Docs/admin-guide/mm/damon: Document 'init_regions' feature Date: Mon, 31 Aug 2020 12:47:25 +0200 Message-ID: <20200831104730.28970-6-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200831104730.28970-1-sjpark@amazon.com> References: <20200831104730.28970-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.100] X-ClientProxiedBy: EX13D49UWB002.ant.amazon.com (10.43.163.68) To EX13D31EUB001.ant.amazon.com (10.43.166.210) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SeongJae Park This commit adds description of the 'init_regions' feature in the DAMON usage document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 41 +++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 96278227f925..cf0d44ce0ac9 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -281,8 +281,9 @@ for at least 100 milliseconds using below commands:: debugfs Interface ================= -DAMON exports five files, ``attrs``, ``target_ids``, ``record``, ``schemes`` -and ``monitor_on`` under its debugfs directory, ``/damon/``. +DAMON exports six files, ``attrs``, ``target_ids``, ``init_regions``, +``record``, ``schemes`` and ``monitor_on`` under its debugfs directory, +``/damon/``. Attributes @@ -321,6 +322,42 @@ check it again:: Note that setting the target ids doesn't start the monitoring. +Initial Monitoring Target Regions +--------------------------------- + +In case of the debugfs based monitoring, DAMON automatically sets and updates +the monitoring target regions so that entire memory mappings of target +processes can be covered. However, users might want to limit the monitoring +region to specific address ranges, such as the heap, the stack, or specific +file-mapped area. Or, some users might know the initial access pattern of +their workloads and therefore want to set optimal initial regions for the +'adaptive regions adjustment'. + +In such cases, users can explicitly set the initial monitoring target regions +as they want, by writing proper values to the ``init_regions`` file. Each line +of the input should represent one region in below form.:: + + + +The ``target id`` should already in ``target_ids`` file, and the regions should +be passed in address order. For example, below commands will set a couple of +address ranges, ``1-100`` and ``100-200`` as the initial monitoring target +region of process 42, and another couple of address ranges, ``20-40`` and +``50-100`` as that of process 4242.:: + + # cd /damon + # echo "42 1 100 + 42 100 200 + 4242 20 40 + 4242 50 100" > init_regions + +Note that this sets the initial monitoring target regions only. In case of +virtual memory monitoring, DAMON will automatically updates the boundary of the +regions after one ``regions update interval``. Therefore, users should set the +``regions update interval`` large enough in this case, if they don't want the +update. + + Record ------ -- 2.17.1