From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4375EC38150 for ; Sun, 7 Jul 2024 09:16:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D58B6B0082; Sun, 7 Jul 2024 05:16:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 384856B0083; Sun, 7 Jul 2024 05:16:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 274456B0088; Sun, 7 Jul 2024 05:16:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 0FADA6B0082 for ; Sun, 7 Jul 2024 05:16:37 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2A3DD1A0C2F for ; Sun, 7 Jul 2024 09:16:36 +0000 (UTC) X-FDA: 82312401192.24.304F8ED Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf03.hostedemail.com (Postfix) with ESMTP id 1022820014 for ; Sun, 7 Jul 2024 09:16:33 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="CrzWOY/i"; spf=pass (imf03.hostedemail.com: domain of leon@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=leon@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720343767; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3kQGKV8yt7sq4WXAb0XmLrAWHgzThLy3Ck6eSUBRlxI=; b=Bo1iO/Cn5WD4BBx26M6p5e9ZZxej663iaII+2papIdvck4D2BxT4KSl3aLckXlN5CIxDp8 dgGiaB3L2VSFpt3jnhlizJVCOKx93Nxc/JjZ0byLHrnrSlu+e5p/4esWLCw8bWATIfw7Tn n+epUf5eoCopK6FDDXmx+znO8TwWHpY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720343767; a=rsa-sha256; cv=none; b=i1V3b4K6jDBvwQsHuXE5G8DxAoBI7k8rs5thr0usTRmbWbJBgK6NVX61/yNVD2eMiNJqAR KvQWKz9tSIrQ9d1vIcvpu0zOpiYFIVWB7l6Ho/nP53DJ7/JYORpfQS2jhe5/0B1v0HtyRU N2czwmJmcm+JET3Ds94n2nbEow1Yumg= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="CrzWOY/i"; spf=pass (imf03.hostedemail.com: domain of leon@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=leon@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1EE9BCE0861; Sun, 7 Jul 2024 09:16:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98E6FC3277B; Sun, 7 Jul 2024 09:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720343790; bh=izDf2P+sHbjiti59EE/8GV6nvVep7QKF5KGW0AiU1Mc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CrzWOY/iDzSJOaiIMaP3xE97eiLSDi4CB0wI1+TEQAHNCz2g05KYsFt/aL1GPMP5r HBnYK2RTylUHc0Vx3NyVD3bOosNt0zckrQesG42uJ6MRet5D6FmAW0PeAe7m5PvfaN iwrSjlS4jkggMxmOqgmohWVRswxNEnNV8RBiej41b/zEaRlr+A3diLegBHOwF8ZWa6 9dtd/aY/wBeNy4rWL2+0ucK1I0ZgukePTbNlgwltGYYIXxXU7unResX6O/FNT5nk51 W41NViVj5N3M41fW4A1fLX7G15TRIE214CPnx2WARzr2ky472lBfuc0iEJOgY0DDB3 Pn2He452QkIyw== Date: Sun, 7 Jul 2024 12:16:26 +0300 From: Leon Romanovsky To: Christoph Hellwig Cc: Chaitanya Kulkarni , Jens Axboe , Jason Gunthorpe , Robin Murphy , Joerg Roedel , Will Deacon , Keith Busch , "Zeng, Oak" , Sagi Grimberg , Bjorn Helgaas , Logan Gunthorpe , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , Marek Szyprowski , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "iommu@lists.linux.dev" , "linux-nvme@lists.infradead.org" , "linux-pci@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [RFC PATCH v1 00/18] Provide a new two step DMA API mapping API Message-ID: <20240707091626.GH6695@unreal> References: <20240703054238.GA25366@lst.de> <20240703105253.GA95824@unreal> <20240703143530.GA30857@lst.de> <20240706062604.GA13874@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240706062604.GA13874@lst.de> X-Rspamd-Queue-Id: 1022820014 X-Stat-Signature: skrhxnpmdn917ya4amhcu1nq36395wrx X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1720343793-870267 X-HE-Meta: U2FsdGVkX19Gn4+LupNeeYA9B3V2Hrl7jPKiwsebyEgtXrv9fSalCtnPQr/tc/LnDu8s9kZNf9D3NubV3ZFoWtqJRdhfGpNXu7+MJqkxccVIiArQRHV7gPgPKCb1qFguMYy8C7enhFxQBuEc4eL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ni5CAGn7QKYM2sitHvSakyTuB0aZp+D X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sat, Jul 06, 2024 at 08:26:04AM +0200, Christoph Hellwig wrote: > On Fri, Jul 05, 2024 at 10:53:06PM +0000, Chaitanya Kulkarni wrote: > > I tried to reproduce this issue somehow it is not reproducible. > > > > I'll try again on Leon's setup on my Saturday night, to fix that > > case. > > It is passthrough I/O from userspace. The address is not page aligned > as seen in the printk. Forcing bounce buffering of all passthrough > I/O makes it go away. > > The problem is the first mapped segment does not have to be aligned > and we're missing the code to places it at the aligned offset into > the IOVA space. Thanks for the explanation.