Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp74218ybc; Fri, 22 Nov 2019 02:16:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyEqfUSTBnPQ+pikldkFMeOKpRZH71DusqkmkXACvOG5G7LJaycuTgNvM07zvPhGNcVd2uY X-Received: by 2002:a05:6402:28d:: with SMTP id l13mr115837edv.286.1574417813804; Fri, 22 Nov 2019 02:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574417813; cv=none; d=google.com; s=arc-20160816; b=v1KDf7R65bKa79RbJSFio1sEo079u45fyFAtGS5NAzRmBbmkxdCkfWCiT/r9L4GCRH LN0FQRBvghHgnL8YIDebbicy4dKf9zWuJ0rOTVxJWCnmwGL/5thprpvxz4WNgYeaCf/o oaT8R+mwbVvQ3kitNzeq/wUJrcQRA7UdHdbJLxbF8RDI71Nu5F6eQd6uWK1OfxU6jvAT ZGWQiigptcPIwafc328BfDk2VzzOFpl6f8Gy1zaxK/p6hi6OZ5QzHgRWMxXnai68a+MW mi32kHiusL2MC70HQqmbuhO97/rQOjEJ0qPFfwAD5Bo6Y/ySQzkgpiRRPGP/co9EFgpP Egsw== 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:organization:from:references:cc:to:subject :dkim-signature; bh=T42/pXgZB3vn3EGD0jhf0dBoC1Q7FFJ7xvZPD2Z1Aeo=; b=VRl0zrkh7S05O90VnRZcEjPmAsGubLqCGza1LlkfYX4gCFd6VepaltZfIhy8h/kwg3 SG/VEZoR765XQDEPKsPjsRThkaWxaJvVnuzEqcOuu7anM97qeMp3UDzP7No/MsXF3BCD WoMEosCcGYWaoFLP0zBf8MS5RcDdNYc/GX1W99MvQCE3IyL4sPGjhqzAqsRb/KcDEODK 1VzJqVVJiScsCLrRfu7KWv9DP29JOv7O0MZTHv44Y/xY3jeHjnQJUDpXlUTE309gwNmt boMcjZfSaFoyH3nMemfKl3tdm3WfQtXbBZZpklB5BbZoNmVS+LxkcdC8vhOd3NSlvsDO qsdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QMDE9kQy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si3662660eji.80.2019.11.22.02.16.29; Fri, 22 Nov 2019 02:16:53 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QMDE9kQy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfKVKO1 (ORCPT + 99 others); Fri, 22 Nov 2019 05:14:27 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:45364 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726526AbfKVKO0 (ORCPT ); Fri, 22 Nov 2019 05:14:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574417665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T42/pXgZB3vn3EGD0jhf0dBoC1Q7FFJ7xvZPD2Z1Aeo=; b=QMDE9kQyHAZFiHYcbdjVskgMDJz2YKL9qe9xhqd4ecrtOfE9YhXYVpGQ6J5z300/+P3MMp s0qVh/JBFU4nArrWB5whHMlZTpr2F4nCo2k3eWzq469u8BJMhiNas9kzfwN8qoPZs8xK1Q hmbG6NUx4COAhdL54k2jmEB6ax1XIzU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-102-_iaOcnaFNzOiy5VohVwcSw-1; Fri, 22 Nov 2019 05:14:22 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A6CAE1883521; Fri, 22 Nov 2019 10:14:19 +0000 (UTC) Received: from [10.36.118.121] (unknown [10.36.118.121]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9B086E717; Fri, 22 Nov 2019 10:14:16 +0000 (UTC) Subject: Re: [RFC v1 00/19] Modify zonelist to nodelist v1 To: "lixinhai.lxh@gmail.com" , Pengfei Li , akpm Cc: mgorman , Michal Hocko , Vlastimil Babka , cl , "iamjoonsoo.kim" , guro , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" References: <20191121151811.49742-1-fly@kernel.page> <2019112215245905276118@gmail.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <7dbec505-ce53-e1f0-6ed4-8cb0328dfc79@redhat.com> Date: Fri, 22 Nov 2019 11:14:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <2019112215245905276118@gmail.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: _iaOcnaFNzOiy5VohVwcSw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.11.19 08:25, lixinhai.lxh@gmail.com wrote: > On 2019-11-21=C2=A0at 23:17=C2=A0Pengfei Li=C2=A0wrote: >> Motivation >> ---------- >> Currently if we want to iterate through all the nodes we have to >> traverse all the zones from the zonelist. >> >> So in order to reduce the number of loops required to traverse node, >> this series of patches modified the zonelist to nodelist. >> >> Two new macros have been introduced: >> 1) for_each_node_nlist >> 2) for_each_node_nlist_nodemask >> >> >> Benefit >> ------- >> 1. For a NUMA system with N nodes, each node has M zones, the number >> =C2=A0=C2=A0 of loops is reduced from N*M times to N times when travers= ing node. >> >=20 > It looks to me that we don't really have system which has N nodes and > each node with=C2=A0M zones in its address range. > We may have systems which has several nodes, but only the first node has > all zone types, other nodes only have NORMAL zone. (Evenly distribute the > !NORMAL zones on all nodes is not reasonable, as those zones have limited > size) > So iterate over zones to reach nodes should at N level, not M*N level. I guess NORMAL/MOVABLE/DEVICE would be common for most nodes, while I do=20 agree that usually we will only have 1 or 2 zones per node (when we have=20 many nodes). So it would be something like c*N, whereby c is most=20 probably on average 2. --=20 Thanks, David / dhildenb