Linux 2.1.109 doing copy-on-write ?

Marc SCHAEFER (schaefer@alphanet.ch)
22 Jul 1998 17:38:09 +0200


Hi,

it seems from what I see in mm/filemap.c that write() is now implemented
as copy-on-write (ie if user-space leaves alone the buffer after the
write(), data is sent direct to device with no copy_from_user()).

That's nice. However, how can I be sure from user space that the operation
completed and it's ok *performance-wise* to reuse the page ?

while (TRUE) {
if (buffer_1_finished()) {
/* generate data in buffer1 */
write(fd, buffer1, size);
}
if (buffer_2_finished()) {
/* generate data in buffer2 */
write(fd, buffer2, size);
}
}

What is the condition buffer_1_finished() ?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html