When does `write' return?
- From: "Andrew Xue" <xueruini@xxxxxxxxx>
- Date: 12 Jan 2006 05:16:53 -0800
Hello,
As far as I know, the system call `write' is asynchronous, which
would leave the `data' in page cache. The `data' would be flushed in
the background, thus the `write' could return quickly, in order to
improve the performance.
My question is: when would the `write' return? For example:
write(fd, buf, 1GB)
The 1GB buf will be written in to disk file represented by `fd'. When
the `write' returns, how much of buf has been written? Does the kernel
cache the buf with copy-on-write or just making a full memory copy?
I am not so familiar with linux kernel, please forgive me if the
question is too silly.
Best Regards
Andrew Xue
.
- Follow-Ups:
- Re: When does `write' return?
- From: Jean-David Beyer
- Re: When does `write' return?
- Prev by Date: Re: Anybody use Linux on Dell in an organization?
- Next by Date: Re: Dial-up connection
- Previous by thread: devfs + kernel 2.6.12.12 + CD burning
- Next by thread: Re: When does `write' return?
- Index(es):
Relevant Pages
|