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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FA8AC433EF for ; Fri, 18 Feb 2022 08:03:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA6D06B0074; Fri, 18 Feb 2022 03:03:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A570F6B0075; Fri, 18 Feb 2022 03:03:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 91E3D6B0078; Fri, 18 Feb 2022 03:03:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 8055D6B0074 for ; Fri, 18 Feb 2022 03:03:47 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 402A0944EA for ; Fri, 18 Feb 2022 08:03:47 +0000 (UTC) X-FDA: 79155161694.07.F9F6415 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf03.hostedemail.com (Postfix) with ESMTP id 968562000A for ; Fri, 18 Feb 2022 08:03:46 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4A06CB81C21; Fri, 18 Feb 2022 08:03:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62357C340E9; Fri, 18 Feb 2022 08:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645171424; bh=1fBC7GGSjQURm/YJ/N2eyc/koN7mPuNwXAIqCpJshIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=VrXQ4IarbaSq+cKXFQjdKD/3DM8YR2Vo3FUlXSiOJlasS7m8fgxIWGqEBiHvW/ei3 L7YKgteVEhbctagLZLsppu/DQDOQoxy2qTtZsrCaJ8xtIZW/JCv4Ep2Y82kejdYQRf wrQBZIXXm+VGRjmfF/nAKLhgdxxbmCVUfR/oUTVuXH61RaTCiS8gA1i5v3PhhyYglF Cdsaf15VqKshWJP4cb/CiJvbOs9WKTPjElL1hevFic9xpdWV5p/6yW7O+AzU25AHSM WvcN5bYcVvwasctX6AK9GIVmb/3Eqo1lXwt0d6xJZpC+H+X+gGLaqn5munOzTU2TBw L3ICTCx2tkjRA== From: SeongJae Park To: Xin Hao Cc: SeongJae Park , rongwei.wang@linux.alibaba.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, rientjes@google.com, linux-damon@amazon.com Subject: Re: [RFC PATCH V1 0/5] mm/damon: Add NUMA access statistics function support Date: Fri, 18 Feb 2022 08:03:40 +0000 Message-Id: <20220218080340.11566-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 In-Reply-To: <503fa0b1-be20-a17e-72f0-14b38c0dc719@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 X-Rspamd-Queue-Id: 968562000A X-Stat-Signature: rni3qe1faato3xdjyurr147mfwehmks1 Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=VrXQ4Iar; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1645171426-925987 Content-Transfer-Encoding: quoted-printable 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 Fri, 18 Feb 2022 10:21:27 +0800 Xin Hao wrote= : > Hi SeongJae: >=20 > On 2/17/22 4:29 PM, SeongJae Park wrote: > > + David Rientjes, who has shown interest[1] in this topic. > > > > [1] https://lore.kernel.org/linux-mm/bcc8d9a0-81d-5f34-5e4-fcc28eb7ce= @google.com/ > > > > --- > > > > Hi Xin, > > > > > > Thank you always for great patches! > > > > On Wed, 16 Feb 2022 16:30:36 +0800 Xin Hao w= rote: > > [...] > > I'd like to comment on the high level design at the moment. To my > > understanding, this patchset extends DAMON core and monitoring operat= ions for > > virtual address spaces (vaddr) and the physical address space (paddr)= to > > monitor NUMA-local/remote accesses via PROT_NONE and page faults mech= anism. > > > > The underlying mechanism for NUMA-local/remote accesses (PROT_NONE an= d page > > fault) looks ok to me. But, changes to the core and vaddr/paddr oper= ations > > looks unnecessary, to me. That's also not for general use cases. > You are right, adding NUMA access statistics does make the PA & VA code= s=20 > look confusing=E3=80=82 > > > > I think it would be simpler to implment more monitoring operations fo= r NUMA > > monitoring use case (one for NUMA-local accesses accounting and anoth= er one for > > NUMA-remote accesses accounting), alongside vaddr and paddr. Then, u= sers could > > configure DAMON to have three monitoring contexts (one with vaddr ops= , second > > one with numa-local ops, and third one with numa-remote ops), run tho= se > > concurrently, then show the three results and make some decisions lik= e > > migrations. >=20 > Thanks for your advice, I will implement these in the next version, But= =20 > from my understanding or maybe >=20 > I didn't get what you were thinking, I think only one monitor context i= s=20 > needed for NUMA Local & Remote, >=20 > Do not need a separate implementation like "numa_local_ops" and=20 > "numa_remote_ops", just set "numa_access_ops" is ok. Sorry for insufficient explanation of my concern. In short, I'm concerni= ng about the regions adjustment. You may do so by storing NUMA-local access count and NUMA-remote access count in the nr_acceses filed of each region, e.g., saving NUMA-local acc= ess count in upper-half bits of nr_accesses and saving NUMA-remote access cou= nt in the lower-half bits. However, then DAMON will do the regions adjustment = based on the NUMA-local/remote accesses count mixed value, so the accuracy woul= d be degraded. So I think we need to implement each monitoring operations set= for each accesses that we want to monitor. >=20 > > > > One additional advantage of this approach is that the accuracy for > > NUMA-local/remote accessed could be better, because the contexts conf= igured to > > use NUMA-local/remote monitoring ops will do the regions adjustment w= ith > > NUMA-local/remote accesses (to my understanding, this patchset let re= gions have > > NUMA-local/remote accesses counter in addition to the total one, but = still use > > only the total one for the regions adjustment). My previous comment above might help clarifying my concern. If I'm missing something, please let me know. Thanks, SJ > > > > If I'm missing something, please let me know. > > > > > > Thanks, > > SJ > > > >> -- > >> 2.27.0 >=20 > --=20 > Best Regards! > Xin Hao >=20