Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3332380yba; Tue, 23 Apr 2019 01:46:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXAbGJ560plV+WtWf3fNWXUtRqb85SH7ea5IgXLypiZ3G/4mTTvGAmYYxmURUTOx+PrBFD X-Received: by 2002:a65:524a:: with SMTP id q10mr22689970pgp.224.1556009171090; Tue, 23 Apr 2019 01:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556009171; cv=none; d=google.com; s=arc-20160816; b=ue7W2G30Q5GoS41Gr+DyyDdNKw21wp1agrijDxWT3AhS2KEazz3sDBhJMIucLSnmi0 VUU9KklGbtf+uW8mUJRQOWfXh6E4JCEuROyneigczIRLM+5tPh6R22o24zCgldbvFddh CaWS92mM5/bW4V6zadvlTsBof/uXyB/UkwQpDgl+EnuM2Kq4G3sCtzPyZNqlX1JmFmTV dcv6KqfCYcmx8rrmpIo/w4aZbiaktevNZxzYj3D+rgNrzSbg7cDb29LM0tbpFki6xaH7 t8k6a7n7mJOYeYShJTx2bjEcuGo0bpLKhNXHSbEBI0ed9C2Aj3pYkNq0+tP5uWphS3pg tFBw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uAxn3VVyRKikiswAJvxQH1wVrtz0xNI5a8VqqF5heXY=; b=DONMasesJnjYqn935PWvYn19oh43X+RLU2K4I7Hl0z0Cf/QM/bc67ux4gdX1iPooLr 46K4fAEScySrw/ymQA8bZNu8xBsQOOAiDotlm0ZyBphDfSPGQtZTKZrpffW9yHTlUQKN iH1QauCt37nXsNIDdLtB7SHMigR86brsfApfOsOUX5Lzi2y6K48uN1REP5wMSzl1ZpRJ KWIuDNK8BWg44AH8MzbsA9hyKwcyqfGNgk1D4d5ZwSttVtjzYVNJs0XUcOL/RxBgJzQX lofH9R+qHbaoSD3+q1MUNkOjh9/pFL7BcI2BeJxfmhpMYiY2fwHTEmX5X+M7GuRsOd15 kvoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=WJp4EToc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 13si14972019pgz.9.2019.04.23.01.45.55; Tue, 23 Apr 2019 01:46:11 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=WJp4EToc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbfDWIoy (ORCPT + 99 others); Tue, 23 Apr 2019 04:44:54 -0400 Received: from merlin.infradead.org ([205.233.59.134]:46408 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbfDWIox (ORCPT ); Tue, 23 Apr 2019 04:44:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uAxn3VVyRKikiswAJvxQH1wVrtz0xNI5a8VqqF5heXY=; b=WJp4ETocMlz7U+l2fuVy1dHNLi Cghs8JjIVAP8D5vrS+XN00r39FmEx1x3GS1b2zvbTdQQmdrV5ud4qB/sYhZ6HatUcX4vkXjPGvEiV QpmVrX3hYNGl9Ju/XGiuCAsKNgcMpJWKrwmn1KZacXdT2NDopgd7sYr81DvoYOYr1alN9tRW7eeUP Yrpf6CCsW+jHicS+42VLlwE7jltSE30bPNSqa0fPDgwUQV+PWRgVWlUyAbcqurGzMIU5TLRUUId8S /p5IfpLm0hoW+3LQr700/cxtpJgLqhflkyXFUDnZQ2Tkh9d4IzuMIx7GLKVAykSMjDerCL5Ugfc4h oIvAsw7w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIr2k-0001DH-2O; Tue, 23 Apr 2019 08:44:46 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CE85329B47DC7; Tue, 23 Apr 2019 10:44:44 +0200 (CEST) Date: Tue, 23 Apr 2019 10:44:44 +0200 From: Peter Zijlstra To: =?utf-8?B?546L6LSH?= Cc: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, Ingo Molnar , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 1/5] numa: introduce per-cgroup numa balancing locality, statistic Message-ID: <20190423084444.GB11158@hirez.programming.kicks-ass.net> References: <209d247e-c1b2-3235-2722-dd7c1f896483@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Mon, Apr 22, 2019 at 10:11:24AM +0800, 王贇 wrote: > +#ifdef CONFIG_NUMA_BALANCING > + > +enum memcg_numa_locality_interval { > + PERCENT_0_9, > + PERCENT_10_19, > + PERCENT_20_29, > + PERCENT_30_39, > + PERCENT_40_49, > + PERCENT_50_59, > + PERCENT_60_69, > + PERCENT_70_79, > + PERCENT_80_89, > + PERCENT_90_100, > + NR_NL_INTERVAL, > +}; > + > +struct memcg_stat_numa { > + u64 locality[NR_NL_INTERVAL]; > +}; If you make that 8 it fits a single cacheline. Do you really need the additional resolution? If so, then 16 would be the next logical amount of buckets. 10 otoh makes no sense what so ever.