Received: by 2002:a6b:7707:0:0:0:0:0 with SMTP id n7csp12248406iom; Wed, 8 Jun 2022 13:41:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8F/Eg6TOUE1A2IVE4qFRNcS3MLYon2mxQO7Fq/quI6rkIgvuIqB8KeXywaH+ea7/+r9nx X-Received: by 2002:a05:6402:d:b0:431:98fe:c5fd with SMTP id d13-20020a056402000d00b0043198fec5fdmr9163145edu.170.1654720870041; Wed, 08 Jun 2022 13:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654720870; cv=none; d=google.com; s=arc-20160816; b=VyHL06TZDvFUwzhUwc2vbC+kJ+aYREDzN6AmTPXQVMMs2iXjXQAs7WAqfkPKRA2CdF psOuA+WR2H2OMpEZ4Yuh9IOsxbgTf7hDZy+MU8oiIu3wlCjeEa1N0qoC1unip9BVxmA4 +S6QDc6HkrGxwZMq7pJT0yo0lI7o5TtsUjEOHwhpvLAK14Ct15v4fwNpnT0kC5O1F6yp m93yrK78GsHclnnIl94Y5sbNU8B/gNmm7bnyfHzP4lKhep0qYkWMlZ4hhJ+1h6H6DaBu dEReRIlPYtCTXsY/feGHpl62bdZJZ2d3LJWPVeeChABEt/S4V733ta/GgWNT3+ej6lom 4iUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vB8qr31hPZDrulIC0wNXe3jXMBDgmtAVqOgZUjr6cR0=; b=HQQO4FlmHTYqv7HfYmMRvQgaFCKmtkEXuUiOW4FgZkcYRk3Vnpt6NvF9d3drDnF/eL VgjyobAX5sbfB8FtupEOnokPqDgiP102smscFGCbO+WHaQIHjpuaXyYFMjdpz0LwYOok yxWHTGbZpRghY36+5MyOnzUtfHCTcepi+2/uTycNRyvQE9iZa4BcY59CUMUP2H5ElHiB cqOi9knm/fqEA2gW54RZJKfyDBR86XKQHsMZXuggpNVhGd43NiMzcEim7aHSU/cNw3OL zIEwcZ6VQV+AfPKKTqVGJlCSFgCdkOTScnSi81ah5vKGwvaWaengeaED4rRMFIxGv1D+ QZ2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PoG3IJOz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i32-20020a0564020f2000b004316c8ba451si9197626eda.488.2022.06.08.13.40.41; Wed, 08 Jun 2022 13:41:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PoG3IJOz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbiFHTuP (ORCPT + 99 others); Wed, 8 Jun 2022 15:50:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235672AbiFHTuM (ORCPT ); Wed, 8 Jun 2022 15:50:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E5B19C3BB for ; Wed, 8 Jun 2022 12:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vB8qr31hPZDrulIC0wNXe3jXMBDgmtAVqOgZUjr6cR0=; b=PoG3IJOzPir+bn8LsRR9955dqy TqBU58ZGvNU8VWRcRDbbb9hPsgfkAW9AO3794kwVAXodLPU9LxjyVGNMXyG35L/z0emBObP1XGz4n CeXLMWRcxZSRFDLDb9+J+2m8qVz1WvZoH5vqrSIowZTpmC8p/sRtpp4Qoc68GjvC+iqDpDWP603na EB0XlwqfSW3nvFhzFLQzPwCQO71cA9s+AdbQdCzD3dg1yqpZmPXMvuLLkrfMKquv2WRyqZK+k8evC Mo64qgsHSGMqpKcpCkdOH7tITcHG2NsUgKkF5Y02vO7nGN9uIc0wwZmPzU5fw0LtK5X7Z+Eui/OT5 4g3Zhp/w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nz1gj-00CvKE-PH; Wed, 08 Jun 2022 19:49:57 +0000 Date: Wed, 8 Jun 2022 20:49:57 +0100 From: Matthew Wilcox To: Linus Torvalds Cc: Ankur Arora , Linux Kernel Mailing List , Linux-MM , the arch/x86 maintainers , Andrew Morton , Mike Kravetz , Ingo Molnar , Andrew Lutomirski , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Andi Kleen , Arnd Bergmann , Jason Gunthorpe , jon.grimm@amd.com, Boris Ostrovsky , Konrad Rzeszutek Wilk , Joao Martins Subject: Re: [PATCH v3 00/21] huge page clearing optimizations Message-ID: References: <20220606202109.1306034-1-ankur.a.arora@oracle.com> <87k09s1pgo.fsf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Jun 07, 2022 at 10:56:01AM -0700, Linus Torvalds wrote: > I worry a bit about the insanity of the "gigantic" pages, and the > mem_map_next() games it plays, but that code is from 2008 and I really > doubt it makes any sense to keep around at least for x86. The source > of that abomination is powerpc, and I do not think that whole issue > with MAX_ORDER_NR_PAGES makes any difference on x86, at least. Oh, argh, I meant to delete mem_map_next(), and forgot. If you need to use struct page (a later message hints you don't), just use nth_page() directly. I optimised it so it's not painful except on SPARSEMEM && !SPARSEMEM_VMEMMAP back in December in commit 659508f9c936. And nobody cares about performance on SPARSEMEM && !SPARSEMEM_VMEMMAP systems.