Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp74999lqp; Mon, 10 Jun 2024 19:14:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/Zbq+zf5/6uyzrdcFXvVbF/ZXFkEcPyaTEm2cZxT7ZriCyEjYzr6DkQA1CKIrgSSJUzucWiWpkgt6wJUqQAtE6SrSjY8wYVaaWNUHAw== X-Google-Smtp-Source: AGHT+IHmiN24sbQmhyJI7SyD2OVenwhUcgJ4o/QrQtN1+elVb9T25BCMPVJB4OGYcFryKvK6yVu7 X-Received: by 2002:a17:906:fd86:b0:a59:b590:5d71 with SMTP id a640c23a62f3a-a6cca20a7f8mr940417766b.0.1718072074127; Mon, 10 Jun 2024 19:14:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718072074; cv=pass; d=google.com; s=arc-20160816; b=IC548AqjKGA+MgWnraWOvaoOgkUHJiG0GQbedXrMxrC41KETq/mnrNa4fjJfFQ+gnJ DswlO9BUUQgf46Wvi+yrrd6cSMCj/mLaOsGZKjmUISvrdn+DSQL8ypeEc2NX/nyUOvCS 4q7h3WMiW5gO9HL2PZ1GwV/S8OyE+ci15YqP5iH5RUurcdroq3/vrFdkHPVzCHzN/avI g9Q3ut+GbyvWNq+6DVNjuks898KQHnSrndJFqkkcUf9X3KX7+oXaZWcw9nvTzw4zccKS sCrZeyb7ADpcYkRRmVzewrs2tSWXZXlqe6m7eYz7A21aTF1Asf7ebuFsso4CeMXLLPsk TOpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=b8pZMe5tLOhtQMTyhHDkVRgRGfxx7jB/8jVnL+SLk/k=; fh=K/bmS/+ecV/narm/ygy6NYCB23ysufW+vQuQfla/tfM=; b=sSQ1DZNKnOxiwAHjr452c+W06NAd0JxuowNKGS+ldya1H/ry1P/mz1XcUKA3KYPX6R Bs9fenRIvNZu4ma2L0+0U3CFN64FWG4mIaQMuJOzPc42Uo2P/M73PhVWHfjjyCobT+Rs W7v90d0i0zqVowaea9HY4whS3foJ+Hvan4XGP2MLz8tS/PTL4hysb/HqQn8EHA8GVtxp dykDpon+aeg/BrD+KUHxR+I/fnygg95QC0DkwDpz89Dxke5jS+ivh8y6ohpt/NuybwU2 BpshfJ3NlwAGewLB87mNXtzTF7IEQ8AWfzaAMZYc7wt6JL258tKF9gc0x30CwtA2bVEE DqWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FwM0umZL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-209174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c80589c98si495902266b.126.2024.06.10.19.14.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 19:14:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FwM0umZL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-209174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D27761F22C76 for ; Tue, 11 Jun 2024 02:14:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E25EBA45; Tue, 11 Jun 2024 02:14:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FwM0umZL" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 477CB8488 for ; Tue, 11 Jun 2024 02:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718072066; cv=none; b=uXQTZZC+LZVvpDtz9GLJkU/l2mjWlwG3EG3f1er5jpQw2DPubbKyNLXqEIt7pEOF2+OFH0zrPbhXJnsqq+yKThVq8cOYPY3H223cOQL7a9d+T4239DiEoZtZSWkTpv6vXkSvyClH1AXG879cha5Zqsicpen5BZ5CixzqYKlKBHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718072066; c=relaxed/simple; bh=arDgzSOCqXO87eiMavP6lTb9B2d5Tik6rmDcTXq8DSA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YvdfbqFkp2RA6qFLPYbDg2Xw58RjVArdL6Hqtv0zvWvRuJu6/KP+9irFpt1K47/yWMFyukEX4y90n8H/4/JHj2zMBX+NpWn0ZfohFjE8uCxs1s3Lae3MOviZ9NFt4XLm1u1/q0uMWSaD9omxydxOZi1NIHJrJp5jo6Krb+2S/ho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FwM0umZL; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a6ef64b092cso337809966b.1 for ; Mon, 10 Jun 2024 19:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718072063; x=1718676863; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=b8pZMe5tLOhtQMTyhHDkVRgRGfxx7jB/8jVnL+SLk/k=; b=FwM0umZL6m57tYBvGieadFidYzO2VAKWesNVbvHn5ziickQhJjVlKeZTmJBJbjSGHH kdWkxolpWBWKQY+h6FZ9uy8lEZ+WMKDQksSbKpVaPMOKx/31RtabQZ0dBuPB+11OKYmt 6tvi3+ug9UjVPITPVpUhEAfaJBVAXKiDFeycvsLOrZbijmaL5MLm2eFDn0FpC7nVhDGB pI08DX1o6gYKtRevtRKrGPX6KwmgWEecpNmedxnWuZhXFBGsEMNu5fQPfifjtMb88/5y c26acFG1R0grHI0z/YcXnfxsZbv7Cq/OwvcWKx2LEWLzRBVVwqGXXHvabgK6cXBUvoMj DXIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718072063; x=1718676863; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:cc:to:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=b8pZMe5tLOhtQMTyhHDkVRgRGfxx7jB/8jVnL+SLk/k=; b=N8ovhLdguWbR5J8eAUwc9os3gvCeyxsc7qi+dqDqx9l3Qh8IZMQQ7LoXZX7sHZoAGs T2aE6DhQU/TRzCvs+VpsIxoRaMCsL+//8ZTo5K1hMQAGUYcSjxnm7qD4iOVvWh1fynp2 hosSvMFfuQnhb0cWw9LNkqt1+QPoNk5Zn5gBrHNHPcaxVbM7OQZ6aIUNln3FfH3VQg21 BmutvU58vgw+tNmS4pC7V/nRhoy87vrtHn6+y1ltNPSrG3b8Z7C5/l+uV9fk6ZTb1EeX i+NYxjyyFUXm9XiMvnLZQqMTLKNgDcFDvoky/duQXZs7YILHJuycKJV87ptzm6Et0HSx 9ikQ== X-Forwarded-Encrypted: i=1; AJvYcCVmrlu+SOMVZfGWnVET5Lm51MHYzgEL6SS0tRT6Sh49A8fhu/NpTrUr3NxZLnMhRP8vwW/oqb07RNu2f3BaUMTtVCSydzZndnTe4nbO X-Gm-Message-State: AOJu0YxVni36+eeUjS42iElIF+D0FRj78aDMbpssvqGEfOVWB0Wnf0Jw qtUZzOiTo4tKhwr63/wigxXJMZMDEVnRgpuSVWpaMJOVnLofjddt X-Received: by 2002:a17:906:398:b0:a66:414c:2abf with SMTP id a640c23a62f3a-a6cd60a189emr763912466b.26.1718072063176; Mon, 10 Jun 2024 19:14:23 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f1d862513sm219900766b.166.2024.06.10.19.14.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 19:14:22 -0700 (PDT) Date: Tue, 11 Jun 2024 02:14:21 +0000 From: Wei Yang To: Leesoo Ahn Cc: rppt@kernel.org, Leesoo Ahn , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/sparse: use MEMBLOCK_ALLOC_ACCESSIBLE enum instead of 0 Message-ID: <20240611021421.seknuy7flwztan33@master> Reply-To: Wei Yang References: <20240610151528.943680-1-lsahn@wewakecorp.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240610151528.943680-1-lsahn@wewakecorp.com> User-Agent: NeoMutt/20170113 (1.7.2) On Tue, Jun 11, 2024 at 12:15:28AM +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 end based on >'memblock.current_limit'. This could be confusing. > >Use the enum instead of 0 to make it clear. > >Signed-off-by: Leesoo Ahn Reviewed-by: Wei Yang >--- >v1 -> v2: do not rename 'limit' to 'limit_or_flag' >--- > mm/sparse.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/mm/sparse.c b/mm/sparse.c >index de40b2c73406..cf93abc542ca 100644 >--- a/mm/sparse.c >+++ b/mm/sparse.c >@@ -351,7 +351,7 @@ sparse_early_usemaps_alloc_pgdat_section(struct pglist_data *pgdat, > again: > usage = memblock_alloc_try_nid(size, SMP_CACHE_BYTES, goal, limit, nid); > if (!usage && limit) { >- limit = 0; >+ limit = MEMBLOCK_ALLOC_ACCESSIBLE; > goto again; > } > return usage; >-- >2.34.1 > -- Wei Yang Help you, Help me