Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp534346ybb; Wed, 8 Apr 2020 05:03:59 -0700 (PDT) X-Google-Smtp-Source: APiQypJepeJ3zbjDqrY4ITRnE7TpWbRvAA083ge2NO4MndxkiaaulINKDqzJMIh4PF6b2GM0ppOX X-Received: by 2002:aca:5345:: with SMTP id h66mr2224853oib.110.1586347439167; Wed, 08 Apr 2020 05:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586347439; cv=none; d=google.com; s=arc-20160816; b=Gr7qwdOcXfTQhJhH4SamG9sBDxs+FSE632gmKXWaOzA0Z4CkW5dIQQDZ/BE2UwAfFT hY6QvcIblECVLNrVL99wO30lHG4J8dmOiKsCxDueIQZy9QIN2aKtu4U9URWBD2TVoegd fDYh8VUmY64SJgeL0k8804tNLzeD5+iwMNnRFZWdrtTkBdYxRI17UXS+B8rmdOuxgr5L meEDiEJdlIJO7gR15KW+ZQ4pxpic68HV4AaLPROGntD1UQ1W4D4ORt45DDOElZCWVVnA VyGlP0gQRrp29pXgGfvWYC/uqzuZYDIcUuu6L+LFwuODvNsbgWdT1ELiI4PAEs09niuS GBOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wZGu7E9NrB8a6JOqBsvTFS2592UYD4YuthrlJ5Mfj4Q=; b=AIf062X2csmhoCtm/dU34rykxy8Rf9m0U+XRfrIBy8dCXAp+hYJ+vdu4aejMZ6GzvL LNbbnj7MOdBA3P7ZUiN9bEiPKMw2XnsIXBAdJveux6l4DmjeAG3272i9kXyM+8QODPV/ fFq39uDgFPRPBnvVH6VkWZ3apOI6Zc3r0w7MArxSnHx0ceWmYB3WRQFvX8ec0BnSKCat ALRGohqhKXUhkl2t/3CJB13CJLn+K/r740Po1fY0DwOIlXNjt81QQ71+iwZReroYmJ8L FTn2YmNww5LVd21mxf8Jsqn86DMLpOvpMqlwvLkGeWoych6Cyqv8xsABRgrdkkt5O9CM LX1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XJuv7igy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w65si2692876ooa.42.2020.04.08.05.03.30; Wed, 08 Apr 2020 05:03:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XJuv7igy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729012AbgDHMBO (ORCPT + 99 others); Wed, 8 Apr 2020 08:01:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51554 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729009AbgDHMBL (ORCPT ); Wed, 8 Apr 2020 08:01:11 -0400 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 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = ((rnd % 10) + 1) * PAGE_SIZE; - ptr = __vmalloc_node_range(size, align, - VMALLOC_START, VMALLOC_END, - GFP_KERNEL | __GFP_ZERO, - PAGE_KERNEL, - 0, 0, __builtin_return_address(0)); - + ptr = __vmalloc_node(size, align, GFP_KERNEL | __GFP_ZERO, + __builtin_return_address(0)); if (!ptr) return -1; @@ -118,12 +114,8 @@ static int align_shift_alloc_test(void) for (i = 0; i < BITS_PER_LONG; i++) { align = ((unsigned long) 1) << i; - ptr = __vmalloc_node_range(PAGE_SIZE, align, - VMALLOC_START, VMALLOC_END, - GFP_KERNEL | __GFP_ZERO, - PAGE_KERNEL, - 0, 0, __builtin_return_address(0)); - + ptr = __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL | __GFP_ZERO, + __builtin_return_address(0)); if (!ptr) return -1; @@ -139,13 +131,9 @@ static int fix_align_alloc_test(void) int i; for (i = 0; i < test_loop_count; i++) { - ptr = __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 = __vmalloc_node(5 * PAGE_SIZE, THREAD_ALIGN << 1, + GFP_KERNEL | __GFP_ZERO, + __builtin_return_address(0)); if (!ptr) return -1; 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, unsigned long align, return NULL; } -/* - * 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 void *__vmalloc(unsigned long size, gfp_t gfp_mask) { -- 2.25.1