Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp657857ybz; Fri, 17 Apr 2020 07:48:42 -0700 (PDT) X-Google-Smtp-Source: APiQypJgJkB4LwhV8cBbUgVEU0ZXFE+6oUdCtV24KzgZUoHfxHoZCQ6EBV67qJfKuzQX+V158dlt X-Received: by 2002:a05:6402:14c1:: with SMTP id f1mr3389272edx.221.1587134922413; Fri, 17 Apr 2020 07:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587134922; cv=none; d=google.com; s=arc-20160816; b=0HZz3HUfu80bLpN6hFaiustzoiXwDe3esVfTClzxndW8GUDs7A3fZvfPfBzRvFGb6A a2xM74zDo9woH6AIsivdtFhiioacsbQAHvLjbgg/fKxqmgkejs34vJ+BAUb0QiyOaVLO u8zdapNK0IUxPTrbfW9+2eeeAmYx336Niox91VNNTnjU4J8I1Ls3jfXNNzBUa+5UH89t JCN+FRtmI/y9VfRGg5We6Ps7sFNXKsJtl5HO1ZGSsnLf8fH77Vt4ni3vzvybqF8LuLKV kCeC/IcvaovaRcaILSW6Qv5I3jJniArK2NZsM+qk6zq9wdUt2+k1/czacpkd5VVAm5+V nu8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=b1m5153oQruAVMbroXNX9feig55njmXEyz86LTkkd8s=; b=zXu1vecJFpnOAnAFXn4GZHkoQnLj1rkqtibXiLmcAbCVmokJ+gkw6wtTBnKPdpou6O uab72bJfuc6JvfD5xGJMcd+TDwBnYMTgCpEGtveLz2RvIm5oOl6Uvb6KbFYY+j7nCfEA zM+tj0R31YqnSO1aeHFFAhJBf+PhGzkgGq9rM0WyOWyhWjqpTOWKMG+KVmQZBo5oAnRn ZN8PsKrZjGtqiHw1o1+YnccUkAM4WcPWW8/E945i+R4il7bvvssoOHM1RSEwmAUeOGhG Qea13/LWbgZFGfnz91gY23R+bnBL1Gbm/7EEZoUZecUnE1ct/8KaMr6aQHH69ZMupgED DGtw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz23si13369686ejb.306.2020.04.17.07.48.19; Fri, 17 Apr 2020 07:48:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728032AbgDQOqb (ORCPT + 99 others); Fri, 17 Apr 2020 10:46:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:43294 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbgDQOqb (ORCPT ); Fri, 17 Apr 2020 10:46:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 22DA4AB64; Fri, 17 Apr 2020 14:46:29 +0000 (UTC) Date: Fri, 17 Apr 2020 15:46:26 +0100 From: Mel Gorman To: SeongJae Park Cc: Mel Gorman , Peter Zijlstra , "Huang, Ying" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ingo Molnar , Rik van Riel , Daniel Jordan , Tejun Heo , Dave Hansen , Tim Chen , Aubrey Li Subject: Re: Re: Re: Re: [RFC] autonuma: Support to scan page table asynchronously Message-ID: <20200417144626.GA3711@suse.de> References: <20200417121629.GA3758@techsingularity.net> <20200417124437.25445-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20200417124437.25445-1-sjpark@amazon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 17, 2020 at 02:44:37PM +0200, SeongJae Park wrote: > On Fri, 17 Apr 2020 13:16:29 +0100 Mel Gorman wrote: > > > On Fri, Apr 17, 2020 at 12:21:29PM +0200, SeongJae Park wrote: > > > On Fri, 17 Apr 2020 12:04:17 +0200 Peter Zijlstra wrote: > > > > > > > On Fri, Apr 17, 2020 at 09:05:08AM +0200, SeongJae Park wrote: > > > > > I think the main idea of DAMON[1] might be able to applied here. Have you > > > > > considered it? > > > > > > > > > > [1] https://lore.kernel.org/linux-mm/20200406130938.14066-1-sjpark@amazon.com/ > > > > > > > > I've ignored that entire thing after you said the information it > > > > provides was already available through the PMU. > > > > > > Sorry if my answer made you confused. What I wanted to say was that the > > > fundamental access checking mechanism that DAMON depends on is PTE Accessed bit > > > for now, but it could be modified to use PMU or other features instead. > > > > I would not be inclined to lean towards either approach for NUMA > > balancing. Fiddling with the accessed bit can have consequences for page > > aging and residency -- fine for debugging a problem, not to fine for > > normal usage. I would expect the PMU approach would have high overhead > > as well as taking over a PMU counter that userspace debugging may expect > > to be available. > > Good point. But, isn't it ok to use Accessed bit as long as PG_Idle and > PG_Young is adjusted properly? Current DAMON implementation does so, as > idle_page_tracking also does. > PG_idle and PG_young are page flags that are used by idle tracking. The accessed bit I'm thinking of is in the PTE bit and it's the PTE that is changed by page_referenced() during reclaim. So it's not clear how adjusting the page bits help avoid page aging problems during reclaim. Maybe your suggestion was to move NUMA balancing to use the PG_idle and PG_young bits from idle tracking but I'm not sure what that gains us. This may be because I did not look too closely at DAMON as for debugging and analysis, the PMU sounded more suitable. It's not clear to me how looking at the page or pte bit handling of DAMON helps us reduce the scanning cost of numa balancing. There may be some benefit in splitting the address space and rescanning sections that were referenced but it has similar pitfalls to simply tracking the highest/lowest address that trapped a NUMA hinting fault. -- Mel Gorman SUSE Labs