lkml.org 
[lkml]   [2003]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mmap-related questions
On Wed, Apr 02, 2003 at 11:30:50AM +0200, Jakob Oestergaard wrote:
> make_dirty(big_map)
> msync(first half of big_map)
> msync(second half of big_map) { crash during this }
>
> Then I am guaranteed that (unless the server crashes), the first half of
> big_map *will* have reached the server, but not that all of the second
> half has. Right?

Assuming you used MS_SYNC for the msync() flags. MS_ASYNC could still be
proceeding to flush the pages out in the background. And the kernel may
have triggered writeback of the second half -- it is free to do so as it
sees fit.

> Like any local-disk backed file.
>
> Ignoring the case where the NFS *server* crashes, where could the write
> ordering differ, compared to local disk files ?

> In other words, what does Benjamin's "unexpected ways" refer to ?

All local clients will see the mmap() being updated from the time it is
dirtied, but there is no ordering of write()s with respect to the mmap
unless you explicitely msync(..MS_SYNC..) as in your example.

-ben
--
Junk email? <a href="mailto:aart@kvack.org">aart@kvack.org</a>
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.049 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site