Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp367427ybb; Wed, 1 Apr 2020 01:23:19 -0700 (PDT) X-Google-Smtp-Source: APiQypLY2L1C6Rp2MNNCj53r2SKhfTpv36VuxNAlTXDOZRs7tgeBPlLPzMcLTRLpXkkk+SD5hRtP X-Received: by 2002:aca:fcd8:: with SMTP id a207mr2085949oii.56.1585729398978; Wed, 01 Apr 2020 01:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585729398; cv=none; d=google.com; s=arc-20160816; b=qVITZw2NdkOr5lVPYf6iSxgy1WaQNIDdJWyF4zRBZ/1oA0EN83zPmIOFl/gdaRN3YD cySoplkOhDTy7URjfc1Gmsf49lchGwWwm+RgwpGvthbjIozh5YW0uvVXw38fdFOwa4ur hwaUw4I+EDAJ2VPATewdXRFb787iFZcOnt8vFfKwPV5Bof+scWRZohYWMFlsiIVO50TL t28k96WpgLpe9DhXr8Jp/a+HnJ5pCiEGgn6tgNOhiNiIRfwSR471aCLLDvke/5JA83xx 4fY1d2fjjb0OKMTqgAaYMRZTts0wzRBTjkgpPoq5qi18/t/2GlCKP9EtFwSb0jb29OG/ 10RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:dkim-signature; bh=J0S4DL9mCxwT+hAkweovoiwr/8l14+JA8SrvT6gRPNQ=; b=tLc3thuYWssQMsxeePsmckpono4J0v4hCUJW8l5Kj/Hvl4GoJDv/fZ5Xh8ujYVDMBf mdDwT1lcgcufOUIoPub8cBctMCxJ6Ldy1Satc3AJ6Sp4R6kHCEYIhtn/25p/uIRBtySq R842JZvO9Uay1iCMbiP2f6GcA9V6GMbqZ2imOgu2poKxe90wNSEa92lcV0qbB9ajCEgF uodMhzzQ2FBbZWu/sFLf0FvjDxwAvPXj4tVHmjwlNvCbruSAFGfDjL7y1+qvFfPy+5jL Ak7jANgmuTUh75dgd6VDU00QC7GLsdJ4/vzvs6rgyegwdTyOb5sZkX61GIjeGPOKiuWd Co2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=qPPQsTnj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z139si459217ooa.70.2020.04.01.01.23.06; Wed, 01 Apr 2020 01:23:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=qPPQsTnj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1731594AbgDAIWn (ORCPT + 99 others); Wed, 1 Apr 2020 04:22:43 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:46444 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbgDAIWn (ORCPT ); Wed, 1 Apr 2020 04:22:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1585729362; x=1617265362; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=J0S4DL9mCxwT+hAkweovoiwr/8l14+JA8SrvT6gRPNQ=; b=qPPQsTnjyDp5Mq8ISRXvB2+WOkHjEvtKmOO2RFpR7+lnD1xhGEV/zOvL OdrnkS5dG2ecHe2Ncswzsmo16thS9sQ9xQimQxfDZFeR31dSIXa2Y/BWf 7NbY/m/nkTCWbDwdJlrC9idualfKm0ug4n3qbApKAxg60QWeoRLoWtWZ7 Y=; IronPort-SDR: s9KoWN8K5QgmRvuUHAFPWzhNO3NQk6hDfHxY0UJlBb55RZ5TdJJbJvTa9jy0J/w/eZBM2Z1Zjy xo8NaQYsP+9g== X-IronPort-AV: E=Sophos;i="5.72,330,1580774400"; d="scan'208";a="25060967" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-67b371d8.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 01 Apr 2020 08:22:30 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-67b371d8.us-east-1.amazon.com (Postfix) with ESMTPS id C6450A16D3; Wed, 1 Apr 2020 08:22:19 +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.1497.2; Wed, 1 Apr 2020 08:22:19 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.162.134) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Apr 2020 08:22:05 +0000 From: SeongJae Park To: Jonathan Cameron CC: SeongJae Park , , , , SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: Re: [RFC v5 0/7] Implement Data Access Monitoring-based Memory Operation Schemes Date: Wed, 1 Apr 2020 10:21:50 +0200 Message-ID: <20200401082150.21124-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200331173908.0000696f@Huawei.com> (raw) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.134] X-ClientProxiedBy: EX13D37UWC004.ant.amazon.com (10.43.162.212) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 31 Mar 2020 17:39:08 +0100 Jonathan Cameron wrote: > On Tue, 31 Mar 2020 18:18:19 +0200 > SeongJae Park wrote: > > > On Tue, 31 Mar 2020 16:51:55 +0100 Jonathan Cameron wrote: > > > > > On Mon, 30 Mar 2020 13:50:35 +0200 > > > SeongJae Park wrote: > > > > > > > From: SeongJae Park > > > > > > > > DAMON[1] can be used as a primitive for data access awared memory management > > > > optimizations. That said, users who want such optimizations should run DAMON, > > > > read the monitoring results, analyze it, plan a new memory management scheme, > > > > and apply the new scheme by themselves. Such efforts will be inevitable for > > > > some complicated optimizations. > > > > > > > > However, in many other cases, the users could simply want the system to apply a > > > > memory management action to a memory region of a specific size having a > > > > specific access frequency for a specific time. For example, "page out a memory > > > > region larger than 100 MiB keeping only rare accesses more than 2 minutes", or > > > > "Do not use THP for a memory region larger than 2 MiB rarely accessed for more > > > > than 1 seconds". > > > > > > > > This RFC patchset makes DAMON to handle such data access monitoring-based > > > > operation schemes. With this change, users can do the data access awared > > > > optimizations by simply specifying their schemes to DAMON. [...] > > > > > > > > Efficient THP > > > > ~~~~~~~~~~~~~ > > > > > > > > THP 'always' enabled policy achieves 5.57% speedup but incurs 7.29% memory > > > > overhead. It achieves 41.62% speedup in best case, but 79.98% memory overhead > > > > in worst case. Interestingly, both the best and worst case are with > > > > 'splash2x/ocean_ncp'). > > > > > > The results above don't seems to support this any more? > > > > > > > runtime orig rec (overhead) thp (overhead) ethp (overhead) prcl (overhead) > > > > splash2x/ocean_ncp 86.927 87.065 (0.16) 50.747 (-41.62) 86.855 (-0.08) 199.553 (129.57) > > > > Hmm... But, I don't get what point you meaning... In the data, column of 'thp' > > means the THP 'always' enabled policy. And, the following column shows the > > overhead of it compared to that of 'orig', in percent. Thus, the data says THP > > 'always' enabled policy enabled kernel consumes 50.747 seconds to finish > > splash2x/ocean_ncp, while THP disabled original kernel consumes 86.927 seconds. > > ah. I got myself confused. > > However, I was expecting to see a significant performance advantage > to ethp for this particular case as we did in the previous version. > > In the previous version (you posted in reply to v6 of Damon), for ethp we had a significant gain with: > > runtime orig rec (overhead) thp (overhead) ethp (overhead) prcl (overhead) > splash2x/ocean_ncp 81.360 81.434 (0.09) 51.157 (-37.12) 66.711 (-18.00) 91.611 (12.60) > > So, in ethp we got roughly half the performance back (at the cost of some of the memory) > > That was a result I have been trying to replicate, hence was at the front of my mind! > > Any idea why that changed so much? Ah, I forgot to explain about this change. Thank you for let me know. Overall, ETHP in DAMON-based Operations Schemes RFC v5 shows worse peak performance gains. For example, splash2x/fft shows best case speedup with ETHP for both this version and previous version. The speedup changed from 19% to 12%. In case of splash2x/ocean_ncp, it changed from 18% to only 0.08%. That said, total performance speedup is improved. It was 1.83% before, and 2.21% now. Also, there are several workloads showing better speedup. In case of parsec3/canneal, the speedup changed from 3.86% to 6.34%. Also note that ETHP's memory savings for the workloads showing less speedup are much improved. For example, the memory overhead of ETHP for splash2x/ocean_ncp was 24.4% before, but only 3.5% now. This is due to the fact that I didn't update the schemes for the updated DAMON. Basically, the effect of the schemes are access pattern dependent. In this case, because DAMON has changed so that it might report access pattern that different from that of previous version, the schemes should also be modified to make best performance. However, I didn't update the schemes because those are for only proof of the concepts, not for productions. The change of report was not so huge, fortunately. I also confirmed this with my human eyes by comparing the visualized access patterns of the two version. The overall trend (better performance, less memory overhead) also changed only subtle. However, some individual workloads got some remarkable changes. Thanks, SeongJae Park > > Thanks, > > Jonathan > > > > Thus, the overhead is ``(50.747 - 86.927) / 86.927 = -0.4162``. In other > > words, 41.62% speedup. > > > > Also, 5.57% speedup and 7.29% memory overhead is for _total_. This data shows > > it. > > > > > > runtime orig rec (overhead) thp (overhead) ethp (overhead) prcl (overhead) > > > > total 3020.570 3028.080 (0.25) 2852.190 (-5.57) 2953.960 (-2.21) 3276.550 (8.47) > > > > Maybe I made you confused by ambiguously saying this. Sorry if so. Or, if I'm > > still misunderstanding your point, please let me know. > > > > > > > > Thanks, > > SeongJae Park > > > > [...] >