Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp173110lqp; Sun, 9 Jun 2024 23:24:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEeoXkGYz3Tufjxu0zVPqKErTyGXXPRUsHS2dg4tttm5m8qu/SD3Jm5DcGlrwQQBB+04EvEAQPt3UxO5rXPXEr8t07spsreiPgfQV2Rw== X-Google-Smtp-Source: AGHT+IGPSbLKJM6Sys7eZKfKcFcH7TadvZhCmQ1jvnfbVYwxq0XF64fZs2JTgMeQr8lhEcFx3i59 X-Received: by 2002:a17:902:dacc:b0:1f7:9fb:9d0c with SMTP id d9443c01a7336-1f709fbb7fcmr36339645ad.56.1718000676054; Sun, 09 Jun 2024 23:24:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718000676; cv=pass; d=google.com; s=arc-20160816; b=mHnG1HSKkKDpKeNWTqHTxf7Mem3yNKkaqiysfebem9cn4fP7hJdGvMd1oWI0Izwhox mHEj6eGoOC9JRGqWiSB4WyHwPXoWs1GlqrwtmmL1aCTjWkgI4cKGFcng0cEVKWtenBxq 3brWTljnLtfg7ylVjFmGeLFtzEWOiyfE0gMlDqjaImhGUauS2ZdO71MkrkVKp8I9pR4t dXVtnF2lvBr6UFiIigb7ZrAOTWyN7HTvzMx2DGhCgyFO58kCslzzp4f+CtluyFO8Z3h2 YLA7BWheigFj+ukcd9G9nFUyxJsvWgv8pPi70gpCdJq2ePLBvLUnByUew8qg8lwPkoQJ 2H7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=p9t1JxdGY/BYtFFeJHNJAB24SvzK40wW1PSsRWlXa8M=; fh=w4WrKKsxRa1ZBFFUl8Hn1Mq4c7qOiQzAnLMfJltYiZs=; b=CnODjaM6psQxeuKv0vAp+lafAuXnVa7AJtX/+BCAmEz6WLAKUu+qhi3E18u8hYWcHL hezU3MxodYef4eZhYZ/FnulCHXIHI2khPwxwCgtdDkte1XDLc+kqAknSQgWvCbQ4vMSj sgpahh6JLaAj3Sk42oc5sxiLl79pCdgobLcoAwol3Oob1oVtrlHI9s0r3dG3M7smV2NY 24p3uNL3dqKHzzNYGrt43HyEEz9zK6Zbvacc+/R21AONgf9XFLqC4KuhJnnVjCAJwy3W 6SPmdaaMvlQdkGFeG8ssj1yKL87R54wJPzMzudgcCNWkzpl9AHY3T7CPzPIMqr9a2R4U LXxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J0Ra5EcI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd7e4a72si49217345ad.374.2024.06.09.23.24.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 23:24:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J0Ra5EcI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1A74FB22C2F for ; Mon, 10 Jun 2024 06:08:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE5F817C6D; Mon, 10 Jun 2024 06:08:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="J0Ra5EcI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11002171D2 for ; Mon, 10 Jun 2024 06:08:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717999723; cv=none; b=WVJvcupjRiAXS3B882u+ibF9iMNeo0PX04dWBVd/qiO/MsL3r+7FseWM8ieLI+ZVaqgDcvl+NdRq3HxJ5IzF8QLWXMYDoxsB25ylt0SJhCLb9oGEQ+j2f+V90REYJ/hLLjwxnpl9tdjL6Nkif/BNrbDl7xaoDZ1/+q71GgRwBUA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717999723; c=relaxed/simple; bh=ydU3TIHzs/gqixC34SQ/HlD8nJN2Njc1bqn94VBCax0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ng0XnvmrqCXMKsJZ0NB3e11DND5dK7n0toznA+qVp3JH8HaVJi2DtAain1BVc5Xrn69Y70JnNEBSVm0DUOEKjxzYF2P9B/3vzABu+qnJLObtY1yiw2WooFV4bwT13n9Qx3vxxNu/Ljn6acyP1LpUDTew0l0ODSfhrG00ttjju/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J0Ra5EcI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A06CC2BBFC; Mon, 10 Jun 2024 06:08:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717999722; bh=ydU3TIHzs/gqixC34SQ/HlD8nJN2Njc1bqn94VBCax0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J0Ra5EcIeboqGZAuts2bhl2iJ4p1IlqLcdNh3qNs87zOoIaH5ldNi9pwIS+l8aU9C WlkzxmCZXpqK65yajDYqFaSJ3VtUkB01x29ploDFSPS+ZduVnL4MaTTtIaXtSCL5G9 ttRmi9kxGw2/pMOD+lefA1e1YHzj75KKzCP7zBurp0vOJ5k5qpj2oVMTtNVE2wn98P gXGFSpHR0dKRCFlP4/gdM4bRgoWwx13WnDeqsPvSmDt/oVcfIF3uyPTy8CA3yqFl50 WL8VJZ8oxUvtdSGsudL+my7hZgeBrvwMwCnUQkZAUCbZEvfdUZ2wipjNvLSyBuSmIO crKV8N+8sPYVQ== Date: Mon, 10 Jun 2024 09:06:37 +0300 From: Mike Rapoport To: Leesoo Ahn Cc: Andrew Morton , Leesoo Ahn , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: sparse: clarify a variable name and its value Message-ID: References: <20240608152114.867961-1-lsahn@wewakecorp.com> <20240609140341.14ba3a1c62029771d60059ed@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Jun 10, 2024 at 12:39:28PM +0900, Leesoo Ahn wrote: > 2024년 6월 10일 (월) 오전 6:03, Andrew Morton 님이 작성: > > > > On Sun, 9 Jun 2024 00:21:14 +0900 Leesoo Ahn wrote: > > > > > Setting 'limit' variable to 0 might seem like it means "no limit". But > > > in the memblock API, 0 actually means the 'MEMBLOCK_ALLOC_ACCESSIBLE' > > > enum, which limits the physical address range based on > > > 'memblock.current_limit'. This can be confusing. > > > > Does it? From my reading, this meaning applies to the range end > > address, in memblock_find_in_range_node()? If your interpretation is > > correct, this should be documented in the relevant memblock kerneldoc. It is :-P > IMO, regardless of memblock documentation, it better uses > MEMBLOCK_ALLOC_ACCESSIBLE enum instead of 0 as a value for the variable. Using MEMBLOCK_ALLOC_ACCESSIBLE is a slight improvement, but renaming the variable is not, IMO. > Best regards, > Leesoo -- Sincerely yours, Mike.