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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5F01C433EF for ; Tue, 18 Jan 2022 17:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:Subject:From:References:Cc:To:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=20G/RyaKr6tOkPTrS8paDnvgdAmicJN7DnTDkq7ckG4=; b=3d+Em+6aeuu2LiI6+FkaYSnHTp zSAbQ3oO4KZ6sg8HR+q6QcpIkLiCBadBHKm6cu0HkJ/DA98ggb2DPYmCSAkNghiNFPG/+9cF0Mkrp TgbgnG8YFk7SCV2xB0A8u4UBv6Hs4BMC6quAaYCT+dflOJ99uLblKhR/NF4KJV0l6+hKoSTQKVtv5 RCyRPkOJgE8f4/NkevHSvP3WaHVtPSY5qDnXwQj2PWNUAwbVR/MeVB1pKo6mnbIrk3o/MQR9mRuzO YYya+Wwua2uPCn7Gn5Eeocg99Rk+zOkvYmMH9pDmu8YY0j+KaZQNQ4HnOhO5FKti/w88xn4jpqyvy r2Gm5fig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9sIA-002Qoz-FF; Tue, 18 Jan 2022 17:29:10 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9sI7-002QoF-2H for linux-arm-kernel@lists.infradead.org; Tue, 18 Jan 2022 17:29:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642526947; x=1674062947; h=to:cc:references:from:subject:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=k4eJH2zoU91Kl9uf4FCGcvt/8O88IEchGIaQVuOy/n8=; b=E2js44xeTIxyAEgl7jDqCNH8SEFEvMcQX/hvsD/JFhejs+hVluFtSQwh GKvSvLS3zhH6ecqJFjYCdf65U9MsJuyRFXfMDFTgKiQ/VSuoHWMfPSmsv lTpT/gTm4Xg64XYfU9Jhcebhi/NkBSYcIlQcCRODOthXQILaSgyIVC6wd iZ7hL9qenmGhvtSi8DBHbQeyhmn4305O2jgEfBmsnC3RWbwhHDTiD6Xhr TXDRHCH2lz50sVMnLBJal10hmvacPG30JOCI9AP3G7OlS8kuDlD2YkVMJ UdXKWhoPxzAwo/NNBHlqcU8mS9JOZ1Euu3vRXQ/0x6t1SS9GuZlFr+0a9 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10230"; a="224847779" X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="224847779" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 09:28:48 -0800 X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="764657295" Received: from ssrikan2-mobl2.amr.corp.intel.com (HELO [10.209.52.128]) ([10.209.52.128]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 09:28:47 -0800 To: Nicholas Piggin , Andrew Morton , Jonathan Corbet , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, Kefeng Wang , x86@kernel.org Cc: Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Michael Ellerman , Paul Mackerras , Thomas Gleixner , Will Deacon , Matthew Wilcox References: <20211227145903.187152-1-wangkefeng.wang@huawei.com> <20211227145903.187152-4-wangkefeng.wang@huawei.com> <70ff58bc-3a92-55c2-2da8-c5877af72e44@intel.com> <3858de1f-cdbc-ff52-2890-4254d0f48b0a@huawei.com> <31a75f95-6e6e-b640-2d95-08a95ea8cf51@intel.com> <1642472965.lgfksp6krp.astroid@bobo.none> From: Dave Hansen Subject: Re: [PATCH v2 3/3] x86: Support huge vmalloc mappings Message-ID: <4488d39f-0698-7bfd-b81c-1e609821818f@intel.com> Date: Tue, 18 Jan 2022 09:28:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <1642472965.lgfksp6krp.astroid@bobo.none> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220118_092907_141729_E0FD3A6A X-CRM114-Status: GOOD ( 18.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/17/22 6:46 PM, Nicholas Piggin wrote: >> This all sounds very fragile to me. Every time a new architecture would >> get added for huge vmalloc() support, the developer needs to know to go >> find that architecture's module_alloc() and add this flag. > This is documented in the Kconfig. > > # > # Archs that select this would be capable of PMD-sized vmaps (i.e., > # arch_vmap_pmd_supported() returns true), and they must make no assumptions > # that vmalloc memory is mapped with PAGE_SIZE ptes. The VM_NO_HUGE_VMAP flag > # can be used to prohibit arch-specific allocations from using hugepages to > # help with this (e.g., modules may require it). > # > config HAVE_ARCH_HUGE_VMALLOC > depends on HAVE_ARCH_HUGE_VMAP > bool > > Is it really fair to say it's *very* fragile? Surely it's reasonable to > read the (not very long) documentation ad understand the consequences for > the arch code before enabling it. Very fragile or not, I think folks are likely to get it wrong. It would be nice to have it default *everyone* to safe and slow and make *sure* they go look at the architecture modules code itself before enabling this for modules. Just from that Kconfig text, I don't think I'd know off the top of my head what do do for x86, or what code I needed to go touch. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel