From patchwork Mon Feb 27 09:04:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 61882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2316977wrd; Mon, 27 Feb 2023 01:22:59 -0800 (PST) X-Google-Smtp-Source: AK7set8pft9aQzaz4l8mQjUE8GpqZoII2qmyukhaNSq7/6VrIhcC2+0NAWGtQMesCKjruoNif/YV X-Received: by 2002:a62:7948:0:b0:5a8:482f:c32e with SMTP id u69-20020a627948000000b005a8482fc32emr25487742pfc.27.1677489778752; Mon, 27 Feb 2023 01:22:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677489778; cv=none; d=google.com; s=arc-20160816; b=Qad4oRzctDXoPjozRSD6mKeik2SemnrTPVW3vnIgql2J8Mq8OTX5f1ao5BR172N9P9 L7j9okn1LnYPMKi3/yClIeFcN/NIKwRUh5dMamoyDKxJIzrfecrpf/TePhjpE6MymcHf Ct65WeOypugKzomfhNf1059Rqjl8BE8bic4oCJ0BB2r5Uto1eNxTA3qbPc0hRH0F1IAt lwqHhwsU2mgz+HzYkgcqQQ3l5WQAVfmrsreMmzcwxUFyq777eQ//EPB9vtTsbmmGx2Fs iU0Xjvn+fWv7AOfnO4bJ1nPKTnldsbBX9TB2DZ/3Uavs9makU+1isu/Khs2HD8besXd6 AflA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=2bSDRiTg/XaRCHhBkv/ywYeEsgW+EqBr6qiOapMsyy4=; b=S2yIahsdNGvr3HJbRmcgm+guko4MaYqhPwzvn7mt2aIwXcBTP3YJ/+EopNzw3HW7QH JDlangs+2A3tkXnuWWfTL5Ti2sw2kl4PbrSh3zJPEI7VX/lZ24hwrmPa+y/lJ04bfsDn 5Gi7SfRP+qRdlcNXyVzG5CPIcuczS684ezlKfS4ZNFX3fDReWTdq0H/eXNlICsFSpv/D 189GBJZIn1kELnKp1QhkEIC1us9PQrcjgydB7UcqGnVDg4th8E9BCj++aj8Rx/GzwGSx p8z9GS15hGsvbrXqQrEZ63sMw6o444eNPUoBHb3EameD/sV2QnX66d0BjZpgEIUeHWZf ldwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EwyXzhZW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y64-20020a62ce43000000b005a9c29ec529si6630274pfg.59.2023.02.27.01.22.46; Mon, 27 Feb 2023 01:22:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EwyXzhZW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229989AbjB0JMk (ORCPT + 99 others); Mon, 27 Feb 2023 04:12:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbjB0JMZ (ORCPT ); Mon, 27 Feb 2023 04:12:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C6621F5E6 for ; Mon, 27 Feb 2023 01:04:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A42EAB80CA5 for ; Mon, 27 Feb 2023 09:04:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54ABAC433EF; Mon, 27 Feb 2023 09:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677488674; bh=TnR4+ResYQpZ7xd4crafgGHzrGYANiSPQn6G5mtYVpM=; h=Date:From:To:Cc:Subject:From; b=EwyXzhZWtuudP1fNwrlZfHno7WNKgPViYVPgVpuwG4snqxwIlwD9PY6VzMm1yhpaR sv2qxlSP+BoRU3YHOb5V8e4p5KAxxwzcg8n62k3mFEGkNbFbBHwTNMuCnsNsIKBKSY spFYXdIM11gxlRdQQuUis6HczWKfF7kwE/joK/eHPhfQJssShBj7x4640Qxh3vaz7+ RDBcKrtOEr0VVTFsnQ4Vzho0s/H5VuqhbPwfcfuJ+3qwcKyevSSOoLcJn75ZerpLtQ GX5kiX5O/1SlKj7w/Bn+0brgTWf8ClyBVvyGWGTgkb/e6+B/mNwPkRFzx5YSelOOn2 pIGII0FO1qwJA== Date: Mon, 27 Feb 2023 11:04:22 +0200 From: Mike Rapoport To: Linus Torvalds Cc: Andrew Morton , Mike Rapoport , Peng Zhang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] memblock: small optimizations Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758975522494875075?= X-GMAIL-MSGID: =?utf-8?q?1758975522494875075?= Hi Linus, The following changes since commit 6d796c50f84ca79f1722bb131799e5a5710c4700: Linux 6.2-rc6 (2023-01-29 13:59:43 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock tags/memblock-v6.3-rc1 for you to fetch changes up to 2fe03412e2e1be3d5ab37b8351a37c3aec506556: memblock: Avoid useless checks in memblock_merge_regions(). (2023-01-31 15:51:56 +0200) ---------------------------------------------------------------- memblock: small optimizations * fix off-by-one in the check whether memblock_add_range() should reallocate memory to accommodate newly inserted range * check only for relevant regions in memblock_merge_regions() rather than swipe over the entire array ---------------------------------------------------------------- Peng Zhang (2): memblock: Make a boundary tighter in memblock_add_range(). memblock: Avoid useless checks in memblock_merge_regions(). mm/memblock.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-)