Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1100655ybt; Tue, 7 Jul 2020 07:50:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV+VEn4u/jOuHt1YGXI7OM7W58jJ7860qNRWNR3UwGwDTJl+2IiHp22KA6LoA1087WqVk6 X-Received: by 2002:aa7:dd14:: with SMTP id i20mr19120750edv.41.1594133421490; Tue, 07 Jul 2020 07:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594133421; cv=none; d=google.com; s=arc-20160816; b=OpFs7pkVA4Du5p9h7GKR8t559RihpFfoIagGrzLmp4EJt1FDRxtFqRpvPBw4/TUVfH CQf4Jg+Lxjgxe9udER2FRHsATFdmsexvk4dZhsDZUr1673U018HntWi6W6lMWdEJ1eaX rwo+Ub0MzKGBtGOIXhK2P3a/hfV9QUv+ess4/59uwYat2Iasif2mUkbQKbHbOCSwYB5D Mp4hsIa4wxaSsFhI67tbIUPOxgghuVwIEXvlA14pb6MrQ2aPmsKuXLHMUVmV70BtvkyE R2EIIjWH7Z5cxJYW8evV8vaYYtoVL5WdvKDzKOrMATFzuzd+c3sFyJQ2EHm0LldG3GHc F7Kw== 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=Qc9whmri0AG1b7Tn1mnONsKzQtWP3wUxU6BN9M8YXo0=; b=JNhSM/fSnvmXFmMXz2i1w7ZXeqlDdULk6yjIks9IP8AjsA/oR8E3GScUK7SGMl0ImN S7647HBJbFjtpjP3dAvUBR6NUayzzVnaTK8h1CTfpqohTgM3ghc6MZrOH7caKNrX6R1A NxxIRS9Ww6pUJdxHp4kIYa/jVNWV6CkCMKoubGpC6AWq8ALxhJXD+/eoH2V0P4gRTC59 VIAac7/kA3SkblSpNv45PVnlGweO9E5t8RiQ5JE29iibKJy2YcL7YhPlCAhX/L4TPaho +jiXYOxIMXQOgQ+Zp9r6PG1+A1bACMRFk0DP9NABP9PWfGAPKS7yppDyeQBi7fxkJezG utAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=G5URi8l2; 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 h16si14877552ejb.456.2020.07.07.07.49.58; Tue, 07 Jul 2020 07:50:21 -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=G5URi8l2; 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 S1728382AbgGGOsz (ORCPT + 99 others); Tue, 7 Jul 2020 10:48:55 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:28487 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728190AbgGGOsw (ORCPT ); Tue, 7 Jul 2020 10:48:52 -0400 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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