From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>,
Doug Ledford <dledford@redhat.com>,
Leon Romanovsky <leonro@nvidia.com>,
Christoph Hellwig <hch@lst.de>, David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
Maor Gottlieb <maorg@nvidia.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Roland Scheidegger <sroland@vmware.com>,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
VMware Graphics <linux-graphics-maintainer@vmware.com>
Subject: Re: [PATCH rdma-next v5 0/4] Dynamicaly allocate SG table from the pages
Date: Tue, 6 Oct 2020 08:46:27 -0300 [thread overview]
Message-ID: <20201006114627.GE5177@ziepe.ca> (raw)
In-Reply-To: <20201006104122.GA438822@phenom.ffwll.local>
On Tue, Oct 06, 2020 at 12:41:22PM +0200, Daniel Vetter wrote:
> On Mon, Oct 05, 2020 at 08:56:50PM -0300, Jason Gunthorpe wrote:
> > On Sun, Oct 04, 2020 at 06:43:36PM +0300, Leon Romanovsky wrote:
> > > This series extends __sg_alloc_table_from_pages to allow chaining of
> > > new pages to already initialized SG table.
> > >
> > > This allows for the drivers to utilize the optimization of merging contiguous
> > > pages without a need to pre allocate all the pages and hold them in
> > > a very large temporary buffer prior to the call to SG table initialization.
> > >
> > > The second patch changes the Infiniband driver to use the new API. It
> > > removes duplicate functionality from the code and benefits the
> > > optimization of allocating dynamic SG table from pages.
> > >
> > > In huge pages system of 2MB page size, without this change, the SG table
> > > would contain x512 SG entries.
> > > E.g. for 100GB memory registration:
> > >
> > > Number of entries Size
> > > Before 26214400 600.0MB
> > > After 51200 1.2MB
> > >
> > > Thanks
> > >
> > > Maor Gottlieb (2):
> > > lib/scatterlist: Add support in dynamic allocation of SG table from
> > > pages
> > > RDMA/umem: Move to allocate SG table from pages
> > >
> > > Tvrtko Ursulin (2):
> > > tools/testing/scatterlist: Rejuvenate bit-rotten test
> > > tools/testing/scatterlist: Show errors in human readable form
> >
> > This looks OK, I'm going to send it into linux-next on the hmm tree
> > for awhile to see if anything gets broken. If there is more
> > remarks/tags/etc please continue
>
> An idea that just crossed my mind: A pin_user_pages_sgt might be useful
> for both rdma and drm, since this would avoid the possible huge interim
> struct pages array for thp pages. Or anything else that could be coalesced
> down into a single sg entry.
>
> Not sure it's worth it, but would at least give a slightly neater
> interface I think.
We've talked about it. Christoph wants to see this area move to a biovec
interface instead of sgl, but it might still be worthwhile to have an
interm step at least as an API consolidation.
Avoiding the page list would be complicated as we'd somehow have to
code share the page table iterator scheme.
Jason
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-10-07 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 15:43 [PATCH rdma-next v5 0/4] Dynamicaly allocate SG table from the pages Leon Romanovsky
2020-10-04 15:43 ` [PATCH rdma-next v5 1/4] lib/scatterlist: Add support in dynamic allocation of SG table from pages Leon Romanovsky
2020-10-04 15:43 ` [PATCH rdma-next v5 2/4] tools/testing/scatterlist: Rejuvenate bit-rotten test Leon Romanovsky
2020-10-04 15:43 ` [PATCH rdma-next v5 3/4] tools/testing/scatterlist: Show errors in human readable form Leon Romanovsky
2020-10-04 15:43 ` [PATCH rdma-next v5 4/4] RDMA/umem: Move to allocate SG table from pages Leon Romanovsky
2020-10-05 23:56 ` [PATCH rdma-next v5 0/4] Dynamicaly allocate SG table from the pages Jason Gunthorpe
2020-10-06 10:41 ` Daniel Vetter
2020-10-06 11:46 ` Jason Gunthorpe [this message]
2020-10-07 8:15 ` Daniel Vetter
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=20201006114627.GE5177@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=airlied@linux.ie \
--cc=dledford@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@lst.de \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@nvidia.com \
--cc=rodrigo.vivi@intel.com \
--cc=sroland@vmware.com \
--cc=tvrtko.ursulin@intel.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).