From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 528E73932CC for ; Thu, 14 May 2026 17:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778780921; cv=none; b=lLj8QV0afkQI316w+h4OvImWwKHCENpzm7S+8k3/jSa26x7ieiQEMyxD6+WSySpeOmm0ylIQpVx4cP9vDPmpQL9dkcSL74n/PnCJU5wwHwTW2ztIv7/v6J7YLJrGUmkB0HOE9gj9I4k8fiqKOW70xyNP/8mNaGyDPRV04Mjj018= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778780921; c=relaxed/simple; bh=HjW+RLRDUfCUAiTz4pYpZUQzoV0gW6WfCm46LXjIiao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UG2YXigwW8qIUju0ZPafeXyfCtC68nsfn0cVpzoYfk6NX+TdBlRPWNxnUSbkYyZUvj5YLuvSfFudoNZJ2iP04TJNc/KRgGl9zojq61a0OMrD4evgu4nbnsRzr+y2sL90ZnaxqNE1CHuHh1Ku0BTMaCCOoA9Qxq56EUc2EtK7Ddk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=FbNHtNk3; arc=none smtp.client-ip=209.85.160.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="FbNHtNk3" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-50e97863425so81914811cf.0 for ; Thu, 14 May 2026 10:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1778780919; x=1779385719; 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=2cPQd8ZpfahwERRbvKiOm18yc/xSSB5/jBy80Q6IlfE=; b=FbNHtNk3832gPzb+0B8jgqEmEvVl98/WkdlIP8UYJGzApoXrzjkxBA4e4PQyDTY2o7 FH6zOSscHaXJ8cJYkvS8N8ehNFueeBjOn3hH+EBSe1IgFuRi4fB0NC62IKyTn2CXumhL ywxsEVcP1AsWBwle2MRjIT0wuma/lQvei+NHHlsNJu+GnKcCVxNf+AT1czLywCDTJIf7 umFSNUiNT8V4Js9gb+HP99QxrkF5eCpidqlLHVxM23GCijH5wpWvdj4SRTqjwjZomAuq ZdFsD330dWY/ipFHp0coB19IgZ3xFqge81176CO1tlS9C1ivfoF3Lk6+XhxpUeztjwlE 76sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778780919; x=1779385719; 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=2cPQd8ZpfahwERRbvKiOm18yc/xSSB5/jBy80Q6IlfE=; b=kHhO5y0LmtXieVzdh0cW6u1xa1BzdlFN/bILFcFD8tf7Nh4W5x9FxHkwEMX5dTALko +XIcfq6gyVO3h1b6MnOh5TpfZyfrg+q8Gm9cuG21zlbARgmX0VuXYPEer9L18rxvu3lM EQi5FHayWo76itycSp2TMCt7ix2DsBlEJwmsMTXJMaS7L9A4T+YiuIpRgM/cMdTFDG/P LZHHFmrAjBhAYrTBd/0ZAyhsv4M+WaY0UEJBw3W7NuBBoF4+l5XnQLV9983WU9M3Ff7a 9BgaaRLMuvI2+1gOWaoGkqe2E2DMflQ7YbGeKRRnyv935BHvA3zGm46QlrlxIum562Lq eG9g== X-Gm-Message-State: AOJu0Yz+Ka2wUTFk8kc8GCqDpVXXGMY5jGG5I6lF7unxR/I5TfKb0yaj 7VyRC15RG2cm9AMEczYDyiaSgamS0kbVSZb4wyvrWM6cHIjdeTJk1ivScRNukH8b3kw= X-Gm-Gg: Acq92OE14Mbzi65KuUMTT0XR4qZCYQ8mez+v2WOc4Z9Qns24YAH4yXwfDq1qtR3m0wt 9QQMbjhSXSW49GWcbVZXObr76hSUE0wQxbhvAmmFkcKJoyEoWgL5PlA4N/qx6bTyUm8eNJW3g5U JGXobXrKzQggbX8/NVI6SxGtJZfpg07jL5QhKICdPEiLYS+p+7s7vZHUs6U6S06wzCoIMt1pZBm GQBfXJrtCkTsjB8HjRu4QodmeSoB7qW+Ew/aeKwi+W+kLYcC4ipvmvDdyDJXIICll6b4jpG66tm fh7iw4xbd7mGndzVX8gwAtGkYN3OB0AfDZChSdgywoi0i4gZYb8pgXt6PVvVGNPYDdtksP5lteB aFToth72PrQjePuDebNyW7HH83D99Lj1lFz2uZi8gwtV2C4bcwCVR+ewfho4y3ETQU/PQdamjIJ rqSpK+xMfsZMFdwM7WQV0FNfiv0pxpQYx/sw/kpltRURaMubZUwxZACIB1fOOx7MNGhbK/9BaK2 QRxpCM9Liqc X-Received: by 2002:ac8:5d89:0:b0:516:4f8e:3004 with SMTP id d75a77b69052e-51659fd9682mr4733571cf.11.1778780919192; Thu, 14 May 2026 10:48:39 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-100-36-248-188.washdc.fios.verizon.net. [100.36.248.188]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c9093e62c5sm29499476d6.21.2026.05.14.10.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 10:48:38 -0700 (PDT) Date: Thu, 14 May 2026 13:48:36 -0400 From: Gregory Price To: "Michael S. Tsirkin" 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: 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: <20260514114637-mutt-send-email-mst@kernel.org> 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