Hi,
Currently, libdiskfs:io_write.c only calls "diskfs_file_update(struct
node *np, int wait)" if the node has been opened with O_FSYNC or if
the entire translator is operating synchronously (diskfs_synchronous
== 1). I think calling diskfs_file_update (with wait == 0) when
working asynchronously could help to reduce pageout pressure during
large I/O operations (except if those operations are being generated
by a mmap'ed file), at the expense of losing the ability of
indefinitely delaying the actual write.
diff -dur hurd.orig/libdiskfs/io-write.c hurd/libdiskfs/io-write.c
--- hurd.orig/libdiskfs/io-write.c 2011-09-13 21:12:16.000000000 +0200
+++ hurd/libdiskfs/io-write.c 2011-09-13 21:20:32.000000000 +0200
@@ -82,9 +82,13 @@
if (!err && offset == -1)
cred->po->filepointer += *amt;
- if (!err
- && ((cred->po->openstat & O_FSYNC) || diskfs_synchronous))
- diskfs_file_update (np, 1);
+ if (!err)
+ {
+ if ((cred->po->openstat & O_FSYNC) || diskfs_synchronous)
+ diskfs_file_update (np, 1);
+ else
+ diskfs_file_update (np, 0);
+ }
if (!err && np->filemod_reqs)
diskfs_notice_filechange (np, FILE_CHANGED_WRITE, off, off + *amt);