linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] lib: rework bitmap_parselist and tests
@ 2019-04-03  4:40 Yury Norov
  0 siblings, 0 replies; 6+ messages in thread
From: Yury Norov @ 2019-04-03  4:40 UTC (permalink / raw)
  To: Andrew Morton, Andy Shevchenko, Rasmus Villemoes, Arnd Bergmann,
	Kees Cook, Matthew Wilcox, Tetsuo Handa, Mike Travis
  Cc: Yury Norov, Yury Norov, linux-kernel

bitmap_parselist has been evolved from a pretty simple idea for long and
now lacks for refactoring. It is not structured, has nested loops and a
set of opaque-named variables.

Things are more complicated because bitmap_parselist() is a part of user
interface, and its behavior should not change.

In this patchset
 - bitmap_parselist_user() made a wrapper on bitmap_parselist();
 - bitmap_parselist() reworked (patch 2);
 - time measurement in test_bitmap_parselist switched to ktime_get
   (patch 3);
 - new tests introduced (patch 4), and
 - bitmap_parselist_user() testing enabled with the same testset as
   bitmap_parselist() (patch 5).

v1: https://lkml.org/lkml/2018/12/23/50
v2: https://www.spinics.net/lists/kernel/msg3048976.html
v3: Implementation of an approach with copying the data to
    kernel space in bitmap_parselist_user() instead of parsing
    user data byte by byte. For me, it looks better than v2.

Yury Norov (5):
  lib: make bitmap_parselist_user() a wrapper on bitmap_parselist()
  lib: rework bitmap_parselist
  lib/test_bitmap: switch test_bitmap_parselist to ktime_get()
  lib/test_bitmap: add testcases for bitmap_parselist
  lib/test_bitmap: add tests for bitmap_parselist_user

 lib/bitmap.c      | 285 ++++++++++++++++++++++++++--------------------
 lib/test_bitmap.c |  67 ++++++++---
 2 files changed, 218 insertions(+), 134 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/5] lib: rework bitmap_parselist and tests
  2019-04-03  4:45 Yury Norov
  2019-04-03  4:54 ` Yury Norov
@ 2019-04-03 11:24 ` Andy Shevchenko
  1 sibling, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2019-04-03 11:24 UTC (permalink / raw)
  To: Yury Norov
  Cc: Andrew Morton, Rasmus Villemoes, Arnd Bergmann, Kees Cook,
	Matthew Wilcox, Tetsuo Handa, Mike Travis, Yury Norov,
	linux-kernel

On Wed, Apr 03, 2019 at 07:45:35AM +0300, Yury Norov wrote:
> bitmap_parselist has been evolved from a pretty simple idea for long and
> now lacks for refactoring. It is not structured, has nested loops and a
> set of opaque-named variables.
> 
> Things are more complicated because bitmap_parselist() is a part of user
> interface, and its behavior should not change.
> 
> In this patchset
>  - bitmap_parselist_user() made a wrapper on bitmap_parselist();
>  - bitmap_parselist() reworked (patch 2);
>  - time measurement in test_bitmap_parselist switched to ktime_get
>    (patch 3);
>  - new tests introduced (patch 4), and
>  - bitmap_parselist_user() testing enabled with the same testset as
>    bitmap_parselist() (patch 5).

Thanks for an update. Result looks good, though few comments per individual patches.

> 
> v1: https://lkml.org/lkml/2018/12/23/50
> v2: https://www.spinics.net/lists/kernel/msg3048976.html
> v3: Implementation of an approach with copying the data to
>     kernel space in bitmap_parselist_user() instead of parsing
>     user data byte by byte. For me, it looks better than v2.
> 
> Yury Norov (5):
>   lib: make bitmap_parselist_user() a wrapper on bitmap_parselist()
>   lib: rework bitmap_parselist
>   lib/test_bitmap: switch test_bitmap_parselist to ktime_get()
>   lib/test_bitmap: add testcases for bitmap_parselist
>   lib/test_bitmap: add tests for bitmap_parselist_user
> 
>  lib/bitmap.c      | 285 ++++++++++++++++++++++++++--------------------
>  lib/test_bitmap.c |  67 ++++++++---
>  2 files changed, 218 insertions(+), 134 deletions(-)
> 
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/5] lib: rework bitmap_parselist and tests
  2019-04-03  4:54 ` Yury Norov
@ 2019-04-03 11:23   ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2019-04-03 11:23 UTC (permalink / raw)
  To: Yury Norov
  Cc: Andrew Morton, Rasmus Villemoes, Arnd Bergmann, Kees Cook,
	Matthew Wilcox, Tetsuo Handa, Mike Travis, Yury Norov,
	linux-kernel

On Wed, Apr 03, 2019 at 07:54:27AM +0300, Yury Norov wrote:
> On Wed, Apr 03, 2019 at 07:45:35AM +0300, Yury Norov wrote:
> > bitmap_parselist has been evolved from a pretty simple idea for long and
> > now lacks for refactoring. It is not structured, has nested loops and a
> > set of opaque-named variables.
> > 
> > Things are more complicated because bitmap_parselist() is a part of user
> > interface, and its behavior should not change.
> > 
> > In this patchset
> >  - bitmap_parselist_user() made a wrapper on bitmap_parselist();
> >  - bitmap_parselist() reworked (patch 2);
> >  - time measurement in test_bitmap_parselist switched to ktime_get
> >    (patch 3);
> >  - new tests introduced (patch 4), and
> >  - bitmap_parselist_user() testing enabled with the same testset as
> >    bitmap_parselist() (patch 5).
> > 
> > v1: https://lkml.org/lkml/2018/12/23/50
> > v2: https://www.spinics.net/lists/kernel/msg3048976.html
> > v3: Implementation of an approach with copying the data to
> >     kernel space in bitmap_parselist_user() instead of parsing
> >     user data byte by byte. For me, it looks better than v2.

> I'm sorry for noise. My mail server works unstable, and it would be
> better to submit patches 4 and 5 a bit later. They are actually the
> same as in v2.

May you send then v4 with my (and others if any) comments being addressed?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/5] lib: rework bitmap_parselist and tests
  2019-04-03  4:45 Yury Norov
@ 2019-04-03  4:54 ` Yury Norov
  2019-04-03 11:23   ` Andy Shevchenko
  2019-04-03 11:24 ` Andy Shevchenko
  1 sibling, 1 reply; 6+ messages in thread
From: Yury Norov @ 2019-04-03  4:54 UTC (permalink / raw)
  To: Andrew Morton, Andy Shevchenko, Rasmus Villemoes, Arnd Bergmann,
	Kees Cook, Matthew Wilcox, Tetsuo Handa, Mike Travis
  Cc: Yury Norov, linux-kernel

On Wed, Apr 03, 2019 at 07:45:35AM +0300, Yury Norov wrote:
> bitmap_parselist has been evolved from a pretty simple idea for long and
> now lacks for refactoring. It is not structured, has nested loops and a
> set of opaque-named variables.
> 
> Things are more complicated because bitmap_parselist() is a part of user
> interface, and its behavior should not change.
> 
> In this patchset
>  - bitmap_parselist_user() made a wrapper on bitmap_parselist();
>  - bitmap_parselist() reworked (patch 2);
>  - time measurement in test_bitmap_parselist switched to ktime_get
>    (patch 3);
>  - new tests introduced (patch 4), and
>  - bitmap_parselist_user() testing enabled with the same testset as
>    bitmap_parselist() (patch 5).
> 
> v1: https://lkml.org/lkml/2018/12/23/50
> v2: https://www.spinics.net/lists/kernel/msg3048976.html
> v3: Implementation of an approach with copying the data to
>     kernel space in bitmap_parselist_user() instead of parsing
>     user data byte by byte. For me, it looks better than v2.

Hi all,

I'm sorry for noise. My mail server works unstable, and it would be
better to submit patches 4 and 5 a bit later. They are actually the
same as in v2.

Yury

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 0/5] lib: rework bitmap_parselist and tests
@ 2019-04-03  4:45 Yury Norov
  2019-04-03  4:54 ` Yury Norov
  2019-04-03 11:24 ` Andy Shevchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Yury Norov @ 2019-04-03  4:45 UTC (permalink / raw)
  To: Andrew Morton, Andy Shevchenko, Rasmus Villemoes, Arnd Bergmann,
	Kees Cook, Matthew Wilcox, Tetsuo Handa, Mike Travis
  Cc: Yury Norov, Yury Norov, linux-kernel

bitmap_parselist has been evolved from a pretty simple idea for long and
now lacks for refactoring. It is not structured, has nested loops and a
set of opaque-named variables.

Things are more complicated because bitmap_parselist() is a part of user
interface, and its behavior should not change.

In this patchset
 - bitmap_parselist_user() made a wrapper on bitmap_parselist();
 - bitmap_parselist() reworked (patch 2);
 - time measurement in test_bitmap_parselist switched to ktime_get
   (patch 3);
 - new tests introduced (patch 4), and
 - bitmap_parselist_user() testing enabled with the same testset as
   bitmap_parselist() (patch 5).

v1: https://lkml.org/lkml/2018/12/23/50
v2: https://www.spinics.net/lists/kernel/msg3048976.html
v3: Implementation of an approach with copying the data to
    kernel space in bitmap_parselist_user() instead of parsing
    user data byte by byte. For me, it looks better than v2.

Yury Norov (5):
  lib: make bitmap_parselist_user() a wrapper on bitmap_parselist()
  lib: rework bitmap_parselist
  lib/test_bitmap: switch test_bitmap_parselist to ktime_get()
  lib/test_bitmap: add testcases for bitmap_parselist
  lib/test_bitmap: add tests for bitmap_parselist_user

 lib/bitmap.c      | 285 ++++++++++++++++++++++++++--------------------
 lib/test_bitmap.c |  67 ++++++++---
 2 files changed, 218 insertions(+), 134 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 0/5] lib: rework bitmap_parselist and tests
@ 2019-04-03  4:39 Yury Norov
  0 siblings, 0 replies; 6+ messages in thread
From: Yury Norov @ 2019-04-03  4:39 UTC (permalink / raw)
  To: Andrew Morton, Andy Shevchenko, Rasmus Villemoes, Arnd Bergmann,
	Kees Cook, Matthew Wilcox, Tetsuo Handa, Mike Travis
  Cc: Yury Norov, Yury Norov, linux-kernel

bitmap_parselist has been evolved from a pretty simple idea for long and
now lacks for refactoring. It is not structured, has nested loops and a
set of opaque-named variables.

Things are more complicated because bitmap_parselist() is a part of user
interface, and its behavior should not change.

In this patchset
 - bitmap_parselist_user() made a wrapper on bitmap_parselist();
 - bitmap_parselist() reworked (patch 2);
 - time measurement in test_bitmap_parselist switched to ktime_get
   (patch 3);
 - new tests introduced (patch 4), and
 - bitmap_parselist_user() testing enabled with the same testset as
   bitmap_parselist() (patch 5).

v1: https://lkml.org/lkml/2018/12/23/50
v2: https://www.spinics.net/lists/kernel/msg3048976.html
v3: Implementation of an approach with copying the data to
    kernel space in bitmap_parselist_user() instead of parsing
    user data byte by byte. For me, it looks better than v2.

Yury Norov (5):
  lib: make bitmap_parselist_user() a wrapper on bitmap_parselist()
  lib: rework bitmap_parselist
  lib/test_bitmap: switch test_bitmap_parselist to ktime_get()
  lib/test_bitmap: add testcases for bitmap_parselist
  lib/test_bitmap: add tests for bitmap_parselist_user

 lib/bitmap.c      | 285 ++++++++++++++++++++++++++--------------------
 lib/test_bitmap.c |  67 ++++++++---
 2 files changed, 218 insertions(+), 134 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-03 11:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  4:40 [PATCH v3 0/5] lib: rework bitmap_parselist and tests Yury Norov
  -- strict thread matches above, loose matches on Subject: below --
2019-04-03  4:45 Yury Norov
2019-04-03  4:54 ` Yury Norov
2019-04-03 11:23   ` Andy Shevchenko
2019-04-03 11:24 ` Andy Shevchenko
2019-04-03  4:39 Yury Norov

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).