Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp351338ybi; Thu, 11 Jul 2019 20:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZ2rhymaAf68hZlNvbuLPq8k0FaLkE04lIeqq9K+bXc0eujiR/lgr59EPOgRrkX5vUoytV X-Received: by 2002:a17:902:2ac7:: with SMTP id j65mr8820389plb.242.1562903065720; Thu, 11 Jul 2019 20:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562903065; cv=none; d=google.com; s=arc-20160816; b=bL6nl2etHxfnM/NU8m7nFD3pnZPL3rUGR/C7hVvrCCQCp7TYu3xH2QrVtIc8QuaQkz DMhYooB78LD0V1Qa33P8k7DpL75N2x3fp1mvsVZHM9PoRZYouR66wHnS9k0znAuVPhQh hWMhiH0bCfbavvhqXViBmnAP4u06wgBLZE/7SH3yqHgoMFV3T7lTDR4jwyhcLD03DpX1 ieIfvCE99je3FyYGsD7Yfg7Ey5lG3DZG78m69rkYV27ClyW8uhyw1/RCAIZ9jP9VKpBV yni14IEhSOfneuxdqhCU1Bonybq07P3m+he2u/3wbqJrH+muc57RvDfAwHBnxR3OYCcR GIWQ== 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=g8H/X8ff/A+QKjFqoSkOCnx1O+oH9fs8Jz3g8pAxk4E=; b=uvGtnnJjKXMTKt7LRkbVR53o9sAd0AnNc+IWx5MbCVqACi91W/ot1BFwzcaW8taGO5 quhRFkrR2jld0XBIeYiaEC9nAqN6L6fW6g/ClkYnhl5kXPwaOpaYGKJVotv0fwIklBM1 xMNHse8TfrZ8WL1nD3pg0p7N53LDWLvo82bPNKYPy0HMcNF7mT899kPpMCgjs6wEms54 sqN1esOzN+z5G7SePQeSCzDtxiKlQ5gq8nU5ZrPQFEVBYslctdiBrffGtW4irnzPSkAN M4/NZX/y/yyKZTKGNKVI5fulClbNdGsxLRZo5B4VJ0hjlEtDDE5k+yQj+HNwd+HLu9VR gaMw== 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 186si6925481pgc.248.2019.07.11.20.44.09; Thu, 11 Jul 2019 20:44:25 -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 S1729510AbfGLDnW (ORCPT + 99 others); Thu, 11 Jul 2019 23:43:22 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:46903 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729293AbfGLDnV (ORCPT ); Thu, 11 Jul 2019 23:43:21 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07417;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0TWfco61_1562902997; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0TWfco61_1562902997) by smtp.aliyun-inc.com(127.0.0.1); Fri, 12 Jul 2019 11:43:18 +0800 Subject: Re: [PATCH 1/4] 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, mcgrof@kernel.org, keescook@chromium.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, Mel Gorman , riel@surriel.com References: <209d247e-c1b2-3235-2722-dd7c1f896483@linux.alibaba.com> <60b59306-5e36-e587-9145-e90657daec41@linux.alibaba.com> <3ac9b43a-cc80-01be-0079-df008a71ce4b@linux.alibaba.com> <20190711134754.GD3402@hirez.programming.kicks-ass.net> From: =?UTF-8?B?546L6LSH?= Message-ID: Date: Fri, 12 Jul 2019 11:43:17 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190711134754.GD3402@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/7/11 下午9:47, Peter Zijlstra wrote: [snip] >> + rcu_read_lock(); >> + memcg = mem_cgroup_from_task(p); >> + if (idx != -1) >> + this_cpu_inc(memcg->stat_numa->locality[idx]); > > I thought cgroups were supposed to be hierarchical. That is, if we have: > > R > / \ > A > /\ > B > \ > t1 > > Then our task t1 should be accounted to B (as you do), but also to A and > R. I get the point but not quite sure about this... Not like pages there are no hierarchical limitation on locality, also tasks running in a particular group have no influence to others, not to mention the extra overhead, does it really meaningful to account the stuff hierarchically? Regards, Michael Wang > >> + rcu_read_unlock(); >> +} >> +#endif