Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp324614ybx; Wed, 6 Nov 2019 17:49:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwjEIc39LuEnY9vIjWn5YY/Row4dGOQDXg8edb+Uh6p3GwxMI5z/M+sq64x3sRX1kKKyVci X-Received: by 2002:a17:906:66ce:: with SMTP id k14mr708863ejp.92.1573091399103; Wed, 06 Nov 2019 17:49:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573091399; cv=none; d=google.com; s=arc-20160816; b=PsUsa1MMbhgH1d/hel1yUkxW8GdSIJ4O3rsnzLU1XxYK0X9S2+sR0zvh1bGHhzYByA 5bT/BOEYGMcVvfXoYXQi38R1VkuLzw73URcrepff5eh1Esx+WmvwGWREfhJZfoy8bV58 qau+RNn9OUe5lzGEolnxYwjakv3T6bE3BKTXt91Y+558l/cbp2Hzgckvc7ZwXcCm9D5Z myffKJ8BxVZfwWYntNiXeGzKmMQVzQkurmpUWHZhbPXAxLWY760Of6zwqeHkNnvZCKAc /Vx2GgKv+3J6WO5FR/8zs7ZYWh3bMabf/h/uXW2QGiK3dYel9KhZ44f6p5yF4V247vWf RFLA== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=iK5BUc9b64zwoCEpP1o8zr5pwLcTn2W+IfGMVsKeub8=; b=xnF1C/8KVeznEUQUM7UikZDytRGIWHDApnu686VPfARERC7J28ufZAvSaensDI/GS/ AibDxjpJHwbcjnp/URHOJnI0oYGtHlPMOhHp8yvIYNTm145fylIZCG4vd+HeKthhNLkY MmLcoWQx8o3OKN0QbJLtNNdgdAqnKqos+DTmuZiysIVTcyRj/NHBb3NCkKJ/er87aiWN u2S8UOcIjUp0oAW/huT18YBD7SEEBHpt0ZK0uSMlRMuxgsYYzdQOglvsR7gzObv6Qq6O CmcW1INFOplW3cHBtm7lksKr7ajGbA5971FJ3itcsPtjmpSdzuwVPBdHL1nLq62SyyrE hqJA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si316687eds.170.2019.11.06.17.49.35; Wed, 06 Nov 2019 17:49:59 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728589AbfKGBsq (ORCPT + 99 others); Wed, 6 Nov 2019 20:48:46 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:48754 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727328AbfKGBsq (ORCPT ); Wed, 6 Nov 2019 20:48:46 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A3709C05CAE2898FE0E5; Thu, 7 Nov 2019 09:48:40 +0800 (CST) Received: from [127.0.0.1] (10.74.221.148) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Thu, 7 Nov 2019 09:48:30 +0800 Subject: Re: [PATCH v2] lib: optimize cpumask_local_spread() To: Michal Hocko References: <1572863268-28585-1-git-send-email-zhangshaokun@hisilicon.com> <20191105070141.GF22672@dhcp22.suse.cz> <20191105173359.39052327cf221d9c4b26b783@linux-foundation.org> <20191106071742.GB8314@dhcp22.suse.cz> <20191106092208.GE8314@dhcp22.suse.cz> CC: Andrew Morton , , yuqi jin , Mike Rapoport , "Paul Burton" , Michael Ellerman , Anshuman Khandual From: Shaokun Zhang Message-ID: <13134714-09f6-cbd3-ad29-aaf56476ad21@hisilicon.com> Date: Thu, 7 Nov 2019 09:48:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20191106092208.GE8314@dhcp22.suse.cz> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.74.221.148] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, On 2019/11/6 17:22, Michal Hocko wrote: > On Wed 06-11-19 16:02:29, Shaokun Zhang wrote: >> Hi Michal, >> >> On 2019/11/6 15:17, Michal Hocko wrote: >>> On Tue 05-11-19 17:33:59, Andrew Morton wrote: >>>> On Tue, 5 Nov 2019 08:01:41 +0100 Michal Hocko wrote: >>>> >>>>> On Mon 04-11-19 18:27:48, Shaokun Zhang wrote: >>>>>> From: yuqi jin >>>>>> >>>>>> In the multi-processor and NUMA system, I/O device may have many numa >>>>>> nodes belonging to multiple cpus. When we get a local numa, it is >>>>>> better to find the node closest to the local numa node, instead >>>>>> of choosing any online cpu immediately. >>>>>> >>>>>> For the current code, it only considers the local NUMA node and it >>>>>> doesn't compute the distances between different NUMA nodes for the >>>>>> non-local NUMA nodes. Let's optimize it and find the nearest node >>>>>> through NUMA distance. The performance will be better if it return >>>>>> the nearest node than the random node. >>>>> >>>>> Numbers please >>>> >>>> The changelog had >>>> >>>> : When Parameter Server workload is tested using NIC device on Huawei >>>> : Kunpeng 920 SoC: >>>> : Without the patch, the performance is 22W QPS; >>>> : Added this patch, the performance become better and it is 26W QPS. >>> >>> Maybe it is just me but this doesn't really tell me a lot. What is >>> Parameter Server workload? What do I do to replicate those numbers? Is >> >> I will give it better description on it in next version. Since it returns >> the nearest node from the non-local node than the random one, no harmless >> to others, Right? > > Well, I am not really familiar with consumers of this API to understand > the full consequences and that is why I keep asking. From a very Good job, thanks you and Andrew's nice comment, at the beginning, I'm not sure how to fix this issue correctly and it become better now. > highlevel POV prefering CPUs on the same NUMA domain sounds like a > reasonable thing to do. Thanks :-) >