Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp247454lqp; Thu, 4 Apr 2024 11:57:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3nqOt/j9UJ/r6OmhK/aJYiaTSIX/IIK62oTyGoxyCd4EiVMGPvZtPfqi+hbp1N4fYvGgEullazLTvI3OeZGEK+kYXjHEW66ghxTFrzA== X-Google-Smtp-Source: AGHT+IH9dSsButWGdPSdzs8ea0PGs8/g/ktyzVaYz3f6p/lvsrR4gEDbJa0V4/hmoyVQFJ3/wdQ9 X-Received: by 2002:a50:8a89:0:b0:56e:23a1:a0da with SMTP id j9-20020a508a89000000b0056e23a1a0damr396728edj.7.1712257021197; Thu, 04 Apr 2024 11:57:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712257021; cv=pass; d=google.com; s=arc-20160816; b=CYNA6nkRbriiyx6ga+zpzMgP9Hx+r8zkB0w26i5103tJMr3UZplYFQAH/gye/TqHmi Tis8YMzaGANmTXrVGdO463Yy6BbHZ2IG2yOKq3L6PeOzW7hjMzTqQi4/zPRvxY21B/po X1obW0NVV9BaZhZOlUMmpgE9bG3JPeBl7lksGlRsHSMr9hSyQ+xz2R9IC0+NQTk5bRHv coCNwkngl4uuzwgGYrygGnw3QWhVwPV5xKVA11hV9a3UvG/yPJ7X7me3iITTowtDYe2V OxvVY2e4rSIrNa1+S/33nqjKtogjG9oPD5h486nNp8wx76ww1SmVi88SujfJkt6J/iV3 3Etg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=ekgsgNqeKKjrKE6jGlMBfAf5nKQ+ack6j3G4b68ujBU=; fh=mpDgEwK7j/oZw++pe0PiK2kg7WfOjYEh4gLFA7FjVUA=; b=VuK1zukHdvKD4VuFX1QlKQEdLk0e/AgIBx3J1pL3SdecT4ySmGl4pgX6GoDZYhGwyM VRu8MS+WTYt+cBmCfuKX1JKT0FMHzrRHDNid3wiRZHpTZpvh1ZH5UuVxQTJ0DxTIaX/r VFH7KdSfixClpdanOg2ei11IKFEU6pUS+YUBnOhZdThBigSOUG6cslf+EBGxY1iWvTOg Dwnf1gi/rNmSBfbCKGWZQox1PlzubdxCAsTlNJSJf98ubXo7dlUWfraMSpbKz606P6X8 GFLjnq9/EslHeYgaeW3/zCXxcaUBis/r9bEXfYxPsJ/f6hH+Lys1ZnOT4Y499qguWhag YbZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=eKRGb8nQ; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-131999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s2-20020a50ab02000000b0056c2e48dab0si7794158edc.18.2024.04.04.11.57.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 11:57:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=eKRGb8nQ; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-131999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 DCCE61F231DD for ; Thu, 4 Apr 2024 18:57:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE5171332A5; Thu, 4 Apr 2024 18:56:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eKRGb8nQ" Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 AA4881B7F4 for ; Thu, 4 Apr 2024 18:56:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712257008; cv=none; b=GR2FlUj2DRVelxVEP0F8utH5ow2QhDEYDdX9EkjWNldC+utBVjDegKSNM7DmvOJQaxfig9bftaDEmF2zvGC/ZkY1J3kbCox4em8Hv+3dgxaZ1C41DO2B5M3i9FGy4w89visIKd5reANU55dIxFRmcqN5yGt2AKjT94nuhikynaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712257008; c=relaxed/simple; bh=zEG/Npqm2emOjQ4YMCXzVPh7V6SzrWE+dkLK8JN/yuw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ehkoXujRtbbcGYe9eHD2BW/jI2mFvbr98lKUoFGgSPIn0Lj2iLIXCvoeAuy1pTkGzXDAdkO2LqYklR1dKAllRLF5puFi/30JF5E59JhLopwHlF0nWou6nUAv8m5aR3TGmtFjftfrk7kxD3bqp4EVJ9adhxYAlHIsk8YdIZvcyA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=eKRGb8nQ; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Thu, 4 Apr 2024 11:56:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1712257004; 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: in-reply-to:in-reply-to:references:references; bh=ekgsgNqeKKjrKE6jGlMBfAf5nKQ+ack6j3G4b68ujBU=; b=eKRGb8nQyxQLzoJybEZ6TV2jXTmzQFx61X99Xnxraie8m4Ihh1eIgyRQMX7nbSU3zz5mig yJGFWw4IB0nVU6gIaB7Q16ykH1cSWZ10LOC0qb/nsfDmWzPnG+CQkn3N3ASdNRji5SniN7 w94KrNysvhntrzVD3nBoK3P6k0vAPA8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Frank van der Linden Cc: linux-mm@kvack.org, muchun.song@linux.dev, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm/hugetlb: pass correct order_per_bit to cma_declare_contiguous_nid Message-ID: References: <20240404162515.527802-1-fvdl@google.com> <20240404162515.527802-2-fvdl@google.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: <20240404162515.527802-2-fvdl@google.com> X-Migadu-Flow: FLOW_OUT On Thu, Apr 04, 2024 at 04:25:15PM +0000, Frank van der Linden wrote: > The hugetlb_cma code passes 0 in the order_per_bit argument to > cma_declare_contiguous_nid (the alignment, computed using the > page order, is correctly passed in). > > This causes a bit in the cma allocation bitmap to always represent > a 4k page, making the bitmaps potentially very large, and slower. > > So, correctly pass in the order instead. > > Signed-off-by: Frank van der Linden > Cc: Roman Gushchin > Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") Hi Frank, there is a comment just above your changes which explains why order_per_bit is 0. Is this not true anymore? If so, please, fix the comment too. Please, clarify. Thanks!