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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2846AC433EF for ; Sat, 16 Apr 2022 01:34:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 846456B0072; Fri, 15 Apr 2022 21:34:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CC546B0073; Fri, 15 Apr 2022 21:34:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66D6B6B0074; Fri, 15 Apr 2022 21:34:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0205.hostedemail.com [216.40.44.205]) by kanga.kvack.org (Postfix) with ESMTP id 5476C6B0072 for ; Fri, 15 Apr 2022 21:34:34 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0E58618317FCE for ; Sat, 16 Apr 2022 01:34:34 +0000 (UTC) X-FDA: 79361022468.29.585C3E4 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf16.hostedemail.com (Postfix) with ESMTP id 5C1DA180005 for ; Sat, 16 Apr 2022 01:34:33 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id EE79EB831C6 for ; Sat, 16 Apr 2022 01:34:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2BCBC385A7 for ; 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-f171.google.com with SMTP id 00721157ae682-2ebebe631ccso97045107b3.4 for ; Fri, 15 Apr 2022 18:34:30 -0700 (PDT) X-Gm-Message-State: AOAM532EExPoPf8bLdP4ZFBvRH0bnNqTai/4C/HI4lqgUZPAoGjTTxsi X9BxFDZ095x5+SflFfeDrjGQN12KhBTA0bB+OQU= X-Google-Smtp-Source: ABdhPJy5ZiuwR/MEz1NUAABLIKN4yUPCqmIOYhws4Ld2Q8fuVdw0YNd1v43E0sRlgvspqLO2yY6OXD6IevZ1wTBQv7Y= 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-Rspam-User: X-Rspamd-Queue-Id: 5C1DA180005 X-Stat-Signature: zaeycd8x6qfqt5fhhiyu6iepfxg781wf Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Pq3Szjbh; spf=pass (imf16.hostedemail.com: domain of song@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=song@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam01 X-HE-Tag: 1650072873-459655 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 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/