Messages in this thread | | | Date | Tue, 9 Apr 2013 13:22:02 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH v2] bitmap: speedup in bitmap_find_free_region when order is 0 |
| |
On Tue, 9 Apr 2013 15:34:44 +0900 "Chanho Min" <chanho.min@lge.com> wrote:
> >It seems excessively complicated to me. Why not change > >bitmap_find_free_region() to skip the leading all-ones words and when > >it finds a not-all-ones word, adjust `pos' then fall into the existing > >bit-at-a-time search? > > Do we need the additional 'if' inside the for loop for implementing it?
It was just a concept - there are various ways of optimizing a real implementation. Move the code into userspace then run some microbenchmarks.
> I thought the separation of the routine for order=0 is the way to avoid > the impact on the existing codes and its performance.
The existing code doesn't have any performance ;) It's so darn slow that even a minor effort here will yield large (ie order-of-magnitude) performance improvements.
| |