From patchwork Fri Apr 8 22:34:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Liu X-Patchwork-Id: 12807252 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 BD179C433F5 for ; Fri, 8 Apr 2022 22:40:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C47236B0071; Fri, 8 Apr 2022 18:40:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF7986B0072; Fri, 8 Apr 2022 18:40:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ABDE16B0073; Fri, 8 Apr 2022 18:40:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 9D4536B0071 for ; Fri, 8 Apr 2022 18:40:41 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 51E3D2512B for ; Fri, 8 Apr 2022 22:40:41 +0000 (UTC) X-FDA: 79335182682.17.AFD3D97 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by imf31.hostedemail.com (Postfix) with ESMTP id C4C3420002 for ; Fri, 8 Apr 2022 22:40:40 +0000 (UTC) Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238LNYil017613 for ; Fri, 8 Apr 2022 15:40:39 -0700 Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3fauemh1dg-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 08 Apr 2022 15:40:39 -0700 Received: from twshared19572.14.frc2.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::f) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 8 Apr 2022 15:40:36 -0700 Received: by devbig932.frc1.facebook.com (Postfix, from userid 4523) id 083E85223A6E; Fri, 8 Apr 2022 15:34:50 -0700 (PDT) From: Song Liu To: , , CC: , , , , , , , , Song Liu Subject: [PATCH bpf 0/2] vmalloc: bpf: introduce VM_ALLOW_HUGE_VMAP Date: Fri, 8 Apr 2022 15:34:41 -0700 Message-ID: <20220408223443.3303509-1-song@kernel.org> X-Mailer: git-send-email 2.30.2 X-FB-Internal: Safe X-Proofpoint-ORIG-GUID: UA3vtktl5nc6uu07qC0MJOXjImVmBSV4 X-Proofpoint-GUID: UA3vtktl5nc6uu07qC0MJOXjImVmBSV4 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_08,2022-04-08_01,2022-02-23_01 X-Rspam-User: Authentication-Results: imf31.hostedemail.com; dkim=none; spf=none (imf31.hostedemail.com: domain of "prvs=5097f1d087=songliubraving@fb.com" has no SPF policy when checking 67.231.145.42) smtp.mailfrom="prvs=5097f1d087=songliubraving@fb.com"; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=kernel.org (policy=none) X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: C4C3420002 X-Stat-Signature: uz3ef7qdasir3x1baytka315g767wb5w X-HE-Tag: 1649457640-284865 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: 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/ Song Liu (2): vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP bpf: use vmalloc with VM_ALLOW_HUGE_VMAP for bpf_prog_pack arch/Kconfig | 6 ++---- arch/powerpc/kernel/module.c | 2 +- arch/s390/kvm/pv.c | 2 +- include/linux/vmalloc.h | 3 +-- kernel/bpf/core.c | 24 ++++++++++++++++++++---- mm/vmalloc.c | 19 +------------------ 6 files changed, 26 insertions(+), 30 deletions(-) --- 2.30.2