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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9693C48BC2 for ; Fri, 25 Jun 2021 06:25:37 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F1C461404 for ; Fri, 25 Jun 2021 06:25:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F1C461404 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GB6Sc6VqMz3cD6 for ; Fri, 25 Jun 2021 16:25:36 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=203.11.71.1; helo=ozlabs.org; envelope-from=michael@ozlabs.org; receiver=) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GB6RV0bR0z2yhr for ; Fri, 25 Jun 2021 16:24:38 +1000 (AEST) Received: by ozlabs.org (Postfix, from userid 1034) id 4GB6RS6XFGz9sXS; Fri, 25 Jun 2021 16:24:36 +1000 (AEST) From: Michael Ellerman To: Daniel Henrique Barboza , linuxppc-dev@lists.ozlabs.org In-Reply-To: <20210622133923.295373-3-danielhb413@gmail.com> References: <20210622133923.295373-1-danielhb413@gmail.com> <20210622133923.295373-3-danielhb413@gmail.com> Subject: Re: [PATCH 2/3] powerpc/pseries: break early in dlpar_memory_add_by_count() loops Message-Id: <162460208994.3247425.13258693102010019333.b4-ty@ellerman.id.au> Date: Fri, 25 Jun 2021 16:21:29 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 22 Jun 2021 10:39:22 -0300, Daniel Henrique Barboza wrote: > After a successful dlpar_add_lmb() call the LMB is marked as reserved. > Later on, depending whether we added enough LMBs or not, we rely on > the marked LMBs to see which ones might need to be removed, and we > remove the reservation of all of them. > > These are done in for_each_drmem_lmb() loops without any break > condition. This means that we're going to check all LMBs of the partition > even after going through all the reserved ones. > > [...] Applied to powerpc/next. [2/3] powerpc/pseries: break early in dlpar_memory_add_by_count() loops https://git.kernel.org/powerpc/c/c2aaddcc65b343fad4ed184e625abd3e68f63b9b cheers