[RFC] mm: why we should clear page when do anonymous page fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]