Re: CK2 [07/15] Common kmalloc slab index determination

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 22 Oct 2012, Glauber Costa wrote:

> It is still unclear to me if the above is really better than
> ilog2(size -1) + 1

Hmmm... We could change that if ilog2 is now supported on all platforms
and works right. That was not the case a couple of years ago (I believe
2008) when I tried to use ilog.

> For that case, gcc seems to generate dec + brs + inc which at some point
> will be faster than walking a jump table. At least for dynamically-sized
> allocations. The code size is definitely smaller, and this is always
> inline... Anyway, this is totally separate.

Indeed I would favor that approach but it did not work out for all
platforms the last time around. Compiler was getting into issues to do the
constant folding too.

> The patch also seem to have some churn for the slob for no reason: you
> have a patch just to move the kmalloc definitions, would maybe be better
> to do it in there to decrease the # of changes in this one, which is
> more complicated.

Ok. Will look at that.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]