[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241103151946.GA99170@unreal>
Date: Sun, 3 Nov 2024 17:19:46 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Zhu Yanjun <yanjun.zhu@...ux.dev>
Cc: Jens Axboe <axboe@...nel.dk>, Jason Gunthorpe <jgg@...pe.ca>,
Robin Murphy <robin.murphy@....com>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>, Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>, Keith Busch <kbusch@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Logan Gunthorpe <logang@...tatee.com>,
Yishai Hadas <yishaih@...dia.com>,
Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
Kevin Tian <kevin.tian@...el.com>,
Alex Williamson <alex.williamson@...hat.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Jérôme Glisse <jglisse@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
linux-rdma@...r.kernel.org, iommu@...ts.linux.dev,
linux-nvme@...ts.infradead.org, linux-pci@...r.kernel.org,
kvm@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC PATCH 2/7] block: don't merge different kinds of P2P
transfers in a single bio
On Sat, Nov 02, 2024 at 08:39:35AM +0100, Zhu Yanjun wrote:
> 在 2024/10/27 15:21, Leon Romanovsky 写道:
> > From: Christoph Hellwig <hch@....de>
> >
> > To get out of the dma mapping helpers having to check every segment for
> > it's P2P status, ensure that bios either contain P2P transfers or non-P2P
> > transfers, and that a P2P bio only contains ranges from a single device.
> >
> > This means we do the page zone access in the bio add path where it should
> > be still page hot, and will only have do the fairly expensive P2P topology
> > lookup once per bio down in the dma mapping path, and only for already
> > marked bios.
> >
> > Signed-off-by: Christoph Hellwig <hch@....de>
> > Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> > ---
> > block/bio.c | 36 +++++++++++++++++++++++++++++-------
> > block/blk-map.c | 32 ++++++++++++++++++++++++--------
> > include/linux/blk_types.h | 2 ++
> > 3 files changed, 55 insertions(+), 15 deletions(-)
<...>
> > @@ -410,6 +411,7 @@ enum req_flag_bits {
> > #define REQ_DRV (__force blk_opf_t)(1ULL << __REQ_DRV)
> > #define REQ_FS_PRIVATE (__force blk_opf_t)(1ULL << __REQ_FS_PRIVATE)
> > #define REQ_ATOMIC (__force blk_opf_t)(1ULL << __REQ_ATOMIC)
> > +#define REQ_P2PDMA (__force blk_opf_t)(1ULL << __REQ_P2PDMA)
>
> #define REQ_P2PDMA (__force blk_opf_t)BIT_ULL(__REQ_P2PDMA)
>
> Use BIT_ULL instead of direct left shit.
We keep coding style consistent and all defines above aren't implemented
with BIT_ULL().
Thanks
>
> Zhu Yanjun
>
> > #define REQ_NOUNMAP (__force blk_opf_t)(1ULL << __REQ_NOUNMAP)
>
Powered by blists - more mailing lists