lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ