Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5819409rwp; Mon, 17 Jul 2023 09:54:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1CXNtxRPCImXn38qUOJpIwcBXFgG8ZLfM4cGZAGshMTDzGSb/PL/tPQ55FQVJF9o4iYx2 X-Received: by 2002:a17:903:1250:b0:1b7:e86f:7631 with SMTP id u16-20020a170903125000b001b7e86f7631mr15634997plh.19.1689612897816; Mon, 17 Jul 2023 09:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689612897; cv=none; d=google.com; s=arc-20160816; b=R3UGb2dVU6oNmqkYccmyACD+XjI1Dad6HaGB81t2fJpE1lRIqiYJ8eLmD4MfGS55wI I9i92te+60YGwEGuRPfk6A2f0dwYl3tpIeozd6LHfMuMU9UER7pVfAK0Fhubegqac+wB T5LqK2rxaXGPgEKnVCYfUI3L3rqB51nZVZIOZnU0UuYR7iNi8wjgVWtkmZeWX/4p1lla UTqrDUD/J+I2b8aTNAn0faAyYChVQJv8YJaLSQNxei0ZDsIBOoDwAksP9ZWLRLB9+5pc F6GtS/JqNgRS4rG/5Ltz+TbrcA86s3C21PkufLu2YFvQnuR/HqF6WXWpvyn33gq/Hh0z FD3A== 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=iUlrfwzo5Lu7oQ5BuafotnOrx3OuKcCmu7TXtpiBn0A=; fh=NIRv1XTTOJEPkt+EEB+ENBk6YWfmMMXSOfNshlXTI1U=; b=NqjLwg/LFu5kOielfuXH4rSdAmasbVQ06s4H3QnK2sT14XT4RANkseBOoKfECBOoCQ EeJTK/zR1vf1ZrFCx10f4UYshVN59JCdpi/hYQWayLS58LAIinary+rIo8TRHDEnNVeG +xKKQ7q7nyIMVzyk+yNkxi3VLmHAFzeRDbH7xOXoYBvhdThNNPQCeD7j5HUhi+MNrn53 WfY0nwD3DTelgMz2S3Vis2iYgQvAgDxB/eaSZYRRzPfSU8j0IRmZULrtkpBSzzeIPRgZ dHEaClzcdQ9euuBf56yHJeFsBnAFG9JxW/kUjpCZ5eIXj8JubGjYi/s+K/i1qB3XVn14 57kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VPAEIFsF; 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 y15-20020a17090264cf00b001aafb271d13si107156pli.235.2023.07.17.09.54.44; Mon, 17 Jul 2023 09:54:57 -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=VPAEIFsF; 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 S231660AbjGQQRb (ORCPT + 99 others); Mon, 17 Jul 2023 12:17:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjGQQR3 (ORCPT ); Mon, 17 Jul 2023 12:17:29 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 358AEE2 for ; Mon, 17 Jul 2023 09:17:28 -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=iUlrfwzo5Lu7oQ5BuafotnOrx3OuKcCmu7TXtpiBn0A=; b=VPAEIFsF7TUL7NDZQJYEMgMvfX dzPReuf3A4aeAaGhG94yzt+M4sL1pzgicIPDtlD3meIvpALekhC7l6rZK1g6a1XKrW7Rp6fV3SHIX pU4Ge46g8fJ+9FpNVeAbLKHeSNqxmMAwyhAgFBSnvh/T6pbIC920eXzpbdYY7y109moc9ixLML13a 5K/86oUJLRrbiMKNBt5pr23Ugk28FRK40pVIVwzhDrTyrIOJUUs39D9WhduM+9R7MJkH4qqqKpQeJ VOGOivVkzd+4+BSCveWaE4R7fTsd1HkEfWynCRIcJQtmVAg66QzrAZdko0mmoZrmbcx9MB9TJKRKL D/naxS9Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qLQuU-0044Ly-56; Mon, 17 Jul 2023 16:17:18 +0000 Date: Mon, 17 Jul 2023 17:17:18 +0100 From: Matthew Wilcox To: David Hildenbrand Cc: Ryan Roberts , Andrew Morton , Yin Fengwei , Yu Zhao , Yang Shi , "Huang, Ying" , Zi Yan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v1 1/3] mm: Allow deferred splitting of arbitrary large anon folios Message-ID: References: <20230717143110.260162-1-ryan.roberts@arm.com> <20230717143110.260162-2-ryan.roberts@arm.com> <283e4122-c23f-35a1-4782-fddde32f4ad4@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 Mon, Jul 17, 2023 at 04:54:58PM +0100, Matthew Wilcox wrote: > Those are page->flags and page->compound_head for the third page in > the folio. They don't really need a name; nothing refers to them, > but it's important that space not be reused ;-) > > This is slightly different from _flags_1; we do have some flags which > reuse the bits (they're labelled as PF_SECOND). Right now, it's only > PG_has_hwpoisoned, but we used to have PG_double_map. Others may arise. Sorry, this was incomplete. We do still have per-page flags! HWPoison is the obvious one, but PG_head is per-page (... think about it ...) PG_anon_exclusive is actually per-page. Most of the flags labelled as PF_ANY are mislabelled. PG_private and PG_private2 are never set/cleared/tested on tail pages. PG_young and PG_idle are only ever tested on the head page, but some code incorrectly sets them on tail pages, where those bits are ignored. I tried to fix that a while ago, but the patch was overlooked and I couldn't be bothered to try all that hard. I have no clue about PG_vmemmap_self_hosted. I think PG_isolated is probably never set on compound pages. PG_owner_priv_1 is a disaster, as you might expect.