Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp66897lfe; Fri, 15 Apr 2022 19:50:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR8AA7HXt2Nc/Y/Pa5A4BY+rLW62MCeOHvtpeE2htC1ni3utRSNPTkp7tiw8fZ3TuwdmET X-Received: by 2002:aa7:90d5:0:b0:4e1:307c:d94a with SMTP id k21-20020aa790d5000000b004e1307cd94amr1757725pfk.38.1650077426035; Fri, 15 Apr 2022 19:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650077426; cv=none; d=google.com; s=arc-20160816; b=gpHnhyKxWslu+D8uCH+r4KVtIIzzOgUaCkkxyJkOzumqa9ZACV+/gZ2ib9Mat7NLJH ZJiDoW1QpnPVRUUqZWsZAkXFpALuJbOf4VMXjhw6y4jDnNnZiWH7EYyqehuM63+nd3+G s9lDOGu+4rSajeTzozv+gN5KL2b1TIYL9XKoawEW6ihhm+luKZ+7FC4QZvNQBA3Hsar8 Jip2sKDZhn3YQNeRAiFf9o9suW+BUF7M1H3Xc6TAZ+lQyxJ2nAxBTeECBhe081nw7TBT Bwl8RknG6uQPGCmSzGNzAecDrf2392NfFBvspT/E/vBUEHl6xy8DC1Z43uBu81nSNMNI ndbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XJISY/5gbBOz33SR3OgXE4mJEB7LAs5RDVqnN5V8KYk=; b=P8BrSrJoFhl2TwCxX19k0QkqELP0j5vlCjtBKz0c/jK43SAWRq16PHBGaw5DPNaSoW GnGjBaoO9+7S8HRJ9o8QnOA0p87opo3Ip+GVOUN2wnTfz1ofWgfsb7lSTx4o2Zi+flp6 t7mlvYbmmWLuO++J9XaCzvwDmPwD49bYU05KF6wMw0KaeEmKMme5Pb2zuNumUB+NX44X GXrYnihyBqRKby4+0/GaoEfmrF059PtD0J0/s6Rnn9sFu4m2Bdtma8pqd/9rIbEAZmtw FP8f5m56WTlUFwKgrw7MPaDkn4EqRWCfmPtWokiLXBGfbY79S6cb0d5qcrIQx4GLHEyE qybA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pq3Szjbh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y2-20020a170902d64200b00158b60545dcsi2643113plh.207.2022.04.15.19.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pq3Szjbh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 378A12CC93; Fri, 15 Apr 2022 19:08:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbiDPCJB (ORCPT + 99 others); Fri, 15 Apr 2022 22:09:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbiDPCGY (ORCPT ); Fri, 15 Apr 2022 22:06:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE22966632; Fri, 15 Apr 2022 18:57:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 54CFB622DA; Sat, 16 Apr 2022 01:34:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7D10C385AB; Sat, 16 Apr 2022 01:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650072870; bh=G2r0hwQVplCHQ7ULSTnFo0Naiy/A7faEgp5IvkPlONE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Pq3SzjbhQTusy5kohaS/V6DGX7cLkZ2tDW7LFljSG6yIehpOqQcJxHBB5R/2ZCRgt /biILVADCenQL3RyHWBcsunQiVh1BKsFzdBhqI7ZOV7NZC/OwU2UM84qtKUFnQHEl2 2SA01AeyL4/21GXs0IcIwHCkl5O6ISh/eiFDRMwcgJ4hhP97KHwK+s/MeU9/UV0bLy WasqSynTsTSfGVKx9sj6BBpAxpBZTwHTD9R678qDMMq4wuP/vAPAKWIXs8SdbWbZVX Jug5v/gcYurNurwI21M/9qWJAItbWhk2vYzSN6OSfrty2S8HCmFt3FR6ogSR8A/g5J 0ij0JO47VE1qQ== Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-2ef4a241cc5so89939167b3.2; Fri, 15 Apr 2022 18:34:30 -0700 (PDT) X-Gm-Message-State: AOAM531BNK5y8s9TXUZ35SyncpjtxX60sbaFQLjBm0yo6v94/ObDFz5m 3D3v2ffw+HRHwO5nczIoscBgJNjHFJqw9M4NZXM= X-Received: by 2002:a81:5087:0:b0:2ef:33c1:fccd with SMTP id e129-20020a815087000000b002ef33c1fccdmr1455985ywb.73.1650072869799; Fri, 15 Apr 2022 18:34:29 -0700 (PDT) MIME-Version: 1.0 References: <20220415164413.2727220-1-song@kernel.org> In-Reply-To: From: Song Liu Date: Fri, 15 Apr 2022 18:34:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 bpf 0/4] vmalloc: bpf: introduce VM_ALLOW_HUGE_VMAP To: Luis Chamberlain Cc: bpf , Linux-MM , open list , Alexei Starovoitov , Daniel Borkmann , Kernel Team , Andrew Morton , "Edgecombe, Rick P" , Christoph Hellwig , imbrenda@linux.ibm.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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? Thanks, Song [3] https://lore.kernel.org/lkml/14444103-d51b-0fb3-ee63-c3f182f0b546@molgen.mpg.de/