From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73FB1C433EF for ; Tue, 12 Apr 2022 07:46:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9840B6B0078; Tue, 12 Apr 2022 03:46:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 90C806B007B; Tue, 12 Apr 2022 03:46:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 786C46B007D; Tue, 12 Apr 2022 03:46:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 667F46B0078 for ; Tue, 12 Apr 2022 03:46:15 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 2F73D8022E for ; Tue, 12 Apr 2022 07:46:15 +0000 (UTC) X-FDA: 79347443910.17.6C899BE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf07.hostedemail.com (Postfix) with ESMTP id A1BA540003 for ; Tue, 12 Apr 2022 07:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649749574; 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=d3z3EuvWJStrO6wiuh/ot02OBwQfEbzzn4Dv+w9ljGA=; b=Xo8aGqrpj2R+0ZHQsRi2ePIC3coL0XhNDmne40cHeOoz+gRKmiCBVyCA9gOCqQuVKgrJ35 nntbmZ78SwCycu81m9zNbBTDNFPGT2nrlMSmOkSf+EXtCTFjw5sEH9V6V4eQRULs8mr4PL TGd39HSmk2UPRVjwkThQM6mXVwwg+WY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-398-neT4RrEfNa-BkoICP2zcRw-1; Tue, 12 Apr 2022 03:46:12 -0400 X-MC-Unique: neT4RrEfNa-BkoICP2zcRw-1 Received: by mail-wm1-f70.google.com with SMTP id i66-20020a1c3b45000000b0038eab4e0feaso3471063wma.9 for ; Tue, 12 Apr 2022 00:46:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=d3z3EuvWJStrO6wiuh/ot02OBwQfEbzzn4Dv+w9ljGA=; b=Zg3VY5sOPgHnIoYf9YiFS9ajGnuFhDis2lt/SsgB9W1YipVQs1UAJEeFbHPduG/fxD 5X2ICjDP31QxsGmLyujSjHii7scs+MYyBxBDRNVMKrkce+/IjGc35SiwuPiaZiEJGWdQ ZK0KxV6YVhL2oRaSuAiY0dNIUFTCiMghg5TGpjfkQBLSHN2wUexgPJ/qn/v+IIhM3Bob lCs8WMuFhGWAIZZsdnXw060ZOJKyKu/AuxIiV1roGTvVgjEa/i3KJIdq6rp3ZXRGXNLZ lqdLI4dtqLgalo8fkE9AjuAV4gXOt891mxqteC9wsGAQs4oMzFoOX1IfexvyF6ouImqh Q33w== X-Gm-Message-State: AOAM5319KLIbYhckmU1bVs2FfltAz9aAhoTUFoVWmwLabJbN1a5oxFQo vFf69mkjIGtDWIR124ogSsUmTqYEeBBYIv/C6FmLmOKHfpSGars3ijIdz2jzo6HW7nMLn3Z/ZfL VABvY1TF7D4A= X-Received: by 2002:a05:6000:1789:b0:207:905f:4f39 with SMTP id e9-20020a056000178900b00207905f4f39mr17591306wrg.362.1649749571600; Tue, 12 Apr 2022 00:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFQpsG9TiWMKOZELNC0EANl2uu/rBNXdDFuWky8+g41u9EJD+DOK6tME7kcv7ATgLkcVijng== X-Received: by 2002:a05:6000:1789:b0:207:905f:4f39 with SMTP id e9-20020a056000178900b00207905f4f39mr17591287wrg.362.1649749571299; Tue, 12 Apr 2022 00:46:11 -0700 (PDT) Received: from ?IPV6:2003:cb:c707:1800:7c14:16cc:5291:a9f3? (p200300cbc70718007c1416cc5291a9f3.dip0.t-ipconnect.de. [2003:cb:c707:1800:7c14:16cc:5291:a9f3]) by smtp.gmail.com with ESMTPSA id w7-20020a1cf607000000b00389a5390180sm1628580wmc.25.2022.04.12.00.46.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Apr 2022 00:46:10 -0700 (PDT) Message-ID: <0d46ccd4-12e2-9c0c-10a3-e9258a7097d6@redhat.com> Date: Tue, 12 Apr 2022 09:46:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [Patch v3] mm/page_alloc: add same penalty is enough to get round-robin order To: Wei Yang , akpm@linux-foundation.org Cc: linux-mm@kvack.org, Vlastimil Babka , Oscar Salvador References: <20220412001319.7462-1-richard.weiyang@gmail.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220412001319.7462-1-richard.weiyang@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Stat-Signature: rgwzt3a4nohx7mjfwunbsbgod6bzzx79 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Xo8aGqrp; spf=none (imf07.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: A1BA540003 X-HE-Tag: 1649749574-770359 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 12.04.22 02:13, Wei Yang wrote: > To make node order in round-robin in the same distance group, we add a > penalty to the first node we got in each round. > > To get a round-robin order in the same distance group, we don't need to > decrease the penalty since: > > * find_next_best_node() always iterates node in the same order > * distance matters more then penalty in find_next_best_node() > * in nodes with the same distance, the first one would be picked up > > So it is fine to increase same penalty when we get the first node in the > same distance group. Since we just increase a constance of 1 to node > penalty, it is not necessary to multiply MAX_NODE_LOAD for preference. > > [vbabka@suse.cz: suggests to remove MAX_NODE_LOAD] > > Signed-off-by: Wei Yang > CC: Vlastimil Babka > CC: David Hildenbrand > CC: Oscar Salvador > --- > v3: merge into a single patch > v2: adjust constant penalty to 1 > --- Acked-by: David Hildenbrand -- Thanks, David / dhildenb