From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 969F01C3BEB for ; Tue, 11 Mar 2025 15:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741705942; cv=none; b=AFut2NvIbKWlb0l8nCqh6gXUKhKz42g/QjiDwVUjglKkt1Hx6fX2lNnmBbLW8HO1khTeXx1El6O3pU7JGFcvgRAOzsrj6AyEN73JO95p+Urp+kw3OzGaGyX97DDY93HOJL+ahdXPl7Wugs+P7NRRAMkvzNQj0mdqsC3AVQn/onI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741705942; c=relaxed/simple; bh=2zOC5U0mjgipDVNzo08qHxVCRR/I2HojojdOf+ynufQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Lf9TB7kcAsrsoLR0/rHYh4OPnE/cHUHyAcVg6kH/24k9zMiJe08yXAZzm2gB1ljMG7SE8Fd3KEeFkprWkf2E06+AmrFjRPm5hfkLbrLYZRj7f/yMZavWOAodmMRBVnIgu6KsLAh0KZqN/Xdfn/stRhcC1m4LFXZVW2jk77w6YSk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=toa2+2Rt; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="toa2+2Rt" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vmHrb0b24qlyWrlqCdDj4UGq4nq9/s6Su9V1a9JlSO4=; b=toa2+2RttopItVIdFS/UqMj7dZ y2J7Xr77rRqURBhWbPDwlckYlaxzLUtpCiGA1bre9o/XBJGGAUFxlMji+ppmLd7fFHo1jTetTnWtv ye74EjPgi7lGi2Zm+XvONJoGzxxTH2YhEDlUnGiCTg3i0RWlx77/HSt5t1lJmoNoAZBz91Y+3eGEZ dfWWnEGCCm1GRKPUdrttP5YJFuUs/ZQoa3UYT7vlgVNLcE7U/g1A0KwacrL/5t90TN92j0YC470h1 24w0a24jK9qGBqA76KOZnIcNoWrRkwsaBAIqp7BcecKskEUEZbrFfLVWKbk4iIeIv/Tu7BUOJIito +qgGO8KQ==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1ts1GJ-00000001vOb-27i7; Tue, 11 Mar 2025 15:11:21 +0000 Date: Tue, 11 Mar 2025 15:11:19 +0000 From: Matthew Wilcox To: Yunsheng Lin Cc: Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Yunsheng Lin , Andrew Morton , Jesper Dangaard Brouer , Ilias Apalodimas , "David S. Miller" , Yonglong Liu , Mina Almasry , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , linux-mm@kvack.org, netdev@vger.kernel.org Subject: Re: [RFC PATCH net-next] page_pool: Track DMA-mapped pages and unmap them when destroying the pool Message-ID: References: <20250308145500.14046-1-toke@redhat.com> <87cyepxn7n.fsf@toke.dk> Precedence: bulk X-Mailing-List: netdev@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 Tue, Mar 11, 2025 at 08:25:25PM +0800, Yunsheng Lin wrote: > > struct page { > > unsigned long flags; > > unsigned long memdesc; > > It seems there may be memory behind the above 'memdesc' with different size > and layout for different subsystem? Yes. > I am not sure if I understand the case of the same page might be handle in > two subsystems concurrently or a page is allocated in one subsystem and > then passed to be handled in other subsystem, for examlpe: > page_pool owned page is mmap'ed into user space through tcp zero copy, > see tcp_zerocopy_vm_insert_batch(), it seems the same page is handled in > both networking/page_pool and vm subsystem? It's not that arbitrary. I mean, you could read all the documentation I've written about this concept, listen to the talks I've given. But sure, you're a special fucking snowflake and deserve your own unique explanation.