Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp886248lqp; Thu, 21 Mar 2024 20:52:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5PVRmLnlgAM1JH/xFKj6LwXVYgfjk6KVh8cVuZTwGODKXCTwU5lTdWBhu3Lux/M8IQul5Rr0jClUf8p0COEgbM5RlqqNU+hZkcXiaGg== X-Google-Smtp-Source: AGHT+IHaiImKyX3uzTZOMZ2V8RsmyKO/UAcudeMUwhEJu03SArTDphX5q8kUCXj2T3ZLVxh+Y471 X-Received: by 2002:a05:620a:4ad2:b0:788:588a:a5b5 with SMTP id sq18-20020a05620a4ad200b00788588aa5b5mr1138098qkn.58.1711079523591; Thu, 21 Mar 2024 20:52:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711079523; cv=pass; d=google.com; s=arc-20160816; b=u4mgcAwSicmWVo6h/EgcUFg05sVgHTXeFA5c1gn7+TgLps6H/Zt/mwcoUvF2KYTME3 YzTOaUBbwJsjTBbR4BkG9LqzaoMae33mSdZ0PoaPJH6XHc+18P0XcXrIp6yruSQi/pCO lmG6q8E234A2pFx49L9fcCMU+YLH5dvx5OUxNIzxtlDYKnFwIbwiuRVBpFzfa4qnHNZH o7rhDu5Tuhn3sCrUi0qSo/GEj/MxR/0ivvc0nie+NBYRNYMh6m9ka1I07g9HXTJWN+ZA Y4V+Pi+aB+T91OejvaHVAMqyQP1dReVyV3AGXAyZ57sT1GXNPx0ff0jgqiv3UCztXCKB lvxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=UaIF2+8hQSieEX6d0uKpNA4HUIsEN1EiLTbb/fL8ZFE=; fh=XeKcMDALGELuy/HT+xYyY/hQRZOiebbPjJ8rPiNfUr0=; b=CKBWcjsUaaOZywWZyJrDeOS/GV48eI06Mcq7y9kHwoL2Tth4Gr3c7US55j9xnmGrrk RZAv6jX/Tq8vMUZkIhwjRDyyQ2bpULMKoCJt3lUmTf2CBlkrfZMVFov7WW/oBkSG2YvR Z+lrIBJBupEUcKC0GTe3BmzzAdj18R1doCApPI9KHFyYBbSVDLCHbtFmdriiPZzCwZf6 lhCuM36y0nD0UKuBKP8RG2DP2qZB4PGs0SlKBRLSnWirP/loxrTTc15bhAXyzKE8c8YL qFfrvo8O87zRf19NaP4jKTVeFQHQqWOthjzR3KGHDyvr8/PyyODs/cR31a0mYoJZyn7X 9HCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=c6OnnSu7; 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-110917-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110917-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f21-20020a05620a15b500b0078a2e0b6d87si1191727qkk.16.2024.03.21.20.52.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 20:52:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110917-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=c6OnnSu7; 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-110917-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110917-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EC9801C22C57 for ; Fri, 22 Mar 2024 03:51:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05F0A79E1; Fri, 22 Mar 2024 03:51:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="c6OnnSu7" Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 5D8906FD5 for ; Fri, 22 Mar 2024 03:51:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711079495; cv=none; b=foFNHLaDUK3Brkeg/hojUSKK/e+oNoQJ75p+eL72K4OM+RtJSmV+B4GkP7yPJ682/3h+nH/MSupGBtS3QArAIuMqt/czR0rqkIE3tHaLMvES/5yx/3/zGEq6fPfW3ECz2FJoOYbXd5RvREp7KQoAG0aY0AfQgT4LqC/QOpWqkPE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711079495; c=relaxed/simple; bh=LS0IXVsPleK1aMN/6K6ybl1byGi+r7pZ03/ee8W/hBo=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=r93sWvJMdsxy4QC43bQzGcjRxrhTM4WEXVSMRp1wz58q974FalXmNbETw/IAnd+Dq0MaPYIjTXZKg9ETsYEaw+/04/6YZRzJJgixQp+2mh3L4wD9VzNtWuP2fDS0kqLGo4WWqgEYGNjRkU0fcvnK2RdJOsoTI12NOgC29hI1ZHg= 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=c6OnnSu7; arc=none smtp.client-ip=91.218.175.186 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 Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711079489; 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=UaIF2+8hQSieEX6d0uKpNA4HUIsEN1EiLTbb/fL8ZFE=; b=c6OnnSu7jEaq5y4PVZMLdPPPivACLp51RaEGGzzyElG8w60NAeJDf+ySg9Jz5dzZfTRFUb SZBgaRD8q9t7ZbJV6wlRMxk9kYqyC1ODoFB15GzxIlSpt0egR0tL0r56Pp/FdTruOfdu2m SLvKKRA0y+1czF54k4L5/tU+CucaKXY= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: Re: [PATCH] selftests/mm: run_vmtests.sh: Fix hugetlb mem size calculation X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20240321215047.678172-1-peterx@redhat.com> Date: Fri, 22 Mar 2024 11:50:50 +0800 Cc: Linux-MM , LKML , Andrew Morton , Muhammad Usama Anjum , David Hildenbrand , Nico Pache Content-Transfer-Encoding: 7bit Message-Id: <56CA06CD-3F37-4268-B1B1-9C376AF9B136@linux.dev> References: <20240321215047.678172-1-peterx@redhat.com> To: Peter Xu X-Migadu-Flow: FLOW_OUT > On Mar 22, 2024, at 05:50, peterx@redhat.com wrote: > > From: Peter Xu > > The script calculates a mininum required size of hugetlb memories, but > it'll stop working with <1MB huge page sizes, reporting all zeros even if > huge pages are available. > > In reality, the calculation doesn't really need to be as comlicated either. ^ complicated? > Make it simpler and work for KB-level hugepages too. > > Cc: Muhammad Usama Anjum > Cc: David Hildenbrand > Cc: Nico Pache > Cc: Muchun Song > Signed-off-by: Peter Xu Reviewed-by: Muchun Song Thanks.