lkml.org 
[lkml]   [2009]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [this_cpu_xx V7 6/8] Make slub statistics use this_cpu_inc
Le 15/12/2009 15:46, Christoph Lameter a écrit :
> On Tue, 15 Dec 2009, Eric Dumazet wrote:
>
>> Le 14/12/2009 23:03, Christoph Lameter a écrit :
>>> this_cpu_inc() translates into a single instruction on x86 and does not
>>> need any register. So use it in stat(). We also want to avoid the
>>> calculation of the per cpu kmem_cache_cpu structure pointer. So pass
>>> a kmem_cache pointer instead of a kmem_cache_cpu pointer.
>>>
>>
>> Hmm, last time I checked, [__]this_cpu_inc were not using "inc" on x86,
>> but the default [__]this_cpu_add((pcp), 1)
>
> Well the add 1 is still a single instruction so its okay. We can easily
> add support for inc on x86 if makes a difference?
>

Probably not, only one byte of text per use can be saved.

Sorry, rereading your changelog I dont know why I thought about "inc" instruction.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-12-15 16:03    [W:0.112 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site