Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp351830ybs; Sun, 24 May 2020 07:21:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5CMA4F0KuSAVNJSliUk9ByLl15dAKqi5KIK6aY6OXdtEi2q2PJKKgXGMCeDCkvgDA55+r X-Received: by 2002:a17:906:a18a:: with SMTP id s10mr15764172ejy.401.1590330064245; Sun, 24 May 2020 07:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590330064; cv=none; d=google.com; s=arc-20160816; b=J/REhn2ffAtRrLySs1Ev8cRxQkZjNz9mOAa0H6WbVY9g55l7ZhT05dRnk4oyL/ldUr 1qviVQXa58LC61OZkzr2kcFO4yQ4CJClIBY9vaSpf+0Uby2TC7ddIuoax9Ob11yK0FJI sfVGJgIjZilbee2N0ewgcXhiiFH/EUJFM2uedBYn6QWONMDobU8G8xEIM0iu0cEtM5dV u2aQRxAvTfWsheRIA+wHiV3nnnKYzj8da31lnfsTMBSwuNGQM4fAjOB4NfdWk88BhVw/ j3aMh++7rDZcdn2LRpRHmP7GnGOkUzbTGwxBaKR8NPxJWuZgs2vWX6wAvtjzOLa+3Mo4 UZ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:date:from:dkim-signature; bh=26jwUiaIAUz/6Ev2v00cLqCLqvfA+MXZ7k72pWkEh7w=; b=gbvm+S8OzzNck0kqK8224Cmjbs6pYX7yPTfR+Yir4HvPRZ5JPejok9yWhHqgn+AHWO YFohCUUGNQnatPO4OsDo4T6kRwKefQELziSmGMsrqFT3uZI7iLGyzAatKpPPAElQBneX 2YoD9bJtKsTMtQMgYrktz10Uml5zltFCGcDAl38hOx7XzZANtU0EMOL3gLgORjhOjMwc lgleoe1THnnAYXDw3C7TqQEzmrCbHSj9+WLnVQAjcoNWGYS3xGXNauwF//8QbQJZ4G6/ kJp3rS+p6E3SxQsbIin9bFwjNMGNJB5PJb7KbskS3Px2zFtqcBdveQjqKPb3gT1Y+ANO r9GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fSRPewXd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si7819487edq.505.2020.05.24.07.20.38; Sun, 24 May 2020 07:21:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fSRPewXd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729338AbgEXOQw (ORCPT + 99 others); Sun, 24 May 2020 10:16:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728875AbgEXOQv (ORCPT ); Sun, 24 May 2020 10:16:51 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A07FC061A0E for ; Sun, 24 May 2020 07:16:51 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id a13so6509246pls.8 for ; Sun, 24 May 2020 07:16:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=26jwUiaIAUz/6Ev2v00cLqCLqvfA+MXZ7k72pWkEh7w=; b=fSRPewXdlPPA79anRBoQagUoauQuk0oEIoAFldBDDWxj9ppsNZhrGt4Kw1zfU6txIK BWSRdFabH5UrP4zYH/le1rDqlkOqzDtAlu9e9OPzAIzJhsZJr9+XuwHRiglLK0kW85tS ixKmIZjOZgMPLfeWrLLanGgwO6LCYxrUqm+dPoWuc8uLb0rk5xlseT5TvfZotayTfnQI TnBaakyN0r1OQqP//XnOEuRJjVwVomMv21idc2Is9PrmvDmxcQdN2VOE8DxNLogTjyl3 O034XnUmwdQwb8ULfcAXelQxVDiRspZzFha+ZdX0d3Jo9EgKzaj2TdkBN6anMRvRdmpt ATaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=26jwUiaIAUz/6Ev2v00cLqCLqvfA+MXZ7k72pWkEh7w=; b=k40JivTQOcvUFCQIkYP931WheDmgJmCaSQ94Fr7gnVWnUcXnKDpG5U7ok0HBCkt5H1 n9dbSOkjmkuevnQFg8T6Lqd7Dh11yU4wY0+1idCb9akIWDLvi8fc2BJlgLiH2UibNzWs g0SsebPUdgYNZmV2ln3JyAq68Y3Fp9iu05AlEPccI7xJVSyIXTK/TTjnyFOxayaumLCo l/uQxH6244nuAIfJSj/m6v9mfeuhuKrPED91l7Epgw2N5lL44wyYrI5HzCz6k1VTQCfr ooJCc+zNTvqf0DNIkhuVlVOyyd8c7P+dQZCQPzFq1n4p1DRY9njWmT7ane61JQHG0P3S 6Lbw== X-Gm-Message-State: AOAM533aE3jvcZ/+Uj3FpM6ssX2inlT08Kq/G3oBwwD2Gi1EQ7Du0xg4 i1PF0TisHBFuEruIoeQ2+nmhuJFHrJg= X-Received: by 2002:a17:90a:c83:: with SMTP id v3mr15855131pja.136.1590329810629; Sun, 24 May 2020 07:16:50 -0700 (PDT) Received: from roro-Lenovo-Y520-15IKBN ([175.197.19.249]) by smtp.gmail.com with ESMTPSA id o27sm9891768pgd.18.2020.05.24.07.16.45 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 May 2020 07:16:49 -0700 (PDT) From: daeroro X-Google-Original-From: daeroro Date: Sun, 24 May 2020 23:16:40 +0900 To: Mike Rapoport Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/memblock:Do not retry a range that has already been checked Message-ID: <20200524141640.GA10017@roro-Lenovo-Y520-15IKBN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The range that has already been checked don't have to be checked in a second attempt. Signed-off-by: daeroro --- mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memblock.c b/mm/memblock.c index 39aceafc57f6..6f72fae415ee 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1489,7 +1489,7 @@ static void * __init memblock_alloc_internal( /* retry allocation without lower limit */ if (!alloc && min_addr) - alloc = memblock_alloc_range_nid(size, align, 0, max_addr, nid, + alloc = memblock_alloc_range_nid(size, align, 0, min_addr, nid, exact_nid); if (!alloc) -- 2.17.1