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=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 C206AC10F27 for ; Tue, 10 Mar 2020 11:54:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7FDEE24696 for ; Tue, 10 Mar 2020 11:54:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="iLBCfvHB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FDEE24696 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 12F316B000A; Tue, 10 Mar 2020 07:54:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E0BA6B000D; Tue, 10 Mar 2020 07:54:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01D006B000E; Tue, 10 Mar 2020 07:54:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DEB206B000A for ; Tue, 10 Mar 2020 07:54:36 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E90FE6132 for ; Tue, 10 Mar 2020 11:54:36 +0000 (UTC) X-FDA: 76579295352.05.cough40_284293ca66f29 X-HE-Tag: cough40_284293ca66f29 X-Filterd-Recvd-Size: 4472 Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Mar 2020 11:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1583841276; x=1615377276; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=gezZ4d843S2nTlbh9azi04SsH51yHFiHn28vQPiIVl4=; b=iLBCfvHBtVhpDKdq4uiSHcPnA5jG5Y+JxnGWCTJF4UWUnP7IM6b7DfJe 4cCs2oyAIbGgq/4S00A5GznbsGhUbRmiZ00Xo0msYWmK8xXIjqgtrPyVr fNrXKjM5eTxWDUu2V1EUfJlDYdgKfLN0HjRhLfEr2xhs824dwx6xGmeeR o=; IronPort-SDR: H53N5QpDKI5MamzQr6yc0Yjhy9NaBhIYeKmGDRzv8TSaaHLlS9BjzeKh3xxENRdj94wrjCuZnU LXACy6IFyMvA== X-IronPort-AV: E=Sophos;i="5.70,536,1574121600"; d="scan'208";a="20840160" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1a-807d4a99.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 10 Mar 2020 11:54:23 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-807d4a99.us-east-1.amazon.com (Postfix) with ESMTPS id C4AFEA2B10; Tue, 10 Mar 2020 11:54:21 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Tue, 10 Mar 2020 11:54:21 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.160.16) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 10 Mar 2020 11:54:09 +0000 From: SeongJae Park To: Jonathan Cameron CC: SeongJae Park , , "SeongJae Park" , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: Re: [PATCH v6 04/14] mm/damon: Apply dynamic memory mapping changes Date: Tue, 10 Mar 2020 12:53:55 +0100 Message-ID: <20200310115355.23840-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200310090026.00005ea9@Huawei.com> (raw) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.16] X-ClientProxiedBy: EX13D15UWB004.ant.amazon.com (10.43.161.61) 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 Tue, 10 Mar 2020 09:00:26 +0000 Jonathan Cameron wrote: > On Mon, 24 Feb 2020 13:30:37 +0100 > SeongJae Park wrote: > > > From: SeongJae Park > > > > Only a number of parts in the virtual address space of the processes is > > mapped to physical memory and accessed. Thus, tracking the unmapped > > address regions is just wasteful. However, tracking every memory > > mapping change might incur an overhead. For the reason, DAMON applies > > the dynamic memory mapping changes to the tracking regions only for each > > of a user-specified time interval (``regions update interval``). > > > > Signed-off-by: SeongJae Park > Trivial inline. Otherwise makes sense to me. > [...] > > +static void damon_apply_three_regions(struct damon_ctx *ctx, > > + struct damon_task *t, struct region bregions[3]) > > +{ > > + struct damon_region *r, *next; > > + unsigned int i = 0; > > + > > + /* Remove regions which isn't in the three big regions now */ > > + damon_for_each_region_safe(r, next, t) { > > + for (i = 0; i < 3; i++) { > > + if (damon_intersect(r, &bregions[i])) > > + break; > > + } > > + if (i == 3) > > + damon_destroy_region(r); > > + } > > + > > + /* Adjust intersecting regions to fit with the threee big regions */ > > three Good eye! Thanks for finding :) [...]