From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 476A9437118 for ; Wed, 12 Aug 2026 12:49:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786538948; cv=none; b=nx4oaWSjEsmwWFcjE3oPX+hGVBvhrD4nMT05RFg1P7oVEkx42QJlqzh7wQeQCxic3whRBpJmiSOeLHGv3AoNkV6+nz6jheNwUEMemuxPgaeoMxIII8ExANL64Z2Z1PAQIWZKRXQs444NxuopXK/yAfOU75m9TdWkvCgGoAdl2uk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786538948; c=relaxed/simple; bh=oVFHfdWS4thgzl1mO3bYsqZvRYJMRvQy/7iFNvcZM3w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PvCeYnk0ZCzawgArTb5zt1x79CnkxAC+Z7ACcrKanuxH297t67SAsebjJf7P0P7V1qWt6qWqWODWRDanPCgzLcDIsTsF6OYj4x0MLJn8UCt9LCRsvghN5KRjzVN9lK61Z+d97q0ru0nTs4CyCxtw/B7uLv2h5VTAnQb685k6vLA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FW+q3g95; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FW+q3g95" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2cede6375caso85165ad.0 for ; Wed, 12 Aug 2026 05:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1786538947; x=1787143747; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=4DlA54u08QSleIzxXC03qMaWaKXGBXVOD3RnOmcy+1U=; b=FW+q3g95YtJ5/FcOoo1o7Ws0njWs024is1asml2QmcNuYDgb5dRUNyq7S1j3y6k5/f ob6g8WB95NHRm/gB0IahIs9cxy5ldKUWyjzOtVs/yVQX/dmGcA/MQZdcp0Qd6BVrqQk3 wisyhlFic2eAkaSLGQ9L65ld+Mk+HqFkAu6FPlU1QDXrwYQq+Uefsrc66c6M0r90ceGh 1DVZsbrgZI+0JgdwMcfMt75QFUm6feOh0sb/Na5QY1M0DnjpdzEaM2os52NNfGIdkDd2 s169OiYTO+/gONkZElhz27Efw7qpXx95BAjQjlAQIJ5OCcWnne4wDb8wNcbHmCy59fIw o9Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786538947; x=1787143747; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=4DlA54u08QSleIzxXC03qMaWaKXGBXVOD3RnOmcy+1U=; b=OA8VqiZld17vLHEEdwFVcEyLPWkZ+LjvpKJvFXMWoY4xv/My7VBs9JQnxpchUiJuSg uLRCj0Z9SPoc1VPWZG58wy75b/04kUvVgtK8joU6P5F2wmRNTjAGKIiVbpf2mXjHJR1w rNG1yAh5eo1KaztGNGu7XvhD/xAedTIDtAGyj/nwOM4oL26CiWYs4/booiMPDSW2jbf3 vVYZO89hZMquPJ8Xx+Z/QGVDPit7p25hWbnurnGu9zFAfA0D14fK8c0R8W2KebQbbNbb KN+hMkqtIlqFL1hSYUiIaRtXwHNrrav+lbl0Aqvfs0ut8G/yMeN35ZQt++UeuqCb94XR +pVw== X-Forwarded-Encrypted: i=1; AHgh+RrEmE+mcAf8Wwa4cwgcZhkdAkOeX3yZ9vyS9a2LKRaDzypeS3GnkbbioeedtY+hhRc5nK2NeSApQ/OTGqw=@vger.kernel.org X-Gm-Message-State: AOJu0YzyPwKQ04PDcUPPOR4YCkZ8NtTOt6keQkDOYvW+dwooiHLiKj+7 CG0/RkMe9uUjaCHA5a4vCpd/on25aT7/LZS+Jcrf9lazhnM8yKDdCVcvE3y4h8AWC9CMeEWsHFr m7RTc/A== X-Gm-Gg: AR+sD10hQZQwam9bJKEexZY6TCymXJlfPuitSbXADajziqzDm0nDOGRWHCq34kP9GzG CvhCb9pIKoL0/ne+MjCAb3TJ08HJROM15Ayd0egJimZCdG542SJOCTalxvP1fnI3xHKr31MbXHm tJiBPBRfNNCCf3X1IxtMPFsKNp1VSaR8Nb/Srt8p/K7JCSJzjmKE0B8P+imE3SEa50M4hyg0+PH ljCrX6OkQ/NRmyoBg5rybXTvnuWfR2+JLlwiCJh8mzf+A5kXEbRMWoaK1OxDTxNI+GLXQBH621G 1jaVxngw22P4u0MCEQq/tRSRJfSvWamR7QtywQ0t/4de8NFz10zjjYksbMYCIVCMKvW9zSOkk0W 3aq0VNrC2Shu7E2zey6+De9WFhKZZR8hliDOt5W8fUx5PFveC291VlyUYHE1p/HavDOULSA8cT1 K65ijpMXw0X4h8fpSZUex1HDpn3NUUd2zkmEhRcxE7sjRTBzbIVtZWjsgTrJElZEUS1EQF4QKge vJ2qDk9Wn4G3yC/tQJ830E= X-Received: by 2002:a17:903:19e6:b0:2ca:e0db:3cc with SMTP id d9443c01a7336-2d34ab72f8amr1230025ad.11.1786538946152; Wed, 12 Aug 2026 05:49:06 -0700 (PDT) Received: from google.com (21.168.124.34.bc.googleusercontent.com. [34.124.168.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d35115103asm5901835ad.28.2026.08.12.05.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 05:49:05 -0700 (PDT) Date: Wed, 12 Aug 2026 12:49:00 +0000 From: Pranjal Shrivastava To: Pratyush Yadav Cc: Mike Rapoport , Pasha Tatashin , Alexander Graf , Samiullah Khawaja , David Matlack , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/2] kho: support preserving high-order non-compound pages Message-ID: References: <20260803113944.3694290-1-praan@google.com> <2vxzv79f39za.fsf@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: <2vxzv79f39za.fsf@kernel.org> On Wed, Aug 12, 2026 at 12:32:25PM +0200, Pratyush Yadav wrote: > On Tue, Aug 11 2026, Mike Rapoport wrote: > > > Hi Pranjal, > > > > On Mon, Aug 03, 2026 at 11:39:41AM +0000, Pranjal Shrivastava wrote: > >> Introduction > >> ============ > >> This series is required for the ongoing effort to preserve DMA allocations > >> across KHO [1]. It addresses a fundamental mismatch between the current KHO > >> restoration logic and the physical reality of high-order buddy allocations. > > > > I skimmed through the patches, they look fine to me before the in-depth > > review :) > > > > But we are really close to the merge window, so we'll anyway need to > > reiterate after v7.3-rc1. > > > >> The Problem > >> =========== > >> The current KHO restore implementation treats all multi-page blocks as > >> split pages during restoration. Specifically, kho_restore_pages() > >> initializes every 4KB sub-page with a refcount of 1. > >> > >> However, many kernel subsystems, most notably the DMA allocator (via > >> dma_alloc_coherent), frequently return high-order non-compound pages. > >> In this state, only the head page carries a refcount of 1, while > >> all tail pages have a refcount of 0. > > > > This hints that these patches could be a part of the DMA preservation > > series, unless you expect other users of the new API. > > > > Generally, we don't merge new APIs without the users and if DMA > > preservation is the only user, it's better to fold these two patches there. > > Makes sense I think. We can review the patches here, but then they can > go in with the DMA series. > So.. IIUC, I'll post a v5 here as a standalone series till we get consensus, and finally the reviewed patches can be folded with the DMA series? Thanks, Praan