From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7E61B317701; Wed, 11 Feb 2026 15:45:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770824739; cv=none; b=WlapOVzCQ7EnVIDVktiejuDCJjssGvp4x9y+rpZs5itxkwetbqYKLmqcNDdtxqtRtpa0WfQ0BNtwzg4ARqoFK0OWcpdP9/DRqHfdWk5A3Bm8/TbGWc+m5nXfD4DKT+6QwUTTwKViTUVSXuHUB0YeyHt+fmyCt1z386QKKym8SBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770824739; c=relaxed/simple; bh=Vi2rVLK9jD5gt4NZfmDrB+4OmvfQhlw6kIPIVrTmh3Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Mm5YQc2DNpEueM//Ti12oBS1AlWu3XdyYlEG92Qf/b54x6stsXqr78CA8zULdry2EEkKtcm1Kl1le1mlHuszShJ3q6805kyL/42HvxVeZuQ8VlFtsZOa6Nz0HJdjPHNQ7OmdAAPal76HzE39XYpV4QR9d+VdP719PEPEvoT2DLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ct67Suxf; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ct67Suxf" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=quchVHCEJxHoMugGym9DQDRQY2PW3QylUONV+ZucEdQ=; b=ct67SuxfQmejEHA6GQjo3xwOSk 0ozgeBLfcbYcWFkgGeDFl7Fot5XhEDNDmZ1GrR0k/ysBmNyaDr/u+6EBb8NotviOKEHNvbnazWFQA yaEXCrt21ljw7KTPoLvissLDBJAiUPZAgiMFGASsbgbugnj31zxKOUSiG7GpU0IyxI9eGmhV3/m6N YKMBKgq8eKw3x5ZJJXXxL9myM+yeAtPN7+5XAZKYoQiq+gvxhMBim14bnpCXmuafKSItQZu4vWOky 5IYuOxqBBK0EsflQThknHeT1UIZV8zeIk2BzotBRsEUfnL4B6OwVp1m1ekHkBKYuCT5FkNHM66xKS hp91MjXw==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vqCPI-00000000nzI-1v5g; Wed, 11 Feb 2026 15:45:37 +0000 Date: Wed, 11 Feb 2026 07:45:36 -0800 From: Christoph Hellwig To: Pavel Begunkov Cc: Joanne Koong , axboe@kernel.dk, io-uring@vger.kernel.org, csander@purestorage.com, krisman@suse.de, bernd@bsbernd.com, hch@infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v1 03/11] io_uring/kbuf: add support for kernel-managed buffer rings Message-ID: References: <20260210002852.1394504-1-joannelkoong@gmail.com> <20260210002852.1394504-4-joannelkoong@gmail.com> <89c75fc1-2def-4681-a790-78b12b45478a@gmail.com> Precedence: bulk X-Mailing-List: io-uring@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: <89c75fc1-2def-4681-a790-78b12b45478a@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Tue, Feb 10, 2026 at 04:34:47PM +0000, Pavel Begunkov wrote: > > + union { > > + /* used for pbuf rings */ > > + __u64 ring_addr; > > + /* used for kmbuf rings */ > > + __u32 buf_size; > > If you're creating a region, there should be no reason why it > can't work with user passed memory. You're fencing yourself off > optimisations that are already there like huge pages. Any pages mapped to userspace can be allocated in the kernel as well. And I really do like this design, because it means we can have a buffer ring that is only mapped read-only into userspace. That way we can still do zero-copy raids if the device requires stable pages for checksumming or raid. I was going to implement this as soon as this series lands upstream.