Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-14 Thread Omar Sandoval
On Thu, Sep 14, 2017 at 07:59:43AM -0700, Omar Sandoval wrote: [snip] > Honestly I prefer your original patch with a comment on depth += nr. I'd > be happy with the following incremental patch on top of your original v4 > patch. Oh, and the change renaming the off parameter to start would be

Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-14 Thread Omar Sandoval
On Thu, Sep 14, 2017 at 09:56:56AM +0800, Ming Lei wrote: > On Wed, Sep 13, 2017 at 11:37:20AM -0700, Omar Sandoval wrote: > > On Mon, Sep 11, 2017 at 12:08:29PM +0800, Ming Lei wrote: > > > On Sun, Sep 10, 2017 at 10:20:27AM -0700, Omar Sandoval wrote: > > > > [snip] > > > > > > What I mean is

Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-13 Thread Ming Lei
On Wed, Sep 13, 2017 at 11:37:20AM -0700, Omar Sandoval wrote: > On Mon, Sep 11, 2017 at 12:08:29PM +0800, Ming Lei wrote: > > On Sun, Sep 10, 2017 at 10:20:27AM -0700, Omar Sandoval wrote: > > [snip] > > > > What I mean is that you keep the same initialization above, but instead of > > >

Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-13 Thread Omar Sandoval
On Mon, Sep 11, 2017 at 12:08:29PM +0800, Ming Lei wrote: > On Sun, Sep 10, 2017 at 10:20:27AM -0700, Omar Sandoval wrote: [snip] > > What I mean is that you keep the same initialization above, but instead of > > depth += nr > > you do > > depth = min_t(unsigned int,

Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-10 Thread Ming Lei
On Sun, Sep 10, 2017 at 10:20:27AM -0700, Omar Sandoval wrote: > On Sat, Sep 09, 2017 at 05:38:13PM +0800, Ming Lei wrote: > > On Fri, Sep 08, 2017 at 01:43:41PM -0700, Omar Sandoval wrote: > > > On Sat, Sep 02, 2017 at 11:17:17PM +0800, Ming Lei wrote: > > > > We need to iterate ctx starting from

Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-10 Thread Omar Sandoval
On Sat, Sep 09, 2017 at 05:38:13PM +0800, Ming Lei wrote: > On Fri, Sep 08, 2017 at 01:43:41PM -0700, Omar Sandoval wrote: > > On Sat, Sep 02, 2017 at 11:17:17PM +0800, Ming Lei wrote: > > > We need to iterate ctx starting from any ctx in round robin > > > way, so introduce this helper. > > > > >

Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-09 Thread Ming Lei
On Fri, Sep 08, 2017 at 01:43:41PM -0700, Omar Sandoval wrote: > On Sat, Sep 02, 2017 at 11:17:17PM +0800, Ming Lei wrote: > > We need to iterate ctx starting from any ctx in round robin > > way, so introduce this helper. > > > > Cc: Omar Sandoval > > A couple of comments below,

Re: [PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-08 Thread Omar Sandoval
On Sat, Sep 02, 2017 at 11:17:17PM +0800, Ming Lei wrote: > We need to iterate ctx starting from any ctx in round robin > way, so introduce this helper. > > Cc: Omar Sandoval A couple of comments below, once you address those you can add Reviewed-by: Omar Sandoval

[PATCH V4 02/14] sbitmap: introduce __sbitmap_for_each_set()

2017-09-02 Thread Ming Lei
We need to iterate ctx starting from any ctx in round robin way, so introduce this helper. Cc: Omar Sandoval Signed-off-by: Ming Lei --- include/linux/sbitmap.h | 54 - 1 file changed, 40 insertions(+), 14