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,URIBL_BLOCKED,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 A1163C2BB86 for ; Tue, 14 Apr 2020 13:31:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5C90120575 for ; Tue, 14 Apr 2020 13:31:04 +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="KmMeUj3M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C90120575 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 0CCD58E0018; Tue, 14 Apr 2020 09:31:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A4008E0003; Tue, 14 Apr 2020 09:31:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFBCC8E0018; Tue, 14 Apr 2020 09:31:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0254.hostedemail.com [216.40.44.254]) by kanga.kvack.org (Postfix) with ESMTP id D64558E0003 for ; Tue, 14 Apr 2020 09:31:03 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 87EAB52CC for ; Tue, 14 Apr 2020 13:31:03 +0000 (UTC) X-FDA: 76706546406.18.table23_933cb15e205d X-HE-Tag: table23_933cb15e205d X-Filterd-Recvd-Size: 5608 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Apr 2020 13:31:03 +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=St6pI1zBFt7Bf4M5c9QT48qGrtLj/1D4E7IIJW6gPyw=; b=KmMeUj3MnDZJQG3q0UIbLIqe54 +f5wB1SXlUTJUKGJxN+9GtxE1XijgFKmopyh1BNHGbZavM38F7wJj3WhSHCaFO5E9+Qh5F5qnBzvg HoXBOsCcwFfTx02AZsEX9O42q4j17e3SeRODiQXDl2RM3liEcJvSXiIGyyE1xldwcX/TqQOHX7H1U zrDkEkgs4fa8Tr+JqWK+Q5S+mN1pmGKCx60X9HXSC/oibzQpM5isEVknCi5c6x2oJExW+aZNPp/VB RGCaLRizOR6Dl3bbJ/WsN7NLyx/0dmIB6pDtlVe+p5Qh0cdNk/an6d8KogUsMj/j3usSpbssW5gzi TKlDPgRw==; Received: from [2001:4bb8:180:384b:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOLPK-00010M-Az; Tue, 14 Apr 2020 13:15:18 +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 25/29] mm: switch the test_vmalloc module to use __vmalloc_node Date: Tue, 14 Apr 2020 15:13:44 +0200 Message-Id: <20200414131348.444715-26-hch@lst.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200414131348.444715-1-hch@lst.de> References: <20200414131348.444715-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 Acked-by: Peter Zijlstra (Intel) --- 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