Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339093
| From | Xishi Qiu <qiuxishi@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC] mm: why we should clear page when do anonymous page fault |
| Date | 2016-02-22 04:00 +0100 |
| Message-ID | <r4OT8-7hh-25@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
handle_pte_fault()
do_anonymous_page()
alloc_zeroed_user_highpage_movable()
We will alloc a zeroed page when do anonymous page fault, I don't know
why should clear it? just for safe?
If user space program do like the following, there are two memset 0, right?
kernel alloc zeroed page, and user memset 0 it again, this will waste a
lot of time.
main()
{
...
vaddr = malloc(size)
if (vaddr)
memset(vaddr, 0, size);
...
}
Thanks,
Xishi Qiu
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[RFC] mm: why we should clear page when do anonymous page fault Xishi Qiu <qiuxishi@huawei.com> - 2016-02-22 04:00 +0100 Re: [RFC] mm: why we should clear page when do anonymous page fault Jianyu Zhan <nasa4836@gmail.com> - 2016-02-22 04:20 +0100
csiph-web