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=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 E702BC48BCD for ; Wed, 9 Jun 2021 16:49:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 71716613CD for ; Wed, 9 Jun 2021 16:49:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71716613CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CF4B86B0036; Wed, 9 Jun 2021 12:49:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C7C9E6B006C; Wed, 9 Jun 2021 12:49:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACF1F6B0070; Wed, 9 Jun 2021 12:49:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 750086B0036 for ; Wed, 9 Jun 2021 12:49:24 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 048AF181AEF1E for ; Wed, 9 Jun 2021 16:49:24 +0000 (UTC) X-FDA: 78234771048.11.40C823D Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by imf04.hostedemail.com (Postfix) with ESMTP id BD085542 for ; Wed, 9 Jun 2021 16:49:20 +0000 (UTC) Received: by mail-lf1-f45.google.com with SMTP id p7so4986408lfg.4 for ; Wed, 09 Jun 2021 09:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3gyxMnoRbxZRykvLr0IvxpYyG30m6bnQauem2mqaYuE=; b=bqV8Edyba/9+2ATfjOdGoik5skLG7JqjUNrGKFLdyIPQ4E02O1rM8v9UuFEkqCr/Rj +k9CepUb0UuyqBRc9MFQemqFiuK9/2nAZJ8BwE1k4pG7ggZ3FUl6LxQsHXB8lBZTrOK7 jpVwnYVNJwIGP7ELL0hhcwZaxyrmY/oZDP8Rl5YJnAVlvcQI4J0chqNu7tMIwrkbkmPG oNB8VndF9inx71al5Jk/cMzxuAdOcc6AKBlWfNxc0XTx6Hpeh8d+bLdsiKDkBz2ruB+G iY4cT6AEV1wIpe6y9HAK981qXvYKxvHk6HVApPu1bYGV8F6TUymYNPBzMO/XET/t3C4N qxng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3gyxMnoRbxZRykvLr0IvxpYyG30m6bnQauem2mqaYuE=; b=owNd/NbmrR4ZpuVNfBOT/6SiWPAF+F9WpxQQLQJzsL+awjYQ+j2Z21REEhFKOQdHDg 5WVo8miJI+ZeBLLUh7Ya2hC6X2WjLZbmqwPutwTtT38cPH12snCCcPeIDAjzsGBNoQoJ CMgq4JS01Ox0t/hwHQ6eAyhAmNMDQGLggMP9CTgM2a0Q8z+/7wTcuORB1l304hW3ssuO 0g0zOl4SjAC07WTiuzhsWK7CfXjY7+AnTzSVfXPkbR5Fl40lgsn6wOs5KrU1/ATQxv9b 4CYMg6PhKP9HPC0u46UOMiOlgnZ7/DKwGYdhwY885EaymkscXjPUQPbed4eVVrrlpaBG 17pA== X-Gm-Message-State: AOAM531j2PewoMSAOD2+cLrttbK7ZgoHD+Omrx2OjV6p25CfAux57WWg uonhDxYfzpX6+WsDtIIb+rE= X-Google-Smtp-Source: ABdhPJwRhPuDQP7LxDCokVoIWdr9QXFRmIQbHsiCg35TrI5owb6lII2MZIz4HoVtokdNWMPoPRrYVQ== X-Received: by 2002:a05:6512:b85:: with SMTP id b5mr286001lfv.380.1623257362065; Wed, 09 Jun 2021 09:49:22 -0700 (PDT) Received: from pc638.lan (h5ef52e3d.seluork.dyn.perspektivbredband.net. [94.245.46.61]) by smtp.gmail.com with ESMTPSA id b18sm33359lfb.277.2021.06.09.09.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 09:49:21 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Wed, 9 Jun 2021 18:49:19 +0200 To: Claudio Imbrenda Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, frankja@linux.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.com, david@redhat.com, linux-mm@kvack.org, Andrew Morton , Nicholas Piggin , Uladzislau Rezki , Catalin Marinas , Thomas Gleixner , Ingo Molnar , David Rientjes Subject: Re: [PATCH v2 1/2] mm/vmalloc: export __vmalloc_node_range Message-ID: <20210609164919.GA1938@pc638.lan> References: <20210608180618.477766-1-imbrenda@linux.ibm.com> <20210608180618.477766-2-imbrenda@linux.ibm.com> <20210609182809.7ae07aad@ibm-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609182809.7ae07aad@ibm-vm> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: BD085542 X-Stat-Signature: 5sah3b3tedbfmxfiqkzp93uxefidbcji Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=bqV8Edyb; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf04.hostedemail.com: domain of urezki@gmail.com designates 209.85.167.45 as permitted sender) smtp.mailfrom=urezki@gmail.com X-HE-Tag: 1623257360-632295 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: On Wed, Jun 09, 2021 at 06:28:09PM +0200, Claudio Imbrenda wrote: > On Wed, 9 Jun 2021 16:59:17 +0100 > Christoph Hellwig wrote: > > > On Tue, Jun 08, 2021 at 08:06:17PM +0200, Claudio Imbrenda wrote: > > > The recent patches to add support for hugepage vmalloc mappings > > > added a flag for __vmalloc_node_range to allow to request small > > > pages. This flag is not accessible when calling vmalloc, the only > > > option is to call directly __vmalloc_node_range, which is not > > > exported. > > > > > > This means that a module can't vmalloc memory with small pages. > > > > > > Case in point: KVM on s390x needs to vmalloc a large area, and it > > > needs to be mapped with small pages, because of a hardware > > > limitation. > > > > > > This patch exports __vmalloc_node_range so it can be used in modules > > > too. > > > > No. I spent a lot of effort to mak sure such a low-level API is > > not exported. > > ok, but then how can we vmalloc memory with small pages from KVM? Does the s390x support CONFIG_HAVE_ARCH_HUGE_VMALLOC what is arch specific? If not then small pages are used. Or am i missing something? I agree with Christoph that exporting a low level internals is not a good idea. -- Vlad Rezki