lkml.org 
[lkml]   [2009]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] add ksm kernel shared memory driver.
Andrey Panin wrote:
> On 094, 04 04, 2009 at 05:35:22PM +0300, Izik Eidus wrote:
>
> <SNIP>
>
>
>> +static inline u32 calc_checksum(struct page *page)
>> +{
>> + u32 checksum;
>> + void *addr = kmap_atomic(page, KM_USER0);
>> + checksum = jhash(addr, PAGE_SIZE, 17);
>>
>
> Why jhash2() is not used here ? It's faster and leads to smaller code size.
>

Beacuse i didnt know, i will check that and change.

Thanks.

(We should really use in cpu crc for Intel Nehalem, and dirty bit for
the rest of the architactures...)

>
>> + kunmap_atomic(addr, KM_USER0);
>> + return checksum;
>> +}
>>
>
>



\
 
 \ /
  Last update: 2009-04-06 13:03    [W:0.040 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site