Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1633958rwd; Thu, 15 Jun 2023 13:21:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/AckozifwS7c9AQEuINxl2PfpQ8NlZ4M+q9KHIelUDn42Bj+JkrMw2QbKK8GYv7Xg6cmm X-Received: by 2002:aa7:d8d9:0:b0:51a:2005:bad3 with SMTP id k25-20020aa7d8d9000000b0051a2005bad3mr2827222eds.28.1686860463355; Thu, 15 Jun 2023 13:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686860463; cv=none; d=google.com; s=arc-20160816; b=T8KfFrgVGQCXSXyXN3L28vfVw+uWJio/HVonGa7ca76WVmm/3L4SIiO07XQHvnHCGc wSomm2FkEgJ/RTsMQi7qE4KBDST9sfhbbI515iEYw80EygcwAxisa/eMQAiPfx5SVFB4 SR+kQNctIlQsimQzDSXlRsw9nLY1mdFdV40YrgvOyBIvNJy/KMhJCufN8WPm7DqvlQa3 HyzrZ6K9NKgsP11LofMxX6qcfovxP66bxZXiyLOiE+KsJf+GtdQdZi2sTbBVRQyeaMye pUrx6WVMWJOfUfCa4AoURI1GC1EcN+kNl7oN+F0W4fGfn8qZri3seK8Ux2Jgn1n0irAi M1mQ== 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=6qVMM2snJT/z1+3q7iOllvvHpkI+bKo+0q0jsxvpBjg=; b=tx467hGzdGHcBYEJSKj9L/9NX5BmyB/FnVEkejpjdTKXTrTYTw6xUJHSOEgkePH4DP JPGrchnC+4mxKV//Vkl3DNDrS9Uv2toEWnT7w27V7jo8EhNDhA16QTQ2GkT1KLWNGF+P mGfFJAtsfmS95EwOsFBhGCzXi5KgOzjj5i2gyhJhtNqFulj32SHJhO6OsHMXIR6oEf02 hYMyte3JDtSaRDf538F5WgWZQNMxVNuRI1ppSdK9unIFdiS0cKmeP+S1L6jKPSwwlyvm vNrFo3H3ELaEWVaOPqJYe1LP6lxzG1+Ztkrpc4VN90XD16qTZUppQgf0Qjt34K3ly16q eo1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Q2dCQ3JG; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 z23-20020aa7d417000000b0051a2ef85109si566513edq.671.2023.06.15.13.20.35; Thu, 15 Jun 2023 13:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=Q2dCQ3JG; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbjFOUPw (ORCPT + 99 others); Thu, 15 Jun 2023 16:15:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbjFOUPv (ORCPT ); Thu, 15 Jun 2023 16:15:51 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463BF212B; Thu, 15 Jun 2023 13:15:43 -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=6qVMM2snJT/z1+3q7iOllvvHpkI+bKo+0q0jsxvpBjg=; b=Q2dCQ3JGnKDklQMM57TVbFGdFB iDGe7FLLBCsANC19XWYQ2qW/dNzVqxNq5XPk92wix9OFK5mgAnfgy1+fWIFnkISpM/gOGTi+prEl1 ceyIQ+XAblDZIvGCF+1NRxMwN36PI6oUI5ZhF761FfZRKc2aWY7XW2BARpsgWMsRGQX8ACRgD9Va8 BNuZmSrnUVV4YqLAfYEGOhUTVSK/AgQzzblIWTISlsNkQTNYBgzoFtmNM3iShP16ZzhFXbGeQbViW uDoO6tR2eXpmKWfU9e0r/PR7TbvfT8gd/swGNbUHGJko93EmkO7jpEhdB8hZNvUHwYKXLo0vQo0+t IXJ7iVPg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1q9tNO-0082yB-UE; Thu, 15 Jun 2023 20:15:26 +0000 Date: Thu, 15 Jun 2023 21:15:26 +0100 From: Matthew Wilcox To: Peter Xu Cc: Alex Sierra , jgg@nvidia.com, david@redhat.com, Felix.Kuehling@amd.com, linux-mm@kvack.org, rcampbell@nvidia.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, hch@lst.de, jglisse@redhat.com, apopple@nvidia.com, akpm@linux-foundation.org Subject: Re: [PATCH v9 02/14] mm: move page zone helpers from mm.h to mmzone.h Message-ID: References: <20220715150521.18165-1-alex.sierra@amd.com> <20220715150521.18165-3-alex.sierra@amd.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-ext4@vger.kernel.org On Thu, Jun 15, 2023 at 03:33:12PM -0400, Peter Xu wrote: > My question is whether page_zonenum() is ready for taking all kinds of tail > pages? > > Zone device tail pages all look fine, per memmap_init_zone_device(). The > question was other kinds of usual compound pages, like either thp or > hugetlb. IIUC page->flags can be uninitialized for those tail pages. I don't think that's true. It's my understanding that page->flags is initialised for all pages in memmap at boot / hotplug / delayed-init time. So you can check things like zone, node, etc on literally any page. Contrariwise, those flags are not available in tail pages for use by the entity that has allocated a compound page / large folio. Also, I don't believe zone device pages support compound allocation. I think they're always allocated as order-0.