Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp265721pxa; Wed, 5 Aug 2020 00:03:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI+4QNLJaVDWM2uSU5UshPpYipdpcEQ1k4hXUNdW//g5/J4ts4V8qgE2xasUHJ+5CS0A16 X-Received: by 2002:a17:906:6d91:: with SMTP id h17mr1703812ejt.531.1596611029687; Wed, 05 Aug 2020 00:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596611029; cv=none; d=google.com; s=arc-20160816; b=oLXzS4y6IqyvUz85eWc4XtY+MIugMW6aaab2d2xuIqM7qufWkkXHqMwBEYTtp1n5vY agEHuff1GpimjE7zQf9zy9iVebzt8T+1MK7YAz0RDC2e6zjsFvvhAb324DKVIGC+UI58 oXApL2+SdLV8N8Bbbe4RMV+Tzv6t/buvgh4v2omfGqwseKMEogRzI5w4mem9afB+1PzG ciiWTZvT5stfqjPKV9N544FSlYkxVbOivV0HAwCPGPvm/cAu6WeKS+duFTfiW/HML7c2 guSuwp9HeclL3xdNQb3YG8g4uzBOufQj9RX45e3sSlvw8iveTxvnt0ENNxfbszV5Yx7t H1fw== 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:ironport-sdr:dkim-signature; bh=TaBhL5HojO46LzRrtNTJtjXeDGLmPmatGGRehayYLuY=; b=z36wHQiVC08YHEdCUPRVstYgrqe1BB4z/cZgSYmZV/cB2S392z8djoeeKqPooWAOCd cRcuPFvKNVE7ziAMAp5MHmHJnSXUHF2uqaogCjwcf4fNOqggf1QTn4rMdLNl8LgWG6fp GKIVFsY8BgPAFNPbv2P94Mhifxg9FAL5UpV68/wzBIDXX6uRhTY8stipA8mxYigW7Got bB01Tm2Ke0qWGckCPCEX8h+xRO+Jlht/6SphUYTSO3+pUH5pBpg6waiKkb74Z818AWmY r4gg40UxQ9/xMIUWKsv/QUoyj4759kj60Ir6LYdkfETD3fPr605BaGKzX1MMnpx/robt bHWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=bgFmuqv+; 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 h22si747277ejj.363.2020.08.05.00.03.26; Wed, 05 Aug 2020 00:03:49 -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=bgFmuqv+; 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 S1728255AbgHEHC1 (ORCPT + 99 others); Wed, 5 Aug 2020 03:02:27 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:3322 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHEHC0 (ORCPT ); Wed, 5 Aug 2020 03:02:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1596610946; x=1628146946; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=TaBhL5HojO46LzRrtNTJtjXeDGLmPmatGGRehayYLuY=; b=bgFmuqv+bUe8YirmnyQii6C/KQX9zSPCFn9LHyUIHL/kUborJMvO/rji 3YH25L9WvaLj4kNJGE3oXxnHydp/nPhbuuRRc4DhbmdD7wkGrGABt8QEG Sfon4eJoTmqa+y9JMABQEQGGGZKxPfHUIXhxV/XZr4otReaGZTCQpzC2V Y=; IronPort-SDR: 1njLGLtp2zkq+EzPQO2ocDFDKI7LstWAa5hNp7nJ6X/GoCddrUSwPU1CJTdxYX9P9o64N9r8aP LhOi3eh6dS/A== X-IronPort-AV: E=Sophos;i="5.75,436,1589241600"; d="scan'208";a="46045988" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1a-67b371d8.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 05 Aug 2020 07:02:25 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-67b371d8.us-east-1.amazon.com (Postfix) with ESMTPS id 5384CA21FD; Wed, 5 Aug 2020 07:02:14 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 5 Aug 2020 07:02:13 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.160.26) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 5 Aug 2020 07:01:56 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v6 05/10] Docs/admin-guide/mm/damon: Document 'init_regions' feature Date: Wed, 5 Aug 2020 08:59:46 +0200 Message-ID: <20200805065951.18221-6-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200805065951.18221-1-sjpark@amazon.com> References: <20200805065951.18221-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.26] X-ClientProxiedBy: EX13D24UWB002.ant.amazon.com (10.43.161.159) To EX13D31EUA001.ant.amazon.com (10.43.165.15) 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