Re: [PATCH] zerocopy NFS updated

Hirokazu Takahashi (taka@valinux.co.jp)
Thu, 11 Apr 2002 16:41:34 +0900 (JST)


Hi,

davem> Consider truncate() to 1 byte left in that page. To handle mmap()'s
davem> of this file the kernel will memset() rest of the page to zero.
davem> Now, in the sendfile() case the NFS client sees some page filled
davem> mostly of zeros instead of file contents.

Hmmm... I realize clearly.

davem> In sendmsg() knfd case, client sees something reasonable. He will
davem> see something that was actually in the file at some point in time.
davem> The sendfile() case sees pure garbage, contents that never were in
davem> the file at any point in time.
davem>
davem> We could make knfsd take the write semaphore on the inode until client
davem> is known to get the packet but that is the kind of overhead we'd like
davem> to avoid.

Yes, the write semaphore would be good solution if TCP/IP stack never
get stuck.

Now I wonder if we could make these pages COW mode.
When some process try to update the pages, they should be duplicated.
I's easy to implement it in write(), truncate() and so on.
But mmap() is little bit difficult if there no reverse mapping page to PTE.

How do you think about this idea?

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