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 151A2C433F5 for ; Thu, 21 Apr 2022 03:36:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E8DC6B0071; Wed, 20 Apr 2022 23:36:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6720A6B0073; Wed, 20 Apr 2022 23:36:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 512296B0074; Wed, 20 Apr 2022 23:36:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 3FFCE6B0071 for ; Wed, 20 Apr 2022 23:36:17 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 1560C80D06 for ; Thu, 21 Apr 2022 03:36:17 +0000 (UTC) X-FDA: 79379473194.03.84A0551 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by imf20.hostedemail.com (Postfix) with ESMTP id E1DC91C0021 for ; Thu, 21 Apr 2022 03:36:15 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id g9so3535828pgc.10 for ; Wed, 20 Apr 2022 20:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=KZBHfUAnf51a3ognrNtvN+eHbKSNCphMcLIe5ZMRThc=; b=PCe7bAX3iBfbqv9eSgOGEg9WCaXfFJFt7TVzTbPMK1ZiGF3DJ/i7ikNIzthtoLSoIm 9Jb4x3JftBxcolj7nk8HkUV51ivT9/2Dfz88vO69fCPSvSpgV3oqxaNazPDry8yY9BW/ V9gz+YBHh+TtRQKfdNGU+1hfdJzKaaNbA2Z77aWYHH/Wg1j7lMpD1yzXs5SsdDm+3Vpo zDIq4egIgAJWxkJKnAD6dQncYLtimp3cYFesXxI1rrX28Nnr2y4INRP8uo+ZtbFx/9l+ OemD6U2GUfzmg8dJTnVr0am2i3X0DjLbmO+T7aO6QL+U0I/vjvpiMlLSUHSbj3UZbQQs dSTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=KZBHfUAnf51a3ognrNtvN+eHbKSNCphMcLIe5ZMRThc=; b=HSRCojZ8eh21Z/i8eFi4k4ee/Pxt8pwzaRTvZNeQ8QcvdYi8raDVLpqUd6hDWzHNa8 UKp2cPzqxMwlLFrdUUAB5dYHRpgj+TyahDgorTwsMZpfrdDfjJ3NrcfTHzUDPZW8D34w NvRtTgaXRRleHQFF8+xYNNzDi1fdx+CCJwmjGIWSbgL3l1/4bZZ+bNsLxVuaTHYMtVTj zGBfcugfW36KWtpVDoZxIG3COctvl2/GMbpEVZgGpD1AJKVtK1BVEhlICtq+50HWwbeJ e1nR6yV930BfvUtc7tfuBwGyGnQG0LHXFvHKB4GJFoulsm2Qv98tEdZh94vXfiG3KvLc xX4Q== X-Gm-Message-State: AOAM533hxFvRcpi09b2D6QyJ15xqKHl2klgAnJbZb1soIbMzv0ete3KS Hyna3JFQaEn9p9ExxpvpOG0= X-Google-Smtp-Source: ABdhPJxQr9J+ROdkc9BycRypV+qU0m5iXTY6LBPfnBUZC934BBe41CdVYGTJUGyVbs+jMCvc5Fxcxg== X-Received: by 2002:a63:de01:0:b0:3aa:2cf6:faf7 with SMTP id f1-20020a63de01000000b003aa2cf6faf7mr11477691pgg.224.1650512175591; Wed, 20 Apr 2022 20:36:15 -0700 (PDT) Received: from localhost (58-6-252-72.tpgi.com.au. [58.6.252.72]) by smtp.gmail.com with ESMTPSA id k22-20020aa790d6000000b0050a765d5d48sm12861566pfk.160.2022.04.20.20.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 20:36:14 -0700 (PDT) Date: Thu, 21 Apr 2022 13:35:55 +1000 From: Nicholas Piggin Subject: Re: [PATCH v2 bpf 1/3] vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP To: Christoph Hellwig , Song Liu Cc: Andrew Morton , Andrii Nakryiko , Alexei Starovoitov , bpf , Daniel Borkmann , imbrenda@linux.ibm.com, open list , Linux-MM , Luis Chamberlain , rick.p.edgecombe@intel.com References: <20220411233549.740157-1-song@kernel.org> <20220411233549.740157-2-song@kernel.org> <1650507506.z839xl6pvt.astroid@bobo.none> In-Reply-To: <1650507506.z839xl6pvt.astroid@bobo.none> MIME-Version: 1.0 Message-Id: <1650512125.tnay4e9v4h.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: E1DC91C0021 X-Stat-Signature: trn8kde7zk4xbiz3ki86kac5y6bnp1rx Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PCe7bAX3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf20.hostedemail.com: domain of npiggin@gmail.com designates 209.85.215.179 as permitted sender) smtp.mailfrom=npiggin@gmail.com X-HE-Tag: 1650512175-325064 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: Excerpts from Nicholas Piggin's message of April 21, 2022 12:24 pm: > Excerpts from Song Liu's message of April 12, 2022 4:00 pm: >> On Mon, Apr 11, 2022 at 9:18 PM Christoph Hellwig wr= ote: >>> >>> On Mon, Apr 11, 2022 at 04:35:46PM -0700, Song Liu wrote: >>> > Huge page backed vmalloc memory could benefit performance in many cas= es. >>> > Since some users of vmalloc may not be ready to handle huge pages, >>> > VM_NO_HUGE_VMAP was introduced to allow vmalloc users to opt-out huge >>> > pages. However, it is not easy to add VM_NO_HUGE_VMAP to all the user= s >>> > that may try to allocate >=3D PMD_SIZE pages, but are not ready to ha= ndle >>> > huge pages properly. >>> >>> This is a good place to document what the problems are, and how they ar= e >>> hard to track down (e.g. because the allocations are passed down I/O >>> stacks) >>=20 >> Will add it in v3. >>=20 >>> >>> > >>> > Replace VM_NO_HUGE_VMAP with an opt-in flag, VM_ALLOW_HUGE_VMAP, so t= hat >>> > users that benefit from huge pages could ask specificially. >>> > >>> > Also, replace vmalloc_no_huge() with opt-in helper vmalloc_huge(). >>> >>> We still need to find out what the primary users of the large vmalloc >>> hashes was and convert them. >>=20 >> @ Claudio and Nicholas, >>=20 >> Could you please help identify users of large vmalloc? So far, I found >> alloc_large_system_hash(), and something like the following seems to >> work: >=20 > The large system hashes were the main ones I was interested in. IIRC=20 > there was a few more in some drivers or tracing things depending on > config but those are less important (to me at least). Oh there is also a reverse map array in KVM now I think of it. Thanks, Nick