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=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,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 81404C64E75 for ; Thu, 26 Nov 2020 12:19:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E45F120B80 for ; Thu, 26 Nov 2020 12:19:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="O13Kv3oF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E45F120B80 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 308416B0078; Thu, 26 Nov 2020 07:19:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B9536B007B; Thu, 26 Nov 2020 07:19:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15A6F6B007D; Thu, 26 Nov 2020 07:19:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id F37526B0078 for ; Thu, 26 Nov 2020 07:19:57 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A5FBF1EE6 for ; Thu, 26 Nov 2020 12:19:57 +0000 (UTC) X-FDA: 77526476034.09.birth53_5e00fce2737f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 8E9AF180AD81D for ; Thu, 26 Nov 2020 12:19:57 +0000 (UTC) X-HE-Tag: birth53_5e00fce2737f X-Filterd-Recvd-Size: 5421 Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 12:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1606393197; x=1637929197; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=p0/xkxLXkEdm/1gb/+u5+pqssnjdPH8RP/0kpost/VQ=; b=O13Kv3oFLfu0y0TRcQVz+LN+rJ8VtLx1GdGNt6R1kJhLAbRx2BpNAh4s MSoJvatKPPF7xTSyUrx4n8r8ywj4qqjiK7ZH4kGlhI1QqJyd8/DmeL35v 6Dp1qjBi9CEBlbH4YD9VIjarVWzVp7TGPZZaZZfUCQITAmNpr/8eFUHBm 0=; X-IronPort-AV: E=Sophos;i="5.78,372,1599523200"; d="scan'208";a="99441687" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1e-303d0b0e.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 26 Nov 2020 12:19:43 +0000 Received: from EX13D31EUA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-1e-303d0b0e.us-east-1.amazon.com (Postfix) with ESMTPS id 66F96A2252; Thu, 26 Nov 2020 12:19:31 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.160.229) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 26 Nov 2020 12:19:14 +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 04/18] mm/damon: Track dynamic monitoring target regions update Date: Thu, 26 Nov 2020 13:18:58 +0100 Message-ID: <20201126121858.19832-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.160.229] X-ClientProxiedBy: EX13D35UWC003.ant.amazon.com (10.43.162.130) 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:57 -0800 Shakeel Butt wrote: > On Tue, Oct 20, 2020 at 2:02 AM SeongJae Park wrote: > > > > From: SeongJae Park > > > > The monitoring target address range can be dynamically changed. For > > example, virtual memory could be dynamically mapped and unmapped. > > Physical memory could be hot-plugged. > > > > As the changes could be quite frequent in some cases, > > Which cases? Usually address space changes are very infrequent for > performance reasons. It depends on the application, but there are some cases for the mmap[1]. ebizzy, the popular benchmarks in mm community is also one such application. [1] Section 4.3, https://dl.acm.org/doi/pdf/10.1145/3342195.3387527 > > > DAMON checks the > > dynamic memory mapping changes and applies it to the abstracted target > > area only for each of a user-specified time interval, ``regions update > > interval``. > > > > Signed-off-by: SeongJae Park > > Reviewed-by: Leonard Foerster > [snip] > > * Check whether current monitoring should be stopped > > * > > @@ -612,6 +625,11 @@ static int kdamond_fn(void *data) > > kdamond_reset_aggregated(ctx); > > kdamond_split_regions(ctx); > > } > > + > > + if (kdamond_need_update_regions(ctx)) { > > + kdamond_call_prmt(ctx, update_target_regions); > > The implementation of update_target_regions callback should be part of > this patch. Agreed, will make so in the next version. Thanks, SeongJae Park > > > > + sz_limit = damon_region_sz_limit(ctx); > > + } > > } > > damon_for_each_target(t, ctx) { > > damon_for_each_region_safe(r, next, t) > > -- > > 2.17.1 > >