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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC6AAEB64DC for ; Mon, 17 Jul 2023 16:17:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 466936B0072; Mon, 17 Jul 2023 12:17:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EFCA6B0074; Mon, 17 Jul 2023 12:17:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2905D8D0001; Mon, 17 Jul 2023 12:17:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 14CAE6B0072 for ; Mon, 17 Jul 2023 12:17:32 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A74274048E for ; Mon, 17 Jul 2023 16:17:30 +0000 (UTC) X-FDA: 81021609060.29.879EB7E Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 785B64000F for ; Mon, 17 Jul 2023 16:17:28 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VPAEIFsF; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689610648; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iUlrfwzo5Lu7oQ5BuafotnOrx3OuKcCmu7TXtpiBn0A=; b=Da2KUjp4oSyDMaA1cecAuUQaTgwCdWImvh/8ztGAmkTEbFZc7SOYFmqfSh/joF+7mqM0vh cTtaG5q0mIfewTCbvhdqrykZEyHkM8b+ilgLpAz89roBY195/6sIzTaxDfeN4dN+CD7JqN wtaqnrennsBPLk7pJ/idfVo7UbFolBA= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VPAEIFsF; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689610648; a=rsa-sha256; cv=none; b=e1yk+kHqz1ywOtYI5VNh7pdwNBai6qsBV3b/4QgxyJGq8CQMgDwKUVoeoE+AEeKJkemO2v kn/lElKSR9bmt+fp2AnlJMCcrh0yQhPNnFUnJXduk76gPxwwLGz15Vo2wGrs2+RsTfKT21 +4avq+R0VFcfpwHhk8obzByh7nv5HQE= 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-Rspamd-Queue-Id: 785B64000F X-Rspam-User: X-Stat-Signature: 345qryiqpntgqyosuer6jxtx9j6wtfue X-Rspamd-Server: rspam01 X-HE-Tag: 1689610648-746188 X-HE-Meta: U2FsdGVkX1/I62gB2hW0XOJ4Bzi69veSkcSkysx74mmnjALuptYCFCTTbCWpxhnFfItDmCexuvPhHMH/kkuoTBxkptetw2avhx6IZWAdrhPxCvV9yYKjdyCN5lz6HjmFoDo9KTdchHQpV6yAjBGDx4eQllClwYS57hZ0ngRKezZY5LCZr1Sjxbt2FCUBrNYCU5je1mTRHWLZtaxFHkjbDz+g+f5saH92ZDzOcpVZ35Pwampz6NglZIo5LT88nVNmrK/DDawx8YAld3rk9u6pvxAY+TMX/peFMIzBD+EvYginrUlRXGhrYquN4P7NfBZxG4sP4ewzHmBKMZ1pZI1olJFr0q/Y6Gydcd1NjB72BcN9l//vUGqv/TVn5LzIB7wGRhmwX7KgM9stF0tPHr+On09YLYmzdoOHUFHdv0hwl1R8aRBw4bubFfRt/Uc/zhk15p4/Fp5L9y8/mpMB+c0FEA8ozEDCHybeWqSQL4pcNB5cIbhRuyqa+50QCNhhi3NhLdvkWd/+rrwbcZES4lGiET4rie1tUf5OacSKcEDDycIkBo+2yiSVYwhzn8XaJ4AgnA+CgE/7nixoAWDopJLoMlqtx9SaILJGFFNXdNVHlnCvj82kQOeJ8yAUAx//r34zmcT92lWtYx9+H4EyHAFvrloJlsI7hyu1d8GE8HcSWW95C10VKPXuc7X9mG705HsT74r+syfUvN9TIzio4e76r+c+sKTsV45iQ6TB9UtyrDTG57R4MqS6blFvr0voXihT2NvDmMnceRwLKWGspV4D2ls3tbKzAoZmBVzWWSa/DcG01RwEHGF5MjYAuGxjau0cIF5WVmwPECiUAkvi2BweyRkDC4RlAoX04ne9O7njEuGpmIU4m/MOfW4Xj26DbIgtnLLFHlz2dGV4hmFP/KbECEl5qFgsShewwVIDtocl/LcRHE+jS1tgdZdsRHfpD4tw+ydUdV/X6fw0n2bAspR yDyaYcdj hSmN6DDOk1tWWdhYXaVGCV0s5IIfgI+XqJrPcRzDvO6ScDoN9Lgm6hq61mGpOwzNNSf19gL+UmssVpPbz4zKNYQMY18VNj5eqTIymDur5UFAhUkTlw+ThS5WayJO3HG5Ieh4ykws/esYWLh0= 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: 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.