RE: [PATCH v2 1/4] introduce zero filled pages handler

From: Dan Magenheimer
Date: Sat Mar 16 2013 - 14:25:02 EST


> From: Konrad Rzeszutek Wilk [mailto:konrad@xxxxxxxxxx]
> 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?

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