[ofa-general][PATCH 3/12 v1] mlx4: Qp range reservation

Yevgeny Petrilin yevgenyp at mellanox.co.il
Tue Jun 10 22:11:51 PDT 2008


Roland Dreier wrote:
>  > +static unsigned long find_aligned_range(unsigned long *bitmap,
>  > +					u32 start, u32 nbits,
>  > +					int len, int align)
> 
> Seems that a lot of this code can be replaced by a call to
> bitmap_find_free_region()?
> 
>  - R.
> 
bitmap_find_free_region() always searches from the beginning of the bitmap,
while we search from the last bit that was set for efficiency reasons.
Moving the bitmap pointer to the "last" location while passing it to the function,
is not so good because the "last" index is not always aligned to size of long.

Thanks,
Yevgeny


--
Yevgeny Petrilin
Mellanox Technalogies LTD.
SW- Linux
Phone: +972 (4) 909 7200 (ext.7677)
Mobile: +972 (54) 783 9222
E-mail: yevgenyp at mellanox.co.il

----------------------------------------------------------------------
Emails belong on computers, trees belong in forests; if you must print
this, do it on recycled paper.
http://www.greenpeace.org/international/
----------------------------------------------------------------------


Disclaimer added by CodeTwo Exchange Rules
http://www.codetwo.com



More information about the general mailing list