Re: [PATCH v2] lib/scatterlist: add simple page iterator

2013-02-13 Thread Imre Deak
On Tue, 2013-02-12 at 09:13 -0800, Tejun Heo wrote: > Hello, > > On Tue, Feb 12, 2013 at 07:07:20PM +0200, Imre Deak wrote: > > It's the one implemented by sg_miter_{start,stop} in scatterlist.c. It > > also iterates through a scatterlist a page at a time, but it also kmaps > > these pages. Since

Re: [PATCH v2] lib/scatterlist: add simple page iterator

2013-02-12 Thread Andrew Morton
On Tue, 12 Feb 2013 19:07:20 +0200 Imre Deak wrote: > > So, exactly how big is this thing, and how do we know it's better this > > way than if we were to uninline some/all of the helpers? > > I admit I only hoped compiler optimization would keep the inlined parts > at a minimum, but now I actual

Re: [PATCH v2] lib/scatterlist: add simple page iterator

2013-02-12 Thread Tejun Heo
Hello, On Tue, Feb 12, 2013 at 07:07:20PM +0200, Imre Deak wrote: > It's the one implemented by sg_miter_{start,stop} in scatterlist.c. It > also iterates through a scatterlist a page at a time, but it also kmaps > these pages. Since in our use case we don't need to map the pages we > needed a sol

Re: [PATCH v2] lib/scatterlist: add simple page iterator

2013-02-12 Thread Imre Deak
On Mon, 2013-02-11 at 12:54 -0800, Andrew Morton wrote: > On Mon, 11 Feb 2013 20:50:04 +0200 > Imre Deak wrote: > > > Add an iterator to walk through a scatter list a page at a time starting > > at a specific page offset. As opposed to the mapping iterator this is > > What is "the mapping iterat

Re: [PATCH v2] lib/scatterlist: add simple page iterator

2013-02-11 Thread Andrew Morton
On Mon, 11 Feb 2013 20:50:04 +0200 Imre Deak wrote: > Add an iterator to walk through a scatter list a page at a time starting > at a specific page offset. As opposed to the mapping iterator this is What is "the mapping iterator"? > meant to be small, performing well even in simple loops like c