[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1307292242380.9718@eggly.anvils>
Date: Mon, 29 Jul 2013 22:54:12 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: dmi p <d3vp0ll@...il.com>
cc: linux-kernel@...r.kernel.org
Subject: Re: write(2) and page cache
On Sun, 28 Jul 2013, dmi p wrote:
> Hi,
> When I write(2) on a file such that the size of the buffer being
> written is less than the page size, and the page is not in the page
> cache, does the write syscall block until the page is brought into the
> page cache from disk (to modify it and eventually write back),
Yes (except perhaps when overwriting that part of page at end of file:
I expect some filesystems might optimize out that read, and others not).
> or is the page reading part async with respect to write?
No, that would involve another layer of buffering, which I think
would be too hard to synchronize with page cache and mmap.
Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists