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 0C4C1C433F5 for ; Thu, 21 Apr 2022 02:24:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 677946B0071; Wed, 20 Apr 2022 22:24:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6272C6B0073; Wed, 20 Apr 2022 22:24:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C8346B0074; Wed, 20 Apr 2022 22:24:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 3B7C46B0071 for ; Wed, 20 Apr 2022 22:24:30 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1134725C88 for ; Thu, 21 Apr 2022 02:24:30 +0000 (UTC) X-FDA: 79379292300.16.22449CC Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by imf06.hostedemail.com (Postfix) with ESMTP id D1994180024 for ; Thu, 21 Apr 2022 02:24:28 +0000 (UTC) Received: by mail-pg1-f170.google.com with SMTP id k29so3407611pgm.12 for ; Wed, 20 Apr 2022 19:24:29 -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=/wI3QVM59jnzfvExzc3w5EEsA2aIl90/0QKeHl4f9CM=; b=W3vGZl7r3ZjtXymMnPLZs5bQLNRgN/w94RrpyGN0BiGqZ5/HMtlyoXuKEe2veSgDbc 7jvuwhGTRhJAjkDdxdRKtskBgJ+8zMjavyTI8JPcGzkzSWiYFjGDbTYwVIGAWZUQpLtr U+a/66SpkNFIqkr7wuFYVq0v3r/az7rzZYmsXoZ/O3Dnil67+CrNGO4GCnRxfkfthtnc 9dGxPyx08v3A1sSHgBbT4JKqn5Dtvpue+VOmaw7kq+hmkR7oiYeF4CLgv7ZI9JUTVhMZ qoAswAephXy9v6+53kncpD2JN+nhMom9NPD5QtdHGYtxydXUmbBYvhmNgAeIMur8SHVp /eow== 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=/wI3QVM59jnzfvExzc3w5EEsA2aIl90/0QKeHl4f9CM=; b=6EPrIhN7aPM7YHZhNOySSryCX8who97AbSNHElqKWArszeBWy5+GS1wkaRjVe8fa4x smhp7dQzhPf1a3YfhjRsMd25yo7+VZli49j0oYyfUjLry4VeFmGhq0tk/iYAkYNZs/PI E0Y3pMrpnkgVjkm/7rbZw+M1lP1/jUd/0ZefJ70dQnRK3TiAjtOcGR+93iS/DGJCGUA4 QURKMPlZHLff+JQrxR/yOu3GFTBOemkiLsHeIJPXDwxun9emDNyGAJsSmAnA8r1iGqa2 qe8PebXgIghtXJTYi4m6eV0p8+xi/uLBfch0u/ubtgPixNXsJ8UVIvfxVQBoPnRs+ns1 xkLA== X-Gm-Message-State: AOAM5310w74o0VIqH0g++Aly/wK9W1aJ+ujd5R64IRjSSWzkIFdKB7j/ iGpNDMqYr4M6ZSNbNUmynawsouYyAz0= X-Google-Smtp-Source: ABdhPJwDreTNr9TQGQiEgLFd2JcwXp5IZ6wi0i625PLqgWPFG0mu3wBzk9UyJ4/IDgqaPL3UnCgyyw== X-Received: by 2002:aa7:88cd:0:b0:50a:9579:a1b with SMTP id k13-20020aa788cd000000b0050a95790a1bmr11381732pff.25.1650507868641; Wed, 20 Apr 2022 19:24:28 -0700 (PDT) Received: from localhost ([203.221.203.144]) by smtp.gmail.com with ESMTPSA id hi21-20020a17090b30d500b001cd4989ff4csm532182pjb.19.2022.04.20.19.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 19:24:28 -0700 (PDT) Date: Thu, 21 Apr 2022 12:24:22 +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> In-Reply-To: MIME-Version: 1.0 Message-Id: <1650507506.z839xl6pvt.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=W3vGZl7r; spf=pass (imf06.hostedemail.com: domain of npiggin@gmail.com designates 209.85.215.170 as permitted sender) smtp.mailfrom=npiggin@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: hfwdozgmd7ffj3tkbhdyzmhgf3jfe6n7 X-Rspamd-Queue-Id: D1994180024 X-Rspamd-Server: rspam04 X-Rspam-User: X-HE-Tag: 1650507868-629524 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 Song Liu's message of April 12, 2022 4:00 pm: > On Mon, Apr 11, 2022 at 9:18 PM Christoph Hellwig wro= te: >> >> On Mon, Apr 11, 2022 at 04:35:46PM -0700, Song Liu wrote: >> > Huge page backed vmalloc memory could benefit performance in many case= s. >> > 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 users >> > that may try to allocate >=3D PMD_SIZE pages, but are not ready to han= dle >> > huge pages properly. >> >> This is a good place to document what the problems are, and how they are >> 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 th= at >> > 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: 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). Curious what the problem is though. powerpc so far has not required any special case outside arch/powerpc/ for this so I would much prefer x86 to fix itself rather than add APIs which non-arch code really shouldn't need to know about. Thanks, Nick