From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Seth Jennings <sjenning@linux.vnet.ibm.com>,
Minchan Kim <minchan@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] introduce zero filled pages handler
Date: Tue, 19 Mar 2013 12:44:22 -0400 [thread overview]
Message-ID: <CAPbh3rvOW2hh0bMTY_FyYJPiyqS4a76pHgDYLGYvLKjEzfJoig@mail.gmail.com> (raw)
In-Reply-To: <6041f181-67b1-4f71-bd5c-cfb48f1ddfb0@default>
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?
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-03-19 16:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 10:08 [PATCH v2 0/4] zcache: Support zero-filled pages more efficiently Wanpeng Li
2013-03-14 10:08 ` [PATCH v2 1/4] introduce zero filled pages handler Wanpeng Li
2013-03-16 13:03 ` Konrad Rzeszutek Wilk
2013-03-16 18:24 ` Dan Magenheimer
2013-03-19 16:44 ` Konrad Rzeszutek Wilk [this message]
2013-03-25 19:07 ` Dan Magenheimer
2013-03-17 0:11 ` Wanpeng Li
2013-03-17 0:11 ` Wanpeng Li
2013-03-14 10:08 ` [PATCH v2 2/4] zero-filled pages awareness Wanpeng Li
2013-03-16 13:07 ` Konrad Rzeszutek Wilk
2013-03-14 10:08 ` [PATCH v2 3/4] introduce zero-filled page stat count Wanpeng Li
2013-03-16 13:06 ` Konrad Rzeszutek Wilk
2013-03-17 0:13 ` Wanpeng Li
2013-03-17 0:13 ` Wanpeng Li
2013-03-17 12:58 ` Ric Mason
2013-03-19 16:41 ` Konrad Rzeszutek Wilk
2013-03-19 23:31 ` Ric Mason
2013-03-20 10:22 ` Wanpeng Li
2013-03-20 10:22 ` Wanpeng Li
2013-03-14 10:08 ` [PATCH v2 4/4] clean TODO list Wanpeng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPbh3rvOW2hh0bMTY_FyYJPiyqS4a76pHgDYLGYvLKjEzfJoig@mail.gmail.com \
--to=konrad@darnok.org \
--cc=akpm@linux-foundation.org \
--cc=dan.magenheimer@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=minchan@kernel.org \
--cc=sjenning@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox