Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1519674
| From | Chris Wilson <chris@chris-wilson.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Intel-gfx] [PATCH 3/4] lib/scatterlist: Introduce and export __sg_alloc_table_from_pages |
| Date | 2016-11-11 11:30 +0100 |
| Message-ID | <sChfQ-35W-27@gated-at.bofh.it> (permalink) |
| References | <sCfQJ-22L-11@gated-at.bofh.it> <sCfQJ-22L-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Nov 11, 2016 at 08:50:19AM +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > Drivers like i915 benefit from being able to control the maxium > size of the sg coallesced segment while building the scatter- > gather list. > > Introduce and export the __sg_alloc_table_from_pages function > which will allow it that control. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com> > Cc: linux-kernel@vger.kernel.org > --- > include/linux/scatterlist.h | 11 +++++---- > lib/scatterlist.c | 55 ++++++++++++++++++++++++++++++++++----------- > 2 files changed, 49 insertions(+), 17 deletions(-) > > diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h > index c981bee1a3ae..29591dbb20fd 100644 > --- a/include/linux/scatterlist.h > +++ b/include/linux/scatterlist.h > @@ -261,10 +261,13 @@ void sg_free_table(struct sg_table *); > int __sg_alloc_table(struct sg_table *, unsigned int, unsigned int, > struct scatterlist *, gfp_t, sg_alloc_fn *); > int sg_alloc_table(struct sg_table *, unsigned int, gfp_t); > -int sg_alloc_table_from_pages(struct sg_table *sgt, > - struct page **pages, unsigned int n_pages, > - unsigned int offset, unsigned long size, > - gfp_t gfp_mask); > +int __sg_alloc_table_from_pages(struct sg_table *sgt, struct page **pages, > + unsigned int n_pages, unsigned int offset, > + unsigned long size, gfp_t gfp_mask, > + unsigned int max_segment); Just the question of parameter order, I like gfp_t last :) And I think offset / size / max_segment tie together. -Chris -- Chris Wilson, Intel Open Source Technology Centre
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/4] lib/scatterlist: Introduce and export __sg_alloc_table_from_pages Tvrtko Ursulin <tursulin@ursulin.net> - 2016-11-11 10:00 +0100
Re: [Intel-gfx] [PATCH 3/4] lib/scatterlist: Introduce and export __sg_alloc_table_from_pages Chris Wilson <chris@chris-wilson.co.uk> - 2016-11-11 11:30 +0100
[PATCH v2 3/4] lib/scatterlist: Introduce and export __sg_alloc_table_from_pages Tvrtko Ursulin <tursulin@ursulin.net> - 2016-11-11 13:40 +0100
[PATCH v3 3/4] lib/scatterlist: Introduce and export __sg_alloc_table_from_pages Tvrtko Ursulin <tursulin@ursulin.net> - 2016-11-11 15:20 +0100
Re: [PATCH v3 3/4] lib/scatterlist: Introduce and export __sg_alloc_table_from_pages Chris Wilson <chris@chris-wilson.co.uk> - 2016-11-14 11:00 +0100
csiph-web