Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp937651pxb; Fri, 22 Apr 2022 14:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys9CUH5iIDm0mLchbJZGVwOE3KiD6UZGPgB+q/CQXHiAOYJJXcGKFsJ4J2t6jJp7iUb873 X-Received: by 2002:a05:6a00:23d5:b0:50a:93e9:965e with SMTP id g21-20020a056a0023d500b0050a93e9965emr7246222pfc.10.1650664186862; Fri, 22 Apr 2022 14:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650664186; cv=none; d=google.com; s=arc-20160816; b=CG2bvohKC0Wmkv+ch6u/HCHn0l8/aEVt4omJfWxF4baluXomORSyvNK6nEeyQJ6fub 6ENxHx0mymXW9p6FWWxwMGuB0YTwLh6UqB7YMGFYHMZEJRtuqcDb3Y5ZxvoJ06hnyJi/ dQmZcperFTbyuAWtVrOUXOJH9wAua+2p5gf+sx+sXbYwa/i9FSOrnS9pbgvOxzyZYv6e fKE0JPPRZ2gHyf1bFhRjDMk5xN7f1TDstnZZ7d+Blv3vEjPm4xo3HhyVGkILYNXxn+NI EBvARQXuBRwhdKImVL+zyIfET41meuq+YyZ/KI5lrGnfuD4a6/alFIeYw6QrIDQVVxeV +wMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id :mime-version:in-reply-to:references:cc:to:subject:from:date :dkim-signature; bh=/wI3QVM59jnzfvExzc3w5EEsA2aIl90/0QKeHl4f9CM=; b=MzHhz1FXcm5qQdJ5JCql9rcuIR74buTih7q5eAx3IyXPEqFwAp+uUEc+PmbGuOb6NL Woz9vSEELiDI+f5Yeuuo9OAm/USWLPobNztCUH5blnOIlHOsRkE5kIaUNEqLTAViUpYb KUzl8H9ONWDSsM2uu088Bw69KVw427dP3Zy1x9/FQ8UBSuxy3pdt3v0eSactuPjHyr+O NVnF0vBew0gyTgjLwnTQz4nak2LweBVnGLsPHf+jWr6IzAx1Pyj6uRlNP6zz7LZqUNXy 7ycLQ7LHWJc1qeaUnemuf4D6tUBlR5mWHFKcJZRKjz/mOsrhb7KUXXhPXAXDjY2pBvYS Lt6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=W3vGZl7r; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e13-20020a17090301cd00b00158da867027si9509002plh.624.2022.04.22.14.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 14:49:46 -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=@gmail.com header.s=20210112 header.b=W3vGZl7r; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AA40E22CAAB; Fri, 22 Apr 2022 12:57:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbiDUC1S (ORCPT + 99 others); Wed, 20 Apr 2022 22:27:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiDUC1R (ORCPT ); Wed, 20 Apr 2022 22:27:17 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DA36614E; Wed, 20 Apr 2022 19:24:29 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id q19so3428196pgm.6; 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=kjswNyDW99D2jk2puuXcQqK/ybs3LygOABefm63sLWO2d1+Fh4/Azf0BN+USG9FAvc 7A8O9JZz2JPMDRH4GUqmIatc8XmXINJUd+1uqHP8VIEP0CsdaI9Ey7rrJZPbbrK89LuM Lewkinin83gCJbKDHyAamkTRQu0rJXiB+JCdKxyYutm75ePgQx2e4dnopUQhXSgk6guj ZrvingiiCxT7b09dGGx1yXpd2fGNOhK7KjaE3/PW9o5TYiXP20Y82LqZkiysTwxCZUnO AOEaxiBu+DpWpuvBGqvcaJhofmdwZiE/Qqt1LsHRImYklDRk96bnp2TZPqrEdX7T5C88 pQaA== X-Gm-Message-State: AOAM531rqmBpCLqL9k2016fNeM9FPG6qJNu2eYgD28/O1tIvG72c50YQ hDhHLSTcGYEiIY28OtZr3JI= 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 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 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