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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DEF0CDB46E for ; Thu, 12 Oct 2023 09:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235565AbjJLJ2q (ORCPT ); Thu, 12 Oct 2023 05:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235373AbjJLJ2l (ORCPT ); Thu, 12 Oct 2023 05:28:41 -0400 Received: from out-190.mta1.migadu.com (out-190.mta1.migadu.com [IPv6:2001:41d0:203:375::be]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD83FBA for ; Thu, 12 Oct 2023 02:28:39 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1697102917; 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=w+ZbiEKpKR/7IxtLp0s4sFhIE2lb5aqqkwzkmrZpvEk=; b=ubV27hWnZTTjqrXaHxG3aEtMO+m3O0kZ/+VmufEJ0CJrzJ42r4bV49IOELKyM/FLxAOXsT eHISFxZ6AEbGforatfopFagl5KX6XOLIUjSl2961O7yOSMLcQbQ1t65ekzkktm6kTwUVx0 kqMjA7nbmvwCu55EzQxkS3EvjxObxCU= Date: Thu, 12 Oct 2023 17:28:31 +0800 MIME-Version: 1.0 Subject: Re: [PATCH v3] memblock: don't run loop in memblock_add_range() twice Content-Language: en-US To: Mike Rapoport Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20231003163045.191184-1-yajun.deng@linux.dev> <20231005051959.GC3303@kernel.org> <20231012092442.GR3303@kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yajun Deng In-Reply-To: <20231012092442.GR3303@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/10/12 17:24, Mike Rapoport wrote: > On Thu, Oct 05, 2023 at 11:20:19PM +0800, Yajun Deng wrote: >> On 2023/10/5 13:19, Mike Rapoport wrote: >> >>> I don't see this micro-optimization is worth the churn and potential bugs. >>> NAK. >> There are many handouts that tell people it needs to run twice in >> memblock_add_range(). >> >> I think it's time to change this. I'm trying to tell people that running >> twice is unnecessary. > It might be unnecessary, but it's still simpler than the solutions you > proposed. And, again, removing the second loop is not worth the churn and > potential bugs. > Okay, I got it. Thanks.