Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3369812yba; Tue, 23 Apr 2019 02:35:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO+5COqx7fue0CeG3IW1P2qHU+ZxGvBktKYfr4kJBRciYawC79AfAewQzpXra/kfkhd8NZ X-Received: by 2002:a17:902:bb84:: with SMTP id m4mr24302709pls.302.1556012101075; Tue, 23 Apr 2019 02:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556012101; cv=none; d=google.com; s=arc-20160816; b=HbVKtHFdJbPOiK4thIMbUasjTLF7ULLslSUyU4CoNOdObMHfdgsZ8xnyVLjF660M7Z 2jVi7YYsoKdmREkIgLKUJsJHZt/kThDCHU8oKAH/TaDdlJZvCMPfa7BQCeISstcCEgJd tY4l3NZNLlVL8wuU4FwcBbZ170dCGK23twp+dOtZR+VQKYnXRJYhqez+6qFI+RoI3e5c nLTdA6iHs8apf3TZLsScHPRQ7qdBYs4lhuj1mNpmqZWWZ45A5UK7bvNbMQ3foHICD9x6 ViJ2FrZivx4OJnk69QggakghuqY65TjXuUis2yECfSA5TDQ8H9fGI2nKBerhGVO46IS+ 55yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=OeltTJznnL+Qbgdl4mblDCbAYRu8rp0XhfBvj6FWeL4=; b=fM5FuX9IEWnZXIO/fUueD+3SYA75d9kFfkBK6Qx7OEoLZpnfBD3jhILLs0uBff9CGH XZFQ1x2+YWSJIPuilqUXyLNKn+oQDHjVjOg9IDjA0bPGgtLgLKrUWCRNLjImXueyHlIe YxTw74U78fza2zBCOERoBW/yAcJo4GED0XKmx39tLNT9mO9mTYpVlvN22KzlmUnwZThY DyIMy0AaRiKzUt0RNV47mo86PC2zasxD4rFdZ3brJNuq/5gKyv/UtkUahCie87hrSdEz U6+adW/3RfGtcZzJGXfyJjm7QA4ZjHa8GBrVpsVCdX8GSBWliQ6FfrKopZ0S6CYlpcvh L2Pg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i19si15765782pfr.246.2019.04.23.02.34.46; Tue, 23 Apr 2019 02:35:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727016AbfDWJce (ORCPT + 99 others); Tue, 23 Apr 2019 05:32:34 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:10428 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfDWJcd (ORCPT ); Tue, 23 Apr 2019 05:32:33 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0TQ1gXzQ_1556011948; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0TQ1gXzQ_1556011948) by smtp.aliyun-inc.com(127.0.0.1); Tue, 23 Apr 2019 17:32:29 +0800 Subject: Re: [RFC PATCH 1/5] numa: introduce per-cgroup numa balancing locality, statistic To: Peter Zijlstra Cc: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, Ingo Molnar , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <209d247e-c1b2-3235-2722-dd7c1f896483@linux.alibaba.com> <20190423084633.GC11158@hirez.programming.kicks-ass.net> From: =?UTF-8?B?546L6LSH?= Message-ID: Date: Tue, 23 Apr 2019 17:32:28 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190423084633.GC11158@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/23 δΈ‹εˆ4:46, Peter Zijlstra wrote: > On Mon, Apr 22, 2019 at 10:11:24AM +0800, ηŽ‹θ΄‡ wrote: >> + * 0 -- remote faults >> + * 1 -- local faults >> + * 2 -- page migration failure >> + * 3 -- remote page accessing after page migration >> + * 4 -- local page accessing after page migration > >> @@ -2387,6 +2388,11 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags) >> memset(p->numa_faults_locality, 0, sizeof(p->numa_faults_locality)); >> } >> >> + p->numa_faults_locality[mem_node == numa_node_id() ? 4 : 3] += pages; >> + >> + if (mem_node == NUMA_NO_NODE) >> + return; > > I'm confused on the meaning of 3 & 4. It says 'after page migration' but > 'every' access if after 'a' migration. But even more confusingly, you > even account it if we know the page has never been migrated. > > So what are you really counting Here is try to get the times of a task accessing the local or remote pages, and on no migration cases we still account since it's also one time of accessing, remotely or locally. 'after page migration' means this accounting need to understand the real page position after PF, what ever migration failure or succeed, whatever page move to local/remote or untouched, we want to know the times a task accessed the page locally or remotely, on numa balancing period. Regards, Michael Wang >