From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (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 12C75533D6 for ; Tue, 21 Apr 2026 16:51:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776790265; cv=none; b=R4o0KhiLmQSg7Q0ziZTE0ydyh+wpW26uylPny5Q/FZJfFrxUtmGYQPfK2D/ySlCUXHddX5nhApW04/AxXLSYaG1VzeVuDk63IkGnYff3Xl1FDbUuhQcB9n6sciR4inFuKdtdqIVyr7wSbanduOepHN2liz81oVrYciJJauTzl8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776790265; c=relaxed/simple; bh=nHbyyL+JwBHUFNdS4PC2FknmeNxS4dsJza3FacSs6cA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f6SjnJTntek75Hk+aH3YBeEx+Ms1PFEJ4TrIzzcgw9/LcY+i32bcW0unMfJ4JP7zqQZa5TFurHQsxVM1zauvlX5fkpVSeewz8OSt+2bIW7p+ujWqByPHv2jesMAeaXtylSE8KAcQrd11ZvyZtqVCy1lg8zeth2uevvdfVEa74zE= 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=q/7a7qq1; arc=none smtp.client-ip=209.85.222.181 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="q/7a7qq1" Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-8d65f4073bfso599668185a.3 for ; Tue, 21 Apr 2026 09:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1776790263; x=1777395063; 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=7kRy357BEYeRJOQyV21O6a1nlzehotRQ1w1skfD7cr0=; b=q/7a7qq1GrxmU8LUMyKSKyYEjkmo3N1y/mrufDhsmuSZ9Sz+Fr3eEqiUkG9kiSjOkD HVtykTiYsA9m960lHbbOZDjq7cbRBY4s7glcBjkzUrQULQ1sK6wZ2d1BDWoLkCGjp346 SuoiOksIWK0rgBpNvkjyxo31vyfQ7lDWshDmUCW4Y5Nj/4aA3sFTFe6D0DQSboD65nMo tJtoov8w10bwNha8Ri+wzZJIqgV9ZleVNF6z/JwgUiG6aqCpk+StgGlPTmlUFlu/v6WV tskLsIsv0Osx51bvevD7v0MSz2/0bLU6xlY5MWvcy2EA6wAbRmrXkvMTU8Zl7mLUCI5b 6eqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776790263; x=1777395063; 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=7kRy357BEYeRJOQyV21O6a1nlzehotRQ1w1skfD7cr0=; b=o1ssZC5ctl4wbLjinbSlIHOXBUq7ZItkkDACtjMwnrhIHcgf2MeSJZnqXDddeQHUyJ 4X7ImeX7kmc9j0muowPK+v1J7jMyySOSOZrZTjtqASP9xqse8WucKXVFPmECB+MjickF LSxFPVlwb5gPnTYMa6GYzeRXvAHIvxoGCqCPsQ9pLmXExR3THub8R6dj5M/HpbTjIfBH KAldDUdPqv1U/WsHkZT6xRyHAkxJAGwloQ0yRBkK74vQXZ1VNMkgyroXvYKTowdNwhWE dKhK/PJre1OIj8BB0unFaql82FXgJuwanHDf65/KVnVqyBI6x5MWij1ttkR7Q/ynPDSX kX/A== X-Forwarded-Encrypted: i=1; AFNElJ+ACOh0jLja8GPf4VXNsC+YTZTnOoOmEYswhgzb4rHXVO/yNjzshrhA7irISTQSXubESfPNsct3X2tJRHM=@vger.kernel.org X-Gm-Message-State: AOJu0Ywfwx7jpm1uj9Wwq+hkn6UoMVPDwAF3NT8mRMNqbmN2xHJqn/V8 f/g2iCkPGf0iGaEyAVl6dlv+Uc3bFs+jvih9Wa5PUxD5krhJ58GZ5p8v4N+tKYcKAQo= X-Gm-Gg: AeBDies8S9jhxAidGb33woSCSY5+F1Xvb+uxvcOmxULZh2Ym8+OJtCQp9n0ubfBC9k7 TJNG1xtPIK+5tkJUfnCcKwyFu845lMOyTT2Z/TLH0JmpmoasynRwn60UeERjQkxALWWLj0hmQCH hW/VaE+dwdFuZBDz/axtdML/FMaT0fhzmTLaiAomgWNkPiWM3Msmm2NZPfrweMVp5FoHNcHYiJ4 GeqIl0QUE2CWlNxWFzL7ZtckLuDRyKU4r8KzG/8/2iBmzDxNST97/7mS8ysrBecMWb3QL+GJQYn HoipeorKOOgfRU/rF6ya09hOZlPZfW/Wg3YKzkzvlmEAdUgxDTo3YMW/cXcmjNaVOnd8EBWkl/3 VDrPzuuvBR7PJG+B6/T1TUrrV7TA6hJ2PlShw955hzdeAU83qZwRi0nXytjbgPYrapOqB0AfGQi 8LTfDpK92zkJGvh6TSztvV4wrL6rRDxa9quJFaFxRWUycmmYeQfh7iIBR0qgzHx/1L5uBnvBXHz D/KIsvGIysxDvjPE7VR13gUT/UjlUY= X-Received: by 2002:a05:620a:40d2:b0:8c6:b247:4c with SMTP id af79cd13be357-8e78f059609mr2654868085a.2.1776790262990; Tue, 21 Apr 2026 09:51:02 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-71-246-228-50.washdc.fios.verizon.net. [71.246.228.50]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8e7d93c2fffsm1070867785a.36.2026.04.21.09.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2026 09:51:02 -0700 (PDT) Date: Tue, 21 Apr 2026 12:51:00 -0400 From: Gregory Price To: "Michael S. Tsirkin" Cc: "David Hildenbrand (Arm)" , 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 Subject: Re: [PATCH RFC v2 00/18] mm/virtio: skip redundant zeroing of host-zeroed reported pages Message-ID: References: <20260420192037-mutt-send-email-mst@kernel.org> <20260421090341-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: <20260421090341-mutt-send-email-mst@kernel.org> On Tue, Apr 21, 2026 at 09:06:00AM -0400, Michael S. Tsirkin wrote: > On Mon, Apr 20, 2026 at 10:38:19PM -0400, Gregory Price wrote: > > > > Can we leave folio_zero_user() callers the same, but add a PG_zeroed > > check in folio_zero_user() that skips the zeroing (but not the cache > > flush) and clear the PG_zeroed bit? > > > > Is this feasible? > > I do not see how - this would require leaking the page flag out of the > buddy allocator. > Right, but you're leaking that bit of information out one way or another - whether it's a page-flag or something else (pghint_t) you have the same lifecycle problems (when does it become invalidated? how long can it be trusted for?). I suppose at least with (pghint_t) the data (in theory) falls out of scope and doesn't live with the page - but guaranteed it just ends up polluting more and more interfaces. I'm seeing why David's suggest to plumb __GFP_ZERO correctly makes sense, it's really the only feasible approach here that doesn't generate a staleness problem with whatever information you try to leak out. ~Gregory