From patchwork Tue Nov 23 20:46:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yosry Ahmed X-Patchwork-Id: 12635309 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADAF7C433EF for ; Tue, 23 Nov 2021 20:47:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 30C7D6B0072; Tue, 23 Nov 2021 15:46:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BB996B0074; Tue, 23 Nov 2021 15:46:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 182A36B0075; Tue, 23 Nov 2021 15:46:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id 09E6F6B0072 for ; Tue, 23 Nov 2021 15:46:59 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CC02982EDA77 for ; Tue, 23 Nov 2021 20:46:48 +0000 (UTC) X-FDA: 78841378896.20.E6A579B Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) by imf04.hostedemail.com (Postfix) with ESMTP id 4536050000AE for ; Tue, 23 Nov 2021 20:46:45 +0000 (UTC) Received: by mail-pj1-f74.google.com with SMTP id bf17-20020a17090b0b1100b001a634dbd737so1990846pjb.9 for ; Tue, 23 Nov 2021 12:46:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=UhzMC3gbpAhepjgGNXDGMQ9GMejl51H6Lr8A14dJ5WE=; b=A7Kq8VbNSvNKQE0EZ9WZyxUdcgsFAVwWgZbwDSqpOLFFET3/Q7BZ8cLiG1wFxadg0W ueej/38HwlGhbYGNBTuoLGi+5DGb+YanH6H1YXuou3OyfA9mTyRzK+K1K6h4Gi3IZqpA ZOheDpT/zyvOzIo2gKXo93/nPLpWB36WqBFqDuyAMzQUmwpqF4ZmurQ70oZ6eLpnSAJ7 9Nkt9vmaedplWbz7IrDOJuNXT41bmk506mhzG3Pmx0f5myqN/MOTL2BslJ1pNY/1yEo1 QC6pGUME+FRUx9iBDGFDPED7FdvUaOAgricu807+2Tn/kcaJYMk0qbfPyhISJVQiwfm7 yfVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=UhzMC3gbpAhepjgGNXDGMQ9GMejl51H6Lr8A14dJ5WE=; b=mG4TpPOZITh1A/MCASSHEGTvw7Jioc8IzF8zk3Cf427pjX9vGhxa/6E1TFrS+ITHk1 +BcFYAkpk4DJYYcuTaF9iMIDXMM7GFL1Ang18vXlmGSkBCyCz5nHCAVNPl4GzFrA6fkM MiGFgzkOiuM4eeQT62V4YNyFkk87eeRbqcwjA1SWviKPNDoRuPFNAY4tv8PLHx258TLX pPwRnzt1SP1+ROngdILApXbfqN7OCjGI0ZGj+J7qkIC+oZVakhAx9hWqAsC6KftYwkhK ZCzv5f+vEvk2+WzzTIUHx9hYrObtb1NAqDV76ALfcA7B2lahfrL6Ir8GxoakxtB+bNpA 95Lw== X-Gm-Message-State: AOAM532uNFnm1nqntwAQcI0gLcR+NBrdMS/KHVRTaEJeLPTBIaU8x1NI b2T7w/w/ORnXh8yV3tDZU51HeLmQE31ysjhy X-Google-Smtp-Source: ABdhPJzB5qfoeMNXtsmN+t/EQtIL+awdoz0JM1gizNNZ15PIzzNjopwIwclnBVASYK+9+0A9FmUuHSa007j3Z+GI X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2327]) (user=yosryahmed job=sendgmr) by 2002:a17:903:1247:b0:143:b9b9:52a2 with SMTP id u7-20020a170903124700b00143b9b952a2mr10645431plh.35.1637700407314; Tue, 23 Nov 2021 12:46:47 -0800 (PST) Date: Tue, 23 Nov 2021 20:46:44 +0000 Message-Id: <20211123204644.3458700-1-yosryahmed@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog Subject: [PATCH] mm, hugepages: fix size in hugetlb mremap() test From: Yosry Ahmed To: Andrew Morton , Shuah Khan Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mina Almasry , Yosry Ahmed X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 4536050000AE X-Stat-Signature: 8g3xui1rohyrf5uxky47n7sdrbg43enp Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=A7Kq8VbN; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf04.hostedemail.com: domain of 3N1OdYQoKCGYcSWVcELQIHKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--yosryahmed.bounces.google.com designates 209.85.216.74 as permitted sender) smtp.mailfrom=3N1OdYQoKCGYcSWVcELQIHKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--yosryahmed.bounces.google.com X-HE-Tag: 1637700405-275535 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The hugetlb vma mremap() test mentions in the header comment that it uses 10MB worth of huge pages, when it actually uses 1GB. This causes the test to fail on devices with smaller memories. Signed-off-by: Yosry Ahmed Acked-by: Mike Kravetz --- tools/testing/selftests/vm/hugepage-mremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/hugepage-mremap.c b/tools/testing/selftests/vm/hugepage-mremap.c index 257df94697a5..551e68f97926 100644 --- a/tools/testing/selftests/vm/hugepage-mremap.c +++ b/tools/testing/selftests/vm/hugepage-mremap.c @@ -18,7 +18,7 @@ #include #include -#define LENGTH (1UL * 1024 * 1024 * 1024) +#define LENGTH (10UL * 1024 * 1024) #define PROTECTION (PROT_READ | PROT_WRITE | PROT_EXEC) #define FLAGS (MAP_SHARED | MAP_ANONYMOUS)