Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1146330pxu; Fri, 27 Nov 2020 00:23:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjkyXl4O8pxQ9qyZhZgjfs83VLbNeUoDMoka/FAf06SKgOvkMDE3NfKFrZWS+vBXDdUhk2 X-Received: by 2002:a17:906:4994:: with SMTP id p20mr6503594eju.391.1606465388982; Fri, 27 Nov 2020 00:23:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606465388; cv=none; d=google.com; s=arc-20160816; b=m54yRTH3pZf/lHMkmbTBFvEumwe57hcUqdfInwQ2m1U7PeITKX1htV20gQInfQuSSc M8HUwMKXjmD19yJtJSBc0oAEmhJ+EA3UfeLlQLNcNsSAjzdlN6Gqj+rgEfF0A8ASKYA+ Q4Nk/KvvJebOVXT9NT/LW7BKY2Vypa7TEU2qBc0aZnDyVc/pyHKC1igPecuUUjvpZscB yG4i01hcshNN/136YKPBv9QnEn49gNdgHIFRvbAd8pld1frpaTAfg7AhRTHb89F93kR+ 6poMIBgmzyP2o/Fy+rMOTwKUENrukKDFt0nmvcZWxEEwF/cpArzBh/++sfgTS1j59rk5 9tQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=p0/xkxLXkEdm/1gb/+u5+pqssnjdPH8RP/0kpost/VQ=; b=aXVxiuNRaSdWjUr9Omp6CQj78czCJB3485oWE7JoYGO5nERwCqBiVoSROguG4e8ST3 dpBhDoNFueWflm6lNnRtg6evsx/zYiFfqWwQXcscQabqMNhTSadYSiHkQt0kRZo2KjMh RN//gO3ghi7vJoXRFho7nD7Ob1K2gRih/8JNjMtFeAPD+u3V5/kj2GI2sox5/2GdFY97 B20vUQnOZq/P1zFBoE/A6uW2zMm4IDstanp8euUZJbd3AzqA56za9LFEoublDISh8UIW ZjGad1PnbVBmzzjgOsEvk3/yIQMzy7gAQxpK5zfRmjem/n6DIgE9SjPqewQ5MoQJQWX7 VqsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=Hox05Ywx; 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 u17si4702355edv.131.2020.11.27.00.22.46; Fri, 27 Nov 2020 00:23:08 -0800 (PST) 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=Hox05Ywx; 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 S1730376AbgKZMT5 (ORCPT + 99 others); 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 > >