From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 625C3C433DF for ; Tue, 7 Jul 2020 14:48:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 27CE4207DF for ; Tue, 7 Jul 2020 14:48:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="G5URi8l2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27CE4207DF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 991658D0019; Tue, 7 Jul 2020 10:48:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9685F8D0007; Tue, 7 Jul 2020 10:48:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 857368D0019; Tue, 7 Jul 2020 10:48:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 7083C8D0007 for ; Tue, 7 Jul 2020 10:48:52 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3354A824805A for ; Tue, 7 Jul 2020 14:48:52 +0000 (UTC) X-FDA: 77011561704.13.crack14_3e03acf26eb5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 02EF618140B74 for ; Tue, 7 Jul 2020 14:48:51 +0000 (UTC) X-HE-Tag: crack14_3e03acf26eb5 X-Filterd-Recvd-Size: 5623 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jul 2020 14:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1594133332; x=1625669332; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Qc9whmri0AG1b7Tn1mnONsKzQtWP3wUxU6BN9M8YXo0=; b=G5URi8l2B6R153n8vZN1Q4fPhitmOnWoI+3Sd85+wMDlgbJRJFeo7Dku u2bYhsV6ZWlq1y9iUgH/pszz8Knh2bZ9E/Z8T4qJ9noTppDgWMemMxhM6 lZCxT9IaORaiThkhbZM9vQtMrm7NQmgNHQcd3AMTiLVOPNRVWUO5X5ZlY 8=; IronPort-SDR: irG6a8phksdfbHXmB70v1Eim+j8f72r7wvvbFAQyNeGzvhe3WlBhWo3uIoJ7l40e3nbVYpDHl5 I3WEfnPKbK6g== X-IronPort-AV: E=Sophos;i="5.75,324,1589241600"; d="scan'208";a="40494985" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2c-2225282c.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 07 Jul 2020 14:48:22 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2c-2225282c.us-west-2.amazon.com (Postfix) with ESMTPS id C1278A24EA; Tue, 7 Jul 2020 14:48:21 +0000 (UTC) Received: from EX13D31EUA004.ant.amazon.com (10.43.165.161) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 14:48:21 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.161.214) by EX13D31EUA004.ant.amazon.com (10.43.165.161) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 14:48:01 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v5 05/11] Docs/damon: Document 'initial_regions' feature Date: Tue, 7 Jul 2020 16:45:34 +0200 Message-ID: <20200707144540.21216-6-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200707144540.21216-1-sjpark@amazon.com> References: <20200707144540.21216-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.214] X-ClientProxiedBy: EX13D35UWC001.ant.amazon.com (10.43.162.197) To EX13D31EUA004.ant.amazon.com (10.43.165.161) X-Rspamd-Queue-Id: 02EF618140B74 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: SeongJae Park This commit documents the 'initial_regions' feature. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 153f07da9368..573fcb4c57a7 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -315,6 +315,41 @@ having pids 42 and 4242 as the processes to be monitored and check it again:: Note that setting the pids 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 ``pid`` should already in ``pids`` 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. DAMON will +automatically updates the boundary of the regions after one ``regions update +interval``. Therefore, users should set the ``regions update interval`` large +enough. + + Record ------ -- 2.17.1