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=-2.8 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 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 9F800C4361A for ; Sat, 5 Dec 2020 04:49:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1D32922B4E for ; Sat, 5 Dec 2020 04:49:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D32922B4E 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 434496B0036; Fri, 4 Dec 2020 23:49:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BE606B005D; Fri, 4 Dec 2020 23:49:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 284476B0068; Fri, 4 Dec 2020 23:49:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 0DDE46B0036 for ; Fri, 4 Dec 2020 23:49:10 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C37EF363B for ; Sat, 5 Dec 2020 04:49:09 +0000 (UTC) X-FDA: 77557999218.15.jar73_4011e47273ca Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 9B7441814B0C7 for ; Sat, 5 Dec 2020 04:49:09 +0000 (UTC) X-HE-Tag: jar73_4011e47273ca X-Filterd-Recvd-Size: 6041 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Sat, 5 Dec 2020 04:49:08 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id lb18so1794747pjb.5 for ; Fri, 04 Dec 2020 20:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=Nb9T4leS4Okb7bkKk074tEGv/Gy3QayUZQ2lyWI+CyQ=; b=gsJHXW8CYsLyLTGSztE7txvh3vIMuAuI05hKOHlhR0HFrQBO6CTfJYEIeyx8ndojh1 0FV2zvl0jvqa9Mnjdo8U9Tn4iteqER/YF57+OwBL3Oao94w7Fsy5uq1mr4qK3Di89Qm3 zrgeYMS+VqwCFbZrM4vin8093CMu9ZrdafYMjQS75LMmG1L4BmOowHHo/TZeuFDDwfYX Td27wU3NTZ8hTWseuXT6puZdomZRynpZbhCGO2yimfIVAk5gaL6Gjrax2Ic6A0rjXeXb Rp4LeNAyAgUZO2fmQFhnksDdyz0pfUZA5AroTTuKFIjh0Ml/LbzvjNafCw0TvDfT8pkn OV3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Nb9T4leS4Okb7bkKk074tEGv/Gy3QayUZQ2lyWI+CyQ=; b=b3+yhRMhgI1nKSsx47vcb0Aj4+mcb+iUxZ4pDLYjBOueyW0MZkDm0Fv/XrprBgVC6A I4G6PbR7QTFcrNPwaFbm6kkest21ZdQKROgTYe/T2FGz+AoiA/gQuGb3U4TbaDxKmYN0 B4XU3gS9g+khmdsxuXuzdpYQNaRzpaSvhTw9F6QBTXxtbLrtceXcukqp/xkH99ofJjrM M5VqDEeZW9+EPXiRO/hpwKVgKf9TKg5AAwBdVH+I1/MI9i0U+rO4sChdnXfn7TNXA6Lp F1AaO8dE3E3M8tp7aQ+fxd5cl0YNWPSBWLrrxJlnv11r6cK8kWyZXdwteCRMOQcnAbJb NrPQ== X-Gm-Message-State: AOAM532LUaQnTVG5G25Lq5LUx/Be8ZRz6GvAiuIckoqA0CQnTp6SbFts XEIvdF5fIT+zib+uth9vZrA= X-Google-Smtp-Source: ABdhPJyib/qkhvo5CnfZZZ++38N/B+omKeTLXjREaNcrLJrVPtGwsFQpMnAhzrFUjxmdaRS0GTqXjA== X-Received: by 2002:a17:902:8309:b029:da:1140:df85 with SMTP id bd9-20020a1709028309b02900da1140df85mr6851672plb.46.1607143748095; Fri, 04 Dec 2020 20:49:08 -0800 (PST) Received: from localhost ([1.129.238.242]) by smtp.gmail.com with ESMTPSA id q23sm6620406pfg.18.2020.12.04.20.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 20:49:07 -0800 (PST) Date: Sat, 05 Dec 2020 14:49:00 +1000 From: Nicholas Piggin Subject: Re: [PATCH v8 11/12] mm/vmalloc: Hugepage vmalloc mappings To: "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "Edgecombe, Rick P" Cc: "christophe.leroy@csgroup.eu" , "hch@infradead.org" , "Jonathan.Cameron@Huawei.com" , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "lizefan@huawei.com" References: <20201128152559.999540-1-npiggin@gmail.com> <20201128152559.999540-12-npiggin@gmail.com> <1607068679.lfd133za4h.astroid@bobo.none> <2e8e1f3e47736e8f5e749cee85b7036cbf9cb1b5.camel@intel.com> In-Reply-To: <2e8e1f3e47736e8f5e749cee85b7036cbf9cb1b5.camel@intel.com> MIME-Version: 1.0 Message-Id: <1607142139.ple4gyiix8.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 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: Excerpts from Edgecombe, Rick P's message of December 5, 2020 4:33 am: > On Fri, 2020-12-04 at 18:12 +1000, Nicholas Piggin wrote: >> Excerpts from Edgecombe, Rick P's message of December 1, 2020 6:21 >> am: >> > On Sun, 2020-11-29 at 01:25 +1000, Nicholas Piggin wrote: >> > > Support huge page vmalloc mappings. Config option >> > > HAVE_ARCH_HUGE_VMALLOC >> > > enables support on architectures that define HAVE_ARCH_HUGE_VMAP >> > > and >> > > supports PMD sized vmap mappings. >> > >=20 >> > > vmalloc will attempt to allocate PMD-sized pages if allocating >> > > PMD >> > > size >> > > or larger, and fall back to small pages if that was unsuccessful. >> > >=20 >> > > Allocations that do not use PAGE_KERNEL prot are not permitted to >> > > use >> > > huge pages, because not all callers expect this (e.g., module >> > > allocations vs strict module rwx). >> >=20 >> > Several architectures (x86, arm64, others?) allocate modules >> > initially >> > with PAGE_KERNEL and so I think this test will not exclude module >> > allocations in those cases. >>=20 >> Ah, thanks. I guess archs must additionally ensure that their >> PAGE_KERNEL allocations are suitable for huge page mappings before >> enabling the option. >>=20 >> If there is interest from those archs to support this, I have an >> early (un-posted) patch that adds an explicit VM_HUGE flag that could >> override the pessemistic arch default. It's not much trouble to add >> this=20 >> to the large system hash allocations. It's very out of date now but >> I=20 >> can at least give what I have to anyone doing an arch support that >> wants it. >=20 > Ahh, sorry, I totally missed that this was only enabled for powerpc. >=20 > That patch might be useful for me actually. Or maybe a VM_NOHUGE, since > there are only a few places where executable vmallocs are created? I'm > not sure what the other issues are. Yeah good question, VM_HUGE might be safer but maybe it would be=20 possible there's only a few problems that have to be annotated with VM_NOHUGE, good point. I'll dig it out and see. > I am endeavoring to have small module allocations share large pages, so > this infrastructure is a big help already. > https://lore.kernel.org/lkml/20201120202426.18009-1-rick.p.edgecombe@inte= l.com/ Oh nice that's what I wanted to do next! We should try get this work for x86 as well then. Thanks, Nick