Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp68802lfe; Fri, 15 Apr 2022 19:58:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb7hjPo24b97DRBfK9dsC1yFvjY7Us7CD5Tu7Fn/1gobPNczZFSp450wPt+/w2xJkWq98k X-Received: by 2002:a17:90a:9416:b0:1ca:c87b:9439 with SMTP id r22-20020a17090a941600b001cac87b9439mr1930974pjo.71.1650077893443; Fri, 15 Apr 2022 19:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650077893; cv=none; d=google.com; s=arc-20160816; b=HjJ4mA/jFxLkQju6mcTFlzr/lO4zsEtoK8Pa9sevwFWlTNgL2tp4UOS4feijQn6JZV 9juAbxSPOmTYy33k03+WM866GJswZu61Ugjl/mZR/YLK7/XmorwUTux2RGHWmk8ftPI1 cwW2BeiRE1ly0Z0KyoFDNA9yViWK6e+Edkyd7QbcHHsSNVqvcQyZT0EAI6SF5H7fqKLL d1LYuY2/9WYoYbwr3c3EGDLuzu94e2tTZ0qR3pnqF9oUfDHCyNYGWVnVGb0MybmPVHCE m8K3xD2CwkKT/pIvm/zjlFYFHWThSc7IvbTRf+Ywq1QlrpnSf12/9kmkSDwjCpd69TRy zZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bUAJkklJHXouTvJvon6xbqqyKuElapQGuj6PBphCcfo=; b=Q++zArUldf3wFDTIGkUkjUXOSCTZptdyorikgvmMZ8j0WyQwYc0pMiPa1UZZ/fg1Ig DqbW1RMykACyL9nP1xA82CSmmt+KPPXr3MsKDSpFm0RI0oyE/7dpElht0DZEXllrRsNW psBBTXGGVzv93FOR7g5re1OzIC0bFNIhSEF39wc/Y60v+l4IgKNSXhdzZqgjZcfIQ0Ld NAQMwswVFD5VE2JGGTvZzWnQlVJZVLpensOjuxHaf7WuhR63qbrO4KzxXs03QB5JAsxX VFePc8nZDI3j8gSZ54MlxufAkAnfbwLI7RD9Wd7nGvaJH7v2/cTyBCveAUTpVBSZG34a K0zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Xar28tDB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c8-20020a170902848800b00153b2d16429si2793005plo.49.2022.04.15.19.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:58:13 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Xar28tDB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3505E5EBCC; Fri, 15 Apr 2022 19:20:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbiDPCWk (ORCPT + 99 others); Fri, 15 Apr 2022 22:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbiDPCWR (ORCPT ); Fri, 15 Apr 2022 22:22:17 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0989258E4F; Fri, 15 Apr 2022 19:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bUAJkklJHXouTvJvon6xbqqyKuElapQGuj6PBphCcfo=; b=Xar28tDBlyh51k6qHs4/qv6klW JKgvCYizkt8JvdgPqL/H1j3LkMzhitRPp0hQ0HS6a9NWVvVxTToJjKNkJI7Dyn4yWIPHbqL5glTOM OypgRvApQK3LjTjzi6JSMObnW8ON+wq2JRYUf9KOOtk6/OJMAh77Vv9toU//TkDz/65KgGQBzrs/P fAOhOwvrC+mjeqg4aSRZLMme4Ue6z5bBKOSbhwkdO3f3xMQOA9b23o/z+AUqtaLyHbnLFOxkvvFsn oM7JwAFu8SGO+AVK146Dzu8JrS2izXKe/H42yEiaHvsOuw+P2NyOL6rV3BSXPkGJEMroIniPDimcU 8VWh4f1Q==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfXSF-00BuRc-6s; Sat, 16 Apr 2022 01:42:27 +0000 Date: Fri, 15 Apr 2022 18:42:27 -0700 From: Luis Chamberlain To: Song Liu Cc: bpf , Linux-MM , open list , Alexei Starovoitov , Daniel Borkmann , Kernel Team , Andrew Morton , "Edgecombe, Rick P" , Christoph Hellwig , imbrenda@linux.ibm.com Subject: Re: [PATCH v4 bpf 0/4] vmalloc: bpf: introduce VM_ALLOW_HUGE_VMAP Message-ID: References: <20220415164413.2727220-1-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2022 at 06:34:16PM -0700, Song Liu wrote: > On Fri, Apr 15, 2022 at 12:05 PM Luis Chamberlain wrote: > > > > On Fri, Apr 15, 2022 at 09:44:09AM -0700, Song Liu wrote: > > > Changes v3 => v4: > > > 1. Fix __weak module_alloc_huge; remove unused vmalloc_huge; rename > > > __vmalloc_huge => vmalloc_huge. (Christoph Hellwig) > > > 2. Use vzalloc (as it was before vmalloc_no_huge) and clean up comments in > > > kvm_s390_pv_alloc_vm. > > > > > > Changes v2 => v3: > > > 1. Use __vmalloc_huge in alloc_large_system_hash. > > > 2. Use EXPORT_SYMBOL_GPL for new functions. (Christoph Hellwig) > > > 3. Add more description about the issues and changes.(Christoph Hellwig, > > > Rick Edgecombe). > > > > > > Changes v1 => v2: > > > 1. Add vmalloc_huge(). (Christoph Hellwig) > > > 2. Add module_alloc_huge(). (Christoph Hellwig) > > > 3. Add Fixes tag and Link tag. (Thorsten Leemhuis) > > > > > > Enabling HAVE_ARCH_HUGE_VMALLOC on x86_64 and use it for bpf_prog_pack has > > > caused some issues [1], as many users of vmalloc are not yet ready to > > > handle huge pages. To enable a more smooth transition to use huge page > > > backed vmalloc memory, this set replaces VM_NO_HUGE_VMAP flag with an new > > > opt-in flag, VM_ALLOW_HUGE_VMAP. More discussions about this topic can be > > > found at [2]. > > > > > > Patch 1 removes VM_NO_HUGE_VMAP and adds VM_ALLOW_HUGE_VMAP. > > > Patch 2 uses VM_ALLOW_HUGE_VMAP in bpf_prog_pack. > > > > > > [1] https://lore.kernel.org/lkml/20220204185742.271030-1-song@kernel.org/ > > > [2] https://lore.kernel.org/linux-mm/20220330225642.1163897-1-song@kernel.org/ > > > > Looks good except for that I think this should just wait for v5.19. The > > fixes are so large I can't see why this needs to be rushed in other than > > the first assumptions of the optimizations had some flaws addressed here. > > We need these changes to fix issues like [3]. Note that there might > still be some > undiscovered issues with huge page backed vmalloc memory on powerpc, which > had HAVE_ARCH_HUGE_VMALLOC enabled since the 5.15 kernel. As we > agreed, the new opt-in flag is a safer approach here. We probably should have > 1/4 and 2/4 back ported to stable. Therefore, I think shipping this > set now would > give us a more reliable 5.18 release. > > Does this make sense? Yes absolutely, but that sounds like that optimization should just be reverted completely from v5.18 isntead then no? Or if one can skip the optimizations for v5.18 with a small patch, and then enable for v5.19. Luis