Re: Are there shared copy-on-write pages?

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

 



Hi lk,
 
Do you mean that pages (new copies of pages) generated through page fault handler are not cow, right?
COW page is that one shared among processes for read access and invokes the page fault handler because a process tried to write to it, right?
 
I thought that cow pages are those pages (new copies of pages) generated by page fault handler.
 
BR,
 
Mauricio Lin.

lk <linux_kernel@xxxxxxxxx> escreveu:

Here are my views
> Does anyone know if it is possible to have a
> copy-on-write page that is shared?
>

After forking all the pages are marked COW. COW
pages are always shared.

>Shared page is represented by "page_count(page) >= 2".
>
> So can I have a copy-on-write page that its count is
> >= 2 (shared)?
>
>
Yes, rather one should bother about internal details
and should use directly page_count() macro and not
page->_count directly because for a free page this value
is -1 (-ve) and if only one process is there then
page->_count equals zero. So better use page_count().


COW pages will be alwys read only. One process trying
to write will lead to generate page fault. page fault
handler will give new copy of the page to write.

Regards,
lk


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/


Yahoo! Mail: agora com 1GB de espaço grátis. Abra sua conta!

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux