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 233B13A9615 for ; Fri, 14 Aug 2026 16:48:25 +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=1786726107; cv=none; b=rdxbGOeXNJaTHVINYCLhrnzY5OCmt7a8hJV08LStYQISAcWpghQCPngdpoQZyXmKcYS7RkNXRIttYJtVIYzj23jAT74fGnslXogMQ8EOEoZE27rnrwjsKqMwaaiZ+Cmc/veiOj5Tz9w9Iu0TVegluLs3sx3pA+1gc0DEl6Rs/Q8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786726107; c=relaxed/simple; bh=981UYcTRNLbGQkMn+Sn+pEhaBpevC5DocwLfnWoa1l4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cTGy289v9JKM89HjciKzvOjH1a4GVBtvabxXPsVmeOZGuPcO2qoBhpNy2EHGobBAHe13h3tD1qZVBwvvcoyLoKT54a2aTNNKbbY2wgQR9MFO/gLBk8r5cxNh3J+gq5bCj8TlGqOCtpdN+G0m6F5hNW5RA3/9kXoJwRAgMSSRITM= 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=AG0+CyUc; 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="AG0+CyUc" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2d3b440b97aso115165ad.1 for ; Fri, 14 Aug 2026 09:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1786726105; x=1787330905; 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=mG1kOJ+Tut2DmZVpOA/Iv9r39LYIA7qLrHZhoVN2dxo=; b=AG0+CyUcYuv6awTMLHjhgi0QCce2CH06vIWGkGq+D/twZ5fvE1nqNZ3J8hpZm5ZF0z AHX9xcTXItRys70oBamODdYb+04PUbeCh+0pmLS6ENHYEoUJ9C1O5IdTbbZK05vBvLnN FVKWtU+0M4q041ES8BoGCXXtO7roehApa2ciD+vpI31JFJFtssn91Qb7JTbf2Nlb7xo8 Ggu0YDh1Rf69Z1Fyo3mEZ0O1vm1cF6vN9a2aPEMeknjaGaFVpm57yeI8oSpUOM5TSqhw h/JEZfeX7iEG6S3Svs2Sya3o+J87uPO2Hpi1tJWEcoxD8dDwh+JB0HV6G5i6U/ZrEXPo 5+8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786726105; x=1787330905; 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=mG1kOJ+Tut2DmZVpOA/Iv9r39LYIA7qLrHZhoVN2dxo=; b=axO9Xry/SpVu4Ey2Bb16P+7GHRoTFjmYs/W4ZMz//XyVYpjCMG23R5V6QH/j4mNi+j xTCWf03jHpzWs09tPDShjc5Ydhs0l2LZH/+vuJTwgg8erKWw0t0Y0wl657/A0rnb3usk iqtnzq6Er2/alYbgeNa6YLkMEHz5vkTuol94wTpbAczsROqdn2KldqdcQzRMoVmoshog h6nI/UTmGkAT5AReHBqsNPKpDcwQqQe9509i16QcEigWh5Ks2IdlUGxR79QSts0dGZgS 2pKeG2UIcWUabiEoXK80kZutt4tMzwEGbq65kt5bfMUc3cifll7Nzx1vYv7irDT67Fy8 o66A== X-Forwarded-Encrypted: i=1; AHgh+Rpr+dpT4k4NLmE+xCFaGowm3P2wdPBzLyy9gSCy7roXZhbobbIWTmsca9+hMbmZwkyUimFwOXTVK0YQZhg=@vger.kernel.org X-Gm-Message-State: AOJu0Yyp2JV2DdfiM4bc6XGiPV6+tNw7l/u0AzkYkWWm/VXK4Jpz9+gO RdUu+W+b02a+KYxV/HGc9yNz4T2YngyUqlO4Ze+qEnOrIdTBkKtmd7QUDkQ2mJ6w1w== X-Gm-Gg: AR+sD139MIr2dqe6RmH1Do3hI0nb6B8TXBfJtUUGLGfcZ+sIEV4Hxxsh2m4/4HiyAat EIuiyNWgBgY7txBxJC0E6ggXUSnOoQ+0yviQp5LZH4bJcSf+2maHnNzp6pLoW5iFFYTRK95eBwM b/sXqWsXFMyM8p0z86y08U6gvMkEPZLKYy+AL08qxCDSxb1e9LOZQa9bEOtaLHMPA9O+dATue1d ebbUxjNushgRTgo23fPYRhNyXQ1dvHtOpmLbxya6Q05McEbHMTeIW3JlDH4TRx4QL1tzwYFxTSl yquAo/B1e//iyd/y6BseakWjVpo/mydXcLNIDRhiCO74QGMeR38IM0B6hmtLUdXfo3w5rBUKQEt WwI0NwAjiNDUAiYXPDBMVuWQ0e+7b+owo7g1RtuecrM/ezmbDJb0E4x/bnY7qK0Sp8PgcYN8PUN Rb/JgWxaWayE+HWlMOpsknZ2Xw/ZK0L2N42J+jmzPqZ+4AhdpTp/RqKw79crsx/ZMTUiDMDTEgp CsD77bM3gJA1zxfyaEobEs= X-Received: by 2002:a17:902:f78d:b0:2c7:b1e7:501e with SMTP id d9443c01a7336-2d3b48aa5f2mr7298295ad.3.1786726103643; Fri, 14 Aug 2026 09:48:23 -0700 (PDT) Received: from google.com (21.168.124.34.bc.googleusercontent.com. [34.124.168.21]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cc095a490c1sm935638a12.29.2026.08.14.09.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2026 09:48:23 -0700 (PDT) Date: Fri, 14 Aug 2026 16:48:17 +0000 From: Pranjal Shrivastava To: Mike Rapoport Cc: Pratyush Yadav , 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> <2vxzecg33103.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: On Thu, Aug 13, 2026 at 02:39:46PM +0300, Mike Rapoport wrote: > On Wed, Aug 12, 2026 at 03:46:20PM +0200, Pratyush Yadav wrote: > > On Wed, Aug 12 2026, Pranjal Shrivastava wrote: > > > > > 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? > > > > That sounds good to me at least. > > Yes, although when the patches will be a part of the DMA series we might > notices something else :) > Ohh yes, definitely! Just asking to know what to follow for the next version :) > > -- > > Regards, > > Pratyush Yadav > > -- > Sincerely yours, > Mike. Thanks, Praan