From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 639043890E0 for ; Thu, 14 May 2026 17:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778781077; cv=none; b=Ln7O/Tj37ZjYX/w6luKjdFQJPivcC9F+dZPxRcRsvuizTN222yl2KUcXH5Yem/D0B32RcBFPYXjVYm+qCbjPXopydZNzkhfltHTLM6393d+8LAmjrIwWlBwx2tKL3aiUN1Tc3375cQDyP2i5d+Yr+tgwOEMZPNaxaaeAA3Gudqw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778781077; c=relaxed/simple; bh=l+aJoAElI1thH38hKvFEkIMTdNzPvUFJEYjBMS4q0vo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=l4ZjClpdztOEhTxMw9PnQl9eBKhLWM9zmtmGp2zfkuTIvrN+iDryLs4E2KuVh5mRJ9NPbowT02qR9E98pagqp3WC7j7Y6xfZAblYuOrA11ezcJBzKu8tBPaIglZ+0N8Jls7CmjhawM6Cw3aMljrqukgOaqVW/9VTJSBwo+cprJ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GWMUxW0R; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=tppEkIo8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GWMUxW0R"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="tppEkIo8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778781075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tLvXfaK1++cjWp5ZEXW7FRO6EgPicPNmdS5WYRImnOM=; b=GWMUxW0R6zYXABA0r/vGj6iIABMsTC622KlXZ2sOInTibHQa3URHPRKNXyPNhboQxCa0i1 PioMVOp7DV0MBfewC4T/HY3346+29HNF9CZIZVQiotOkdSsWsZtI3qz6OELrVyb/mbjpEL kjkfvaL+TkIRG4G0z1olsWo9foaP0wg= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-258-nsokGEIUOXWZlL7H245q8g-1; Thu, 14 May 2026 13:51:14 -0400 X-MC-Unique: nsokGEIUOXWZlL7H245q8g-1 X-Mimecast-MFC-AGG-ID: nsokGEIUOXWZlL7H245q8g_1778781073 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-43fe791a398so7495041f8f.0 for ; Thu, 14 May 2026 10:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778781073; x=1779385873; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tLvXfaK1++cjWp5ZEXW7FRO6EgPicPNmdS5WYRImnOM=; b=tppEkIo8dEK97n43Tn090n7HJ4MGYYndK2h8aJcKG14MRGPPT7KqI/fiaryJ1PXMhJ yS97M01tyewpHrNEs0i7rWgIGZat+kWq/fZkjNg5+7i/ZOchV0StVYYFfuMvsxVlWLB3 Lse9IjFqvF/YUre+OBHdk5YhxhwKw6RmA0WDHOib0DSvKAknwjb2rlaSzlDobQcvjCAP wUYZaWFWz0xr9I1Qkh08P1vMceNxMVTQOWhp92Z9jdkCRX/ohphBIJ2+0J93YjwRN65l xvV1mEGivi3/TKaGW6qCw+eVOsJhIIsGQkgS1tmg6IddcqWT8s7JeqlgdG/lk4u/+7yv yIWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778781073; x=1779385873; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tLvXfaK1++cjWp5ZEXW7FRO6EgPicPNmdS5WYRImnOM=; b=fPGIr08e3qr0bfwb4UFOttaCCx/MBTUymtNdki6/+M/geLvZaEexbTj9BDHllT7/hY Jphiv4Zgrx32FpFxrZLw9cywT/W1jdZCQoqIi0idtMotQO7Wv5bgm5kbRwMhPUa8cUeA 3IatOPbCQUuot+loit04u58zVxyrOC/tA80gh7qaJpi0i5bifYBNK9E3fJ2H/ODO1SdX 3wQ4lzGOhx5qxwV/lEws3TavvKG56awawzwBvsdYesQxz7uVqFI/5qcRDDiSOwPCXe2B yBwp9d5PTASMDxiI3DdhG+hHnpo5gY2R+pDNTZ4gB13D1J0RPhUNnJACNrSQ+jUAH238 e6ng== X-Gm-Message-State: AOJu0Yz0OECWFUfZ+IoqT2UV4HdlOYEbpAZ8o7SMdEkNAy7APSMDmnb0 42U96RCdlD0IbIYKynAdqbx578FYOUn75CmP9PHcKsPoiTi6zmnPg0tl4BFtPfMUnMUBvqbKO2L 3nWei2N4srm2nWXiJTLzSVR6TzmXINho/iWJuWWcs4HYoLdoKpsXro79Ex3sezwdk0Q== X-Gm-Gg: Acq92OF39JlbCKIRuzNuH9mcCyiFVjwu8W1lhG6QoOUtevshSKEFR4ENXcyjCzryXYN 5UXIPbPEdSeOfVXT0QE3kGS2ZzWo8MNlFLC1CXbqrZtyixJ07JHbT/zXmMlRvvMMFnzpafzOni4 exIP/ERT2Sv8dUMedQvCpQbWaSjQVM2qA8fUQFwm50L7bRLJ11UUBkl4nAc0TyrjqkWiltMu1n/ UfUxhYoT58wprejJx4jh0ig3/Bg6UeEpL0qtxu5nHkKDV/La5I1d3MkrXS8ABH9wtUQzWqLBrZL OstiOtkXTWOGCegRkhT5prq5D/cCl7bpYSsUbMTjtqWEb5zuwbq7FqKzaG/0fZ6sdfx7WanTZ4S ATDEclrrmHquxMn07HNTX/tCP7QiL2VbF0xjuK9hF X-Received: by 2002:a05:6000:24c5:b0:45b:d2ff:4d4f with SMTP id ffacd0b85a97d-45e5c612fa3mr65106f8f.40.1778781072778; Thu, 14 May 2026 10:51:12 -0700 (PDT) X-Received: by 2002:a05:6000:24c5:b0:45b:d2ff:4d4f with SMTP id ffacd0b85a97d-45e5c612fa3mr65053f8f.40.1778781072253; Thu, 14 May 2026 10:51:12 -0700 (PDT) Received: from redhat.com (IGLD-80-230-48-7.inter.net.il. [80.230.48.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768c4fsm8568047f8f.8.2026.05.14.10.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 10:51:11 -0700 (PDT) Date: Thu, 14 May 2026 13:51:06 -0400 From: "Michael S. Tsirkin" To: Gregory Price Cc: linux-kernel@vger.kernel.org, "David Hildenbrand (Arm)" , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , Muchun Song , Oscar Salvador , Andrew Morton , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Hugh Dickins , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Ying Huang , Alistair Popple , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , Axel Rasmussen , Yuanchu Xie , Wei Xu , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , virtualization@lists.linux.dev, linux-mm@kvack.org, Andrea Arcangeli Subject: Re: [PATCH v7 02/31] mm: page_alloc: propagate PageReported flag across buddy splits Message-ID: <20260514135050-mutt-send-email-mst@kernel.org> References: <20260514104735-mutt-send-email-mst@kernel.org> <20260514113337-mutt-send-email-mst@kernel.org> <20260514114637-mutt-send-email-mst@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 14, 2026 at 01:48:36PM -0400, Gregory Price wrote: > On Thu, May 14, 2026 at 11:47:19AM -0400, Michael S. Tsirkin wrote: > > On Thu, May 14, 2026 at 11:41:45AM -0400, Gregory Price wrote: > > > On Thu, May 14, 2026 at 11:34:14AM -0400, Michael S. Tsirkin wrote: > > > > On Thu, May 14, 2026 at 11:32:26AM -0400, Gregory Price wrote: > > > > > > > > > > > > > > Maybe mildly out of scope but worth asking: Are there other flags that > > > > > > > should be retained/propogated on a split? If so, rather than pass > > > > > > > was_reported, should we just take a temporary copy of the page flags and > > > > > > > pass them all in? > > > > > > > > > > > > > > ~Gregory > > > > > > > > > > > > > > > > > > Not that I can see, no. > > > > > > > > > > > > > > > > You do this exact thing again later :] > > > > > > > > > > https://lore.kernel.org/linux-mm/9a22e0f9bbe1278913754db6df76e291a006181a.1778616612.git.mst@redhat.com/ > > > > > > > > > > ~Gregory > > > > > > > > I mean yes, reported and zeroed) Just zeroed does not exist at this > > > > stage in the series. > > > > > > > > > > More of a forward looking question: if we already know we're adding > > > was_reported and was_zeroed, maybe we should just pass the page flags > > > through entirely and let expand() check them instead of passing it > > > through individually. > > > > > > We end up doing something similar with post_alloc_hook later as well, so > > > I'm wondering if there's a general improvement that can be made here. > > > > > > ~Gregory > > > > sure, will do. do you want a bitwise thing for type safety? or just a > > long? > > > > Can probably just do like: > > flags = stable_page_flags(page); > > plumbing... > > expand(..., buddy_flags) { > if (test_bit(PG_reported, buddy_flags)) > ... > if (test_bit(PG_zeroed, buddy_flags)) > ... > } > > or whatever makes sense. > > ~Gregory right, that's clear.