lkml.org 
[lkml]   [2013]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/4] introduce zero filled pages handler
From
On Sat, Mar 16, 2013 at 2:24 PM, Dan Magenheimer
<dan.magenheimer@oracle.com> wrote:
>> From: Konrad Rzeszutek Wilk [mailto:konrad@darnok.org]
>> Subject: Re: [PATCH v2 1/4] introduce zero filled pages handler
>>
>> > +
>> > + for (pos = 0; pos < PAGE_SIZE / sizeof(*page); pos++) {
>> > + if (page[pos])
>> > + return false;
>>
>> Perhaps allocate a static page filled with zeros and just do memcmp?
>
> That seems like a bad idea. Why compare two different
> memory locations when comparing one memory location
> to a register will do?
>

Good point. I was hoping there was an fast memcmp that would
do fancy SSE registers. But it is memory against memory instead of
registers.

Perhaps a cunning trick would be to check (as a shortcircuit)
check against 'empty_zero_page' and if that check fails, then try
to do the check for each byte in the code?

>


\
 
 \ /
  Last update: 2013-03-19 18:21    [W:0.042 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site