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 X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C467C433DB for ; Fri, 19 Feb 2021 07:46:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D755764EAF for ; Fri, 19 Feb 2021 07:46:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D755764EAF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3977B6B006E; Fri, 19 Feb 2021 02:46:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 356556B0070; Fri, 19 Feb 2021 02:46:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 237848D0001; Fri, 19 Feb 2021 02:46:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0153.hostedemail.com [216.40.44.153]) by kanga.kvack.org (Postfix) with ESMTP id 0EA1F6B006E for ; Fri, 19 Feb 2021 02:46:00 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CF1292C6D for ; Fri, 19 Feb 2021 07:45:59 +0000 (UTC) X-FDA: 77834233638.21.31839C7 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf06.hostedemail.com (Postfix) with ESMTP id 38B9DC0001EA for ; Fri, 19 Feb 2021 07:46:00 +0000 (UTC) Received: by mail-pl1-f171.google.com with SMTP id ba1so2924468plb.1 for ; Thu, 18 Feb 2021 23:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=NT29Aq6GZEcythHq+8xV0bdKo/+iRT415c6oc0P2LMM=; b=jkCRi8fw6mKJu2CJVxprPAlpsVPevMqO82EY4jJLdgDTuZVfK+cFcf6N04sds0NWIG g2K1qEcDYGaCPVIaLUOUvFJqshuJWH95kgkNAkrvgEs9e3AxnBKZNkPl91O2qJXxKjtO 39m5bumf3eoBQIysURVFRtASsCZ7sosNd81cNGCEUVrYEUAJaZyoY2NXj24lt4HGE8tN ym0U7IgAW/twVDi+kzmRkoHgE12bfG7UHtNzC6rzQG2kloxXSg6vqv8gJ5tdPgUPi76K WrowOqaj63HjnTxD6sVIqhcTwM8N0Tey4EJtf8NuluPptIh4PZJJWvBFTWLSVQBMVgFz 4u3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=NT29Aq6GZEcythHq+8xV0bdKo/+iRT415c6oc0P2LMM=; b=o2Nu3I5ONASWBscx/xtisEvTX/cODxREA+5fGOyPz9oH/74sFfAqT9WtzSHWBssAcb KGbGWtvBySo1i96roDYLZC+wBzdzoG0OZlFaXss2yR41VuxA8YqUkdEaOh5YYLe5Ao1y WP8j1SFz8xyPU0ejJxFm8vHx4W55ZmegFg8xPGk7wNndbaMsmv7u8npELoyf0b9Djrra lVOd0WvyVtcEf1DIjJH1hSyLS/Sc3QDS5JBdQ0XMlZkHOYPgTKLdc6U7d55Q8YV+bGRD gPQ1wwk8Nz/I4MmwY2bYsW3fMM03Qt2JF0xmWyPNIc13pLSaLrLlW75b9gx78IG/sGxJ IItw== X-Gm-Message-State: AOAM531tNLEUjNaVf7GK2TgNnz2ych8EGIrOd3lq5h38jqmjtmoMA11H iF+DE3VH1rlSetdV1SR1Y9M= X-Google-Smtp-Source: ABdhPJw+jFkauS9YW6sy6aFIkTwI+asLmyHYBTpOgq6M/ukmSzhFYihO1OShoOb3e1vitsi8p7WftA== X-Received: by 2002:a17:902:7b96:b029:de:7ae6:b8db with SMTP id w22-20020a1709027b96b02900de7ae6b8dbmr712101pll.0.1613720758458; Thu, 18 Feb 2021 23:45:58 -0800 (PST) Received: from localhost (14-201-150-91.tpgi.com.au. [14.201.150.91]) by smtp.gmail.com with ESMTPSA id 184sm9079328pfc.176.2021.02.18.23.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 23:45:57 -0800 (PST) Date: Fri, 19 Feb 2021 17:45:52 +1000 From: Nicholas Piggin Subject: Re: [PATCH v12 13/14] mm/vmalloc: Hugepage vmalloc mappings To: Andrew Morton , Ding Tianhong , linux-mm@kvack.org Cc: Christophe Leroy , Christoph Hellwig , Jonathan Cameron , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Rick Edgecombe References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-14-npiggin@gmail.com> In-Reply-To: MIME-Version: 1.0 Message-Id: <1613720396.pnvmwaa8om.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 38B9DC0001EA X-Stat-Signature: homkjrtjpwbjhk78rptw8b6wtoxgu9s3 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail-pl1-f171.google.com; client-ip=209.85.214.171 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613720760-829257 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 Ding Tianhong's message of February 19, 2021 1:45 pm: > Hi Nicholas: >=20 > I met some problem for this patch, like this: >=20 > kva =3D vmalloc(3*1024k); >=20 > remap_vmalloc_range(xxx, kva, xxx) >=20 > It failed because that the check for page_count(page) is null so return, = it break the some logic for current modules. > because the new huge page is not valid for composed page. Hey Ding, that's a good catch. How are you testing this stuff, do you=20 have a particular driver that does this? > I think some guys really don't get used to the changes for the vmalloc th= at the small pages was transparency to the hugepage > when the size is bigger than the PMD_SIZE. I think in this case vmalloc could allocate the large page as a compound page which would solve this problem I think? (without having actually=20 tested it) > can we think about give a new static huge page to fix it? just like use a= a new vmalloc_huge_xxx function to disginguish the current function, > the user could choose to use the transparent hugepage or static hugepage = for vmalloc. Yeah that's a good question, there are a few things in the huge vmalloc=20 code that accounts things as small pages and you can't assume large or=20 small. If there is benefit from forcing large pages that could certainly be added. Interestingly, remap_vmalloc_range in theory could map the pages as=20 large in userspace as well. That takes more work but if something really needs that for performance, it could be done. Thanks, Nick