From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BBA2C2BB55 for ; Wed, 8 Apr 2020 12:01:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BFEBB20753 for ; Wed, 8 Apr 2020 12:01:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XJuv7igy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFEBB20753 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 72D868E001D; Wed, 8 Apr 2020 08:01:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 63C118E0020; Wed, 8 Apr 2020 08:01:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4DFE48E001D; Wed, 8 Apr 2020 08:01:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id 2E3318E000D for ; Wed, 8 Apr 2020 08:01:15 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E632440C3 for ; Wed, 8 Apr 2020 12:01:14 +0000 (UTC) X-FDA: 76684547268.10.woman93_27f2bdbd48258 X-HE-Tag: woman93_27f2bdbd48258 X-Filterd-Recvd-Size: 5558 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Wed, 8 Apr 2020 12:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=wZGu7E9NrB8a6JOqBsvTFS2592UYD4YuthrlJ5Mfj4Q=; b=XJuv7igyWlmNX35Wt5LnTOfiVc ut2/s2p5lkc2e7NGRtK/0ep9Yye9CvC2bfqNHC5wiTDSunsZCEFnS7mGRRsgXBbH41zUf6OaBSyZu Z9UeAKSlJj7qZlSMnRMllVxFd/bv7khA1komYJFhOoY6pRafnNuTWCjqS4Xx32iBL8K1+6EcYC1W+ VhR1u/2NcpsPnzoLgTgK2kmOiOE8nvcAWXAL+Zf/J1p2hbEoS2a2wVMjDmRyOBFec/y+wn/q/1+Qp 7RieU+8odbcz9cq6gbpfCXzeslEr8Yg4sP4k3r7xeHFucsQDoFm+5vYo/waxtSCMavqk09cjGzPO0 mxGjxTBw==; Received: from [2001:4bb8:180:5765:65b6:f11e:f109:b151] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jM9O2-0005jC-NA; Wed, 08 Apr 2020 12:00:55 +0000 From: Christoph Hellwig To: Andrew Morton , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , x86@kernel.org, David Airlie , Daniel Vetter , Laura Abbott , Sumit Semwal , Sakari Ailus , Minchan Kim , Nitin Gupta Cc: Robin Murphy , Christophe Leroy , Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 24/28] mm: switch the test_vmalloc module to use __vmalloc_node Date: Wed, 8 Apr 2020 13:59:22 +0200 Message-Id: <20200408115926.1467567-25-hch@lst.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408115926.1467567-1-hch@lst.de> References: <20200408115926.1467567-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Content-Transfer-Encoding: quoted-printable 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: No need to export the very low-level __vmalloc_node_range when the test module can use a slightly higher level variant. Signed-off-by: Christoph Hellwig --- lib/test_vmalloc.c | 26 +++++++------------------- mm/vmalloc.c | 17 ++++++++--------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index 8bbefcaddfe8..cd6aef05dfb4 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c @@ -91,12 +91,8 @@ static int random_size_align_alloc_test(void) */ size =3D ((rnd % 10) + 1) * PAGE_SIZE; =20 - ptr =3D __vmalloc_node_range(size, align, - VMALLOC_START, VMALLOC_END, - GFP_KERNEL | __GFP_ZERO, - PAGE_KERNEL, - 0, 0, __builtin_return_address(0)); - + ptr =3D __vmalloc_node(size, align, GFP_KERNEL | __GFP_ZERO, + __builtin_return_address(0)); if (!ptr) return -1; =20 @@ -118,12 +114,8 @@ static int align_shift_alloc_test(void) for (i =3D 0; i < BITS_PER_LONG; i++) { align =3D ((unsigned long) 1) << i; =20 - ptr =3D __vmalloc_node_range(PAGE_SIZE, align, - VMALLOC_START, VMALLOC_END, - GFP_KERNEL | __GFP_ZERO, - PAGE_KERNEL, - 0, 0, __builtin_return_address(0)); - + ptr =3D __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL | __GFP_ZERO, + __builtin_return_address(0)); if (!ptr) return -1; =20 @@ -139,13 +131,9 @@ static int fix_align_alloc_test(void) int i; =20 for (i =3D 0; i < test_loop_count; i++) { - ptr =3D __vmalloc_node_range(5 * PAGE_SIZE, - THREAD_ALIGN << 1, - VMALLOC_START, VMALLOC_END, - GFP_KERNEL | __GFP_ZERO, - PAGE_KERNEL, - 0, 0, __builtin_return_address(0)); - + ptr =3D __vmalloc_node(5 * PAGE_SIZE, THREAD_ALIGN << 1, + GFP_KERNEL | __GFP_ZERO, + __builtin_return_address(0)); if (!ptr) return -1; =20 diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ae8249ef5821..333fbe77255a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2522,15 +2522,6 @@ void *__vmalloc_node_range(unsigned long size, uns= igned long align, return NULL; } =20 -/* - * This is only for performance analysis of vmalloc and stress purpose. - * It is required by vmalloc test module, therefore do not use it other - * than that. - */ -#ifdef CONFIG_TEST_VMALLOC_MODULE -EXPORT_SYMBOL_GPL(__vmalloc_node_range); -#endif - /** * __vmalloc_node - allocate virtually contiguous memory * @size: allocation size @@ -2556,6 +2547,14 @@ void *__vmalloc_node(unsigned long size, unsigned = long align, return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END, gfp_mask, PAGE_KERNEL, 0, node, caller); } +/* + * This is only for performance analysis of vmalloc and stress purpose. + * It is required by vmalloc test module, therefore do not use it other + * than that. + */ +#ifdef CONFIG_TEST_VMALLOC_MODULE +EXPORT_SYMBOL_GPL(__vmalloc_node); +#endif =20 void *__vmalloc(unsigned long size, gfp_t gfp_mask) { --=20 2.25.1