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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 BD176C63697 for ; Thu, 26 Nov 2020 12:19:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63BD52087C 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="Hox05Ywx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730727AbgKZMT5 (ORCPT ); Thu, 26 Nov 2020 07:19:57 -0500 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:26898 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729257AbgKZMT5 (ORCPT ); Thu, 26 Nov 2020 07:19:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1606393196; x=1637929196; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=p0/xkxLXkEdm/1gb/+u5+pqssnjdPH8RP/0kpost/VQ=; b=Hox05Ywxn3VX6XYH3WbGVHZ6rW7A6A8wuzcaBCaxcpCqP8r2q20OfnEH EZXgRNO7KRLfimylwUETVvMF27d5P9u8T4aqBgSWVVYHDYNrvaYpQske8 RyqCLMSQJvKgd4PqMgmfai2WWhPTnLYVO0Ho0ukfvcoOAF7d3e5AMAWiC 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >