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 2588A1F151C for ; Tue, 21 Apr 2026 13:44:23 +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=1776779065; cv=none; b=h6Wh3swYzBYLvUWOQJvIkqBa/+4FNtydtZkP6AJ2ZDPuRUAKm0NalzNKXq7k8k/czYM55T7HSblgfY72U7AYAO9SAHlV0XAAyLrNhU/3TRWn7mjVukraj1GBv03RSZfK6Gkw3jZdXUmMyWF6JmPgw9PGrt9OiO6xsV6U3xnFnXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776779065; c=relaxed/simple; bh=3nKXHQhetipDN0ysN2eJ6ywPnlDZZjVs8c4yD24Ezp0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nAvBlWHf1V4R4ZNXT1fa3Bbq0ids5o3Ou8IDO5BGGTxb2h2gHMPTPkLt135MrumKBP+5nl3fweS6qJwKSqAhQtTJE3iFCIRd3OvrXEUuGxfGGdKMutTwlENNmrVRsrzWYF+KBHio0ZorLNbBJQ9jJ0G+lSUpUz4k39v2F8LU5dg= 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=ZO/sa6pU; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=dCYv0gds; 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="ZO/sa6pU"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="dCYv0gds" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776779063; 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=7eTbL6D9GOrwEMsjXolvuGX1Lg2q3QX/lZ1+KzGMn9M=; b=ZO/sa6pUQHwr59kjJMkwoGmNoaFjK9iP8dkgHFUrdH7QxyiZZ8mjPoj8ygYPjyUqh/b+wX j1vJD3UA/YEkUaF2Ib5GrqPm8ksdrF8z2Jkfyzb2JfEKoxer+EkV0d0ADSw42HpQSNn9Er 0X/MHxcotRwszDwh8mHH0ge+I7hDOqw= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-216-STQatOWoO_-mY0DX2bn0kA-1; Tue, 21 Apr 2026 09:44:20 -0400 X-MC-Unique: STQatOWoO_-mY0DX2bn0kA-1 X-Mimecast-MFC-AGG-ID: STQatOWoO_-mY0DX2bn0kA_1776779059 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-488d3eec9bcso27757555e9.3 for ; Tue, 21 Apr 2026 06:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1776779058; x=1777383858; 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=7eTbL6D9GOrwEMsjXolvuGX1Lg2q3QX/lZ1+KzGMn9M=; b=dCYv0gdsWnzYPWiEKBaMuprNkEfBcXaQ5L4BZsdaUt+iwXRdfIKowLsd5zcqpw1hjg vSc8RDtzGHzHZERPfrMjQc/lyuHQkSArBjZ+R952jXXfUHlK8928BGFQMH4m50H2ss0T de1CK6nuqI3DelgPQ0MvW65kHdhjqN939U1ArEAIVg9SOPest1uit8+EYokReNwcDxvw J+AS7TmmH78Yp3MYhlX8QxTeRE9hu9PeG4cfM9LI0p3XtL5dF1xZBmHqOgncL2p+yMTW 132iIvjeUlPxaEkElZDuNwCAtPsoMwG+UjgRlR8vwqQsO+p5jc2rii4v1TbUKgmNroLk wHdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776779058; x=1777383858; 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=7eTbL6D9GOrwEMsjXolvuGX1Lg2q3QX/lZ1+KzGMn9M=; b=H2u/+JuG94ZlINyk0GKcoJx+le62jBz20qNP//8zxj1UqkCo6d7h7TwQ3jOWYSgsXL /sslFZbdxGw6AbpYrgcUyeVNk7KcYjng5iC3WKnkH/eQJRFWL6DTa0P/SPGEjYZ5XhFk 5HOYaMQDOFphDmZ42Ttw5OAtEBqgW0gyPm5vnh/Zj7Ltm1P0gL5CnSd8fQMZeMXnTxm6 0RhD0xRiFoLNWCN8N1zwU+646UZL0eftjuXn5RufGPKVNLfZXs0a75eeCqWMbp30QRC0 bC1x18DWtU5klbtaSWpPVKezrWbbN6IMVQrZPTA8ot2Pr4S8ZWMlC+5BqugwIQqX/z90 cIDg== X-Gm-Message-State: AOJu0YyENBCBPFmQSTeGTl5h+IyTwD0ZuO9fOxGvbGM3ZGmTtwGWo0Gn eYGwWVlKI7A0S0eTMVHaIMGcyZKx/5w3X1wA3kGa+3egqxbzL9UxK3r5YDEtCfrmV4m3yWGdM+6 aL2WlpQLiB16c7oEqha13QnfKZ24NSqEoR/UEMb/Xu9UCfZCuo95QAx6J5df/RSEH+A== X-Gm-Gg: AeBDietmjRVI/vTYskbrDC5jqcwHRemzkIj0V3gAF8ymq/OrqUB3CvyTNKlHk4DVz9+ 1ku6HI2iznc2G69haGKfLrgNdBCpiXj00vlAhEl7FLbh5xEwsNuCHTmc2cj/lavXCyqxFw4hpCd hVE7mTBNLes9cTVbJxk/C6OV/1CZIhuVxeoH6AkcYt+TVR+PPFgSPVG5iMr71x4dZfrLr0fFBq6 TX2qi2qrs3B3Kqw0RSl3vudyB/pqNpjR6E7d/Kq6hfd76vBiJIzWPNLzAy+PS8R7PHH5MA2iFsN 8K2vw/p9fMzCRY0Aq16hNrx2/2vvWj+yobzDBN7SQGAZsrFJdzdkE9kZXRPvjI/KSJseoNOJElN m74MdB6Tr2wsAXnh/cyywNFEPcKtVdb1HhiebPzfhHw+gikpWGH2YIg== X-Received: by 2002:a05:600c:468c:b0:48a:56d5:16f2 with SMTP id 5b1f17b1804b1-48a56d5179amr32738385e9.7.1776779058378; Tue, 21 Apr 2026 06:44:18 -0700 (PDT) X-Received: by 2002:a05:600c:468c:b0:48a:56d5:16f2 with SMTP id 5b1f17b1804b1-48a56d5179amr32737835e9.7.1776779057878; Tue, 21 Apr 2026 06:44:17 -0700 (PDT) Received: from redhat.com (IGLD-80-230-25-21.inter.net.il. [80.230.25.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fb7b2716sm117377525e9.30.2026.04.21.06.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2026 06:44:17 -0700 (PDT) Date: Tue, 21 Apr 2026 09:44:13 -0400 From: "Michael S. Tsirkin" To: "David Hildenbrand (Arm)" Cc: linux-kernel@vger.kernel.org, Andrew Morton , Vlastimil Babka , Brendan Jackman , Michal Hocko , Suren Baghdasaryan , Jason Wang , Andrea Arcangeli , linux-mm@kvack.org, virtualization@lists.linux.dev, Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , Johannes Weiner , Zi Yan , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu Subject: Re: [PATCH RFC v2 17/18] mm: add free_frozen_pages_hint and put_page_hint APIs Message-ID: <20260421094049-mutt-send-email-mst@kernel.org> References: <5f76af6e-9818-42ea-a305-c0fc1d920dca@kernel.org> <20260421091546-mutt-send-email-mst@kernel.org> <2a41dd0c-7ad8-4d34-8bab-a713e16c3b29@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: <2a41dd0c-7ad8-4d34-8bab-a713e16c3b29@kernel.org> On Tue, Apr 21, 2026 at 03:30:53PM +0200, David Hildenbrand (Arm) wrote: > On 4/21/26 15:16, Michael S. Tsirkin wrote: > > On Tue, Apr 21, 2026 at 12:56:00PM +0200, David Hildenbrand (Arm) wrote: > >> On 4/20/26 14:51, Michael S. Tsirkin wrote: > >>> Add free_frozen_pages_hint(page, order, hints) to free a page > >>> while marking it as pre-zeroed when PGHINT_ZEROED is set. > >>> The PG_zeroed flag is set after __free_pages_prepare so it > >>> survives on the free list. > >>> > >>> Add __folio_put_hint(), folio_put_hint(), and put_page_hint() > >>> wrappers for the put_page path. > >> > >> Can we defer that change? > > > > We can - it's a dependency of the balloon deflate, which you asked > > me to implement. I'm more interested in reporting, myself. > > Just to be clear, I said: > > "I'd assume ordinary inflating+deflating of the balloon would also end > up with pre-zeroed pages. We'd just need a (mm/balloon.c -specific) > interface to tell the buddy that the pages are zeroed." > > So while I think there will be value in that in the futur once we > figure out a clean interface, I don't recall asking you to implement that? Right. you also said: Not blocking, but I don't want something that is too coupled to free-page reporting optimizations in the buddy. The comment above MAGIC_PAGE_ZEROED triggered my reaction. so I interpreted this as meaning "it's nice to have (not blocking), but you either need to implement this to demonstrate that indeed, it is not too coupled, or prove in some other way that it is not too coupled". > > -- > Cheers, > > David