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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,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 2B71FC63697 for ; Thu, 26 Nov 2020 12:13:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8DDC22087C for ; Thu, 26 Nov 2020 12:13:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="fOC0/2hg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DDC22087C 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 D4C206B006E; Thu, 26 Nov 2020 07:13:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD73E6B0072; Thu, 26 Nov 2020 07:13:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9C176B0074; Thu, 26 Nov 2020 07:13:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 9AB606B006E for ; Thu, 26 Nov 2020 07:13:20 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C25133637 for ; Thu, 26 Nov 2020 12:13:19 +0000 (UTC) X-FDA: 77526459318.21.pies33_07043712737f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 9F42E180442C3 for ; Thu, 26 Nov 2020 12:13:19 +0000 (UTC) X-HE-Tag: pies33_07043712737f X-Filterd-Recvd-Size: 5093 Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 12:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1606392800; x=1637928800; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=wuAaV6r6w2/rFPIrtuYzgXuA5dvTc38BY0LFs0T2lz4=; b=fOC0/2hgNZWu+U8ZSpi+SwfeIyO/e968pDhijpYQ0+9YQQ8iuW+XdhFL yQoz+ERfRpQDN9PuwzyOajxExkv6E68IJI1lATjwuTzW0R9Np6qJR/n63 H8zN9P6ant90wdFHU/MW1xvWR4UbwelIwHlyWxbI+H9tzZ6BWN6oA85/1 I=; X-IronPort-AV: E=Sophos;i="5.78,372,1599523200"; d="scan'208";a="65938514" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 26 Nov 2020 12:13:09 +0000 Received: from EX13D31EUA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com (Postfix) with ESMTPS id 33FB7A1BD9; Thu, 26 Nov 2020 12:12:56 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.162.50) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 26 Nov 2020 12:12:40 +0000 From: SeongJae Park To: Shakeel Butt CC: SeongJae Park , SeongJae Park , , Andrea Arcangeli , , , , , , Brendan Higgins , Qian Cai , Colin Ian King , Jonathan Corbet , "David Hildenbrand" , , Marco Elver , "Du, Fan" , , "Greg Thelen" , Ian Rogers , , "Kirill A. Shutemov" , Mark Rutland , Mel Gorman , Minchan Kim , Ingo Molnar , , "Peter Zijlstra (Intel)" , Randy Dunlap , Rik van Riel , David Rientjes , Steven Rostedt , Mike Rapoport , , Shuah Khan , , , Vlastimil Babka , Vladimir Davydov , Yang Shi , Huang Ying , , , Linux MM , , LKML Subject: Re: [PATCH v22 03/18] mm/damon: Adaptively adjust regions Date: Thu, 26 Nov 2020 13:12:26 +0100 Message-ID: <20201126121226.18883-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.50] X-ClientProxiedBy: EX13D15UWB003.ant.amazon.com (10.43.161.138) To EX13D31EUA001.ant.amazon.com (10.43.165.15) 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: On Wed, 25 Nov 2020 07:29:41 -0800 Shakeel Butt wrote: > On Tue, Oct 20, 2020 at 2:01 AM SeongJae Park wrote: > > > > From: SeongJae Park > > > > Even somehow the initial monitoring target regions are well constructed > > to fulfill the assumption (pages in same region have similar access > > frequencies), the data access pattern can be dynamically changed. This > > will result in low monitoring quality. To keep the assumption as much > > as possible, DAMON adaptively merges and splits each region based on > > their access frequency. > > > > For each ``aggregation interval``, it compares the access frequencies of > > adjacent regions and merges those if the frequency difference is small. > > Then, after it reports and clears the aggregated access frequency of > > each region, it splits each region into two or three regions if the > > total number of regions will not exceed the user-specified maximum > > number of regions after the split. > > > > In this way, DAMON provides its best-effort quality and minimal overhead > > while keeping the upper-bound overhead that users set. > > > > Signed-off-by: SeongJae Park > > Reviewed-by: Leonard Foerster > > The high level comment I have is that kdamond_[merge|split]_regions > should be part of the abstraction of the target instead of the damon > context. Agreed in a high level. Please refer to my answer to your second suggestion at https://lore.kernel.org/linux-mm/20201126115157.6888-1-sjpark@amazon.com/ Thanks, SeongJae Park