From: Greg KH <gregkh@linuxfoundation.org>
To: Jianxiong Gao <jxgao@google.com>
Cc: erdemaktas@google.com, marcorr@google.com, hch@lst.de,
m.szyprowski@samsung.com, robin.murphy@arm.com,
saravanak@google.com, heikki.krogerus@linux.intel.com,
rafael.j.wysocki@intel.com, andriy.shevchenko@linux.intel.com,
dan.j.williams@intel.com, bgolaszewski@baylibre.com,
jroedel@suse.de, iommu@lists.linux-foundation.org,
konrad.wilk@oracle.com, kbusch@kernel.org, axboe@fb.com,
sagi@grimberg.me, linux-nvme@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 0/3] SWIOTLB: Preserve swiotlb map offset when needed.
Date: Tue, 2 Feb 2021 12:53:02 +0100 [thread overview]
Message-ID: <YBk9HsrdvcUb50Kz@kroah.com> (raw)
In-Reply-To: <20210201183017.3339130-1-jxgao@google.com>
On Mon, Feb 01, 2021 at 10:30:14AM -0800, Jianxiong Gao wrote:
> NVMe driver and other applications may depend on the data offset
> to operate correctly. Currently when unaligned data is mapped via
> SWIOTLB, the data is mapped as slab aligned with the SWIOTLB. This
> patch adds an option to make sure the mapped data preserves its
> offset of the orginal addrss.
>
> Without the patch when creating xfs formatted disk on NVMe backends,
> with swiotlb=force in kernel boot option, creates the following error:
> meta-data=/dev/nvme2n1 isize=512 agcount=4, agsize=131072 blks
> = sectsz=512 attr=2, projid32bit=1
> = crc=1 finobt=1, sparse=0, rmapbt=0, refl
> ink=0
> data = bsize=4096 blocks=524288, imaxpct=25
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0 ftype=1
> log =internal log bsize=4096 blocks=2560, version=2
> = sectsz=512 sunit=0 blks, lazy-count=1
> realtime =none extsz=4096 blocks=0, rtextents=0
> mkfs.xfs: pwrite failed: Input/output error
>
> Jianxiong Gao (3):
> Adding page_offset_mask to device_dma_parameters
> Add swiotlb offset preserving mapping when
> dma_dma_parameters->page_offset_mask is non zero.
> Adding device_dma_parameters->offset_preserve_mask to NVMe driver.
>
> drivers/nvme/host/pci.c | 4 ++++
> include/linux/device.h | 1 +
> include/linux/dma-mapping.h | 17 +++++++++++++++++
> kernel/dma/swiotlb.c | 16 +++++++++++++++-
> 4 files changed, 37 insertions(+), 1 deletion(-)
>
> --
> 2.27.0
>
You forgot to mention somewhere, what changed from v1 to v2 :(
prev parent reply other threads:[~2021-02-02 11:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 18:30 [PATCH V2 0/3] SWIOTLB: Preserve swiotlb map offset when needed Jianxiong Gao
2021-02-01 18:30 ` [PATCH V2 1/3] Adding page_offset_mask to device_dma_parameters Jianxiong Gao
2021-02-01 18:30 ` [PATCH V2 2/3] Add swiotlb offset preserving mapping when dma_dma_parameters->page_offset_mask is non zero Jianxiong Gao
2021-02-01 18:30 ` [PATCH V2 3/3] Adding device_dma_parameters->offset_preserve_mask to NVMe driver Jianxiong Gao
2021-02-01 18:55 ` Andy Shevchenko
2021-02-01 19:35 ` Jianxiong Gao
2021-02-01 20:57 ` Keith Busch
[not found] ` <CAMGD6P2Gz9nWELMdsAhwQvXx3PXv2aXet=Tn9Rca61obZawfgw@mail.gmail.com>
2021-02-01 21:22 ` Jianxiong Gao
2021-02-01 23:59 ` Chaitanya Kulkarni
2021-02-02 0:25 ` Jianxiong Gao
2021-02-02 11:21 ` Andy Shevchenko
2021-02-02 12:07 ` Robin Murphy
2021-02-03 13:37 ` Christoph Hellwig
2021-02-03 16:47 ` Jianxiong Gao
2021-02-02 11:53 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YBk9HsrdvcUb50Kz@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=axboe@fb.com \
--cc=bgolaszewski@baylibre.com \
--cc=dan.j.williams@intel.com \
--cc=erdemaktas@google.com \
--cc=hch@lst.de \
--cc=heikki.krogerus@linux.intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=jxgao@google.com \
--cc=kbusch@kernel.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=marcorr@google.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robin.murphy@arm.com \
--cc=sagi@grimberg.me \
--cc=saravanak@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).