Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp202520pxu; Wed, 7 Oct 2020 00:19:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9ZwrKISf9MRHrrphuSgt/CjQuHErRBhvv8L77IW0svMYprCYMQ/mtfx76dfy5lGCYDLwr X-Received: by 2002:a50:d4dc:: with SMTP id e28mr2128309edj.137.1602055144410; Wed, 07 Oct 2020 00:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602055144; cv=none; d=google.com; s=arc-20160816; b=ZpEbMDJYBeq0/GNslV7VxvXqheL58GOg2JxtGQ9oeJQh4Qmtv+TW5b2zofyuRVkVtf CuxuJ6xFAwvb0RW0BENyurC/zxFJfFkHA/hQDtL8hmedObFRymAFjPnYzA+k2hTbGJJz 6Vr0Q8VmyWUHYo+HrPyKzvlj0dc+ILrJSrcbyoV35Iu4iFeJkQg2WRZrvdX9rtRXzutn Uc35WgEmw8MwH0KbV+VJhnO0xF0mwMhUge+NxkuYicvDluupCluFE4DJMgrJxiO2QSG1 Onlnh+FQ6AIsE6y4wmgsv2D/Swob3vzBrnFSoaiInOes4pimsxbvqVX1VDjvELU6XyT3 LOXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TaBhL5HojO46LzRrtNTJtjXeDGLmPmatGGRehayYLuY=; b=EAIkT0wRZ0N7wZ7NP00C8UY7PUWIy2CG7D8sdfRaTGb3jPkh+FhLPDz5j1m5IlF9E5 ySPg0aMk6i/3zG9tOQStcFIUrWnUa7yuJ+AzMd8ps3Yn2IaFu9k9KDtUFi0UH1nnCnXL mRilUIg4vIjPjKHo/4MJcD+hGKIj8Z2Mk7q9SSuTmE4sDf4oo24BlV5leIv81sNRjc/Z kRS2X0F/LVFHCkJyu4+YpI3oRsa1h160LUr71QuAGPUu4xx/tHsjVKYkCyg6uk2V372M /B74jIp3GPUECHpE+V2OE++8dA2qOZyGcdJ+Y06Gl9soC+X59HfbPi5F65pSXvL8Wr9m XXrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=mYkbICG5; 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 i62si849733edd.192.2020.10.07.00.18.41; Wed, 07 Oct 2020 00:19:04 -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=mYkbICG5; 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 S1727739AbgJGHQo (ORCPT + 99 others); Wed, 7 Oct 2020 03:16:44 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:17303 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbgJGHQo (ORCPT ); Wed, 7 Oct 2020 03:16:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1602055003; x=1633591003; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=TaBhL5HojO46LzRrtNTJtjXeDGLmPmatGGRehayYLuY=; b=mYkbICG5ofO4LpP6hp3cD1PGQdIqqPDdkOBEjWi38IIVIQCg6oCrK0Aw 4ikE5azyWcFXjvsqqtBfNCpBXlSdX0WK1rVnjIUDJr7hKUuChg8vHIh1F 6NdXsrp02eueS3otmQZ67igs0gJ9RYK79hQ1AwaPvuYC38EG8vRd0x05e Q=; X-IronPort-AV: E=Sophos;i="5.77,345,1596499200"; d="scan'208";a="74033079" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1d-2c665b5d.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 07 Oct 2020 07:16:29 +0000 Received: from EX13D31EUA004.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-1d-2c665b5d.us-east-1.amazon.com (Postfix) with ESMTPS id D1559A1C5D; Wed, 7 Oct 2020 07:16:16 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.162.73) by EX13D31EUA004.ant.amazon.com (10.43.165.161) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 7 Oct 2020 07:16:00 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v9 05/10] Docs/admin-guide/mm/damon: Document 'init_regions' feature Date: Wed, 7 Oct 2020 09:14:04 +0200 Message-ID: <20201007071409.12174-6-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201007071409.12174-1-sjpark@amazon.com> References: <20201007071409.12174-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.73] X-ClientProxiedBy: EX13D31UWA003.ant.amazon.com (10.43.160.130) To EX13D31EUA004.ant.amazon.com (10.43.165.161) 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