Skip to contentSkip to conversation

posix_fadvise(2): mention sync_file_range(2)

DISCUSSION Manfred Schwarb 2 participants 2 messages Mar 3, 2010 – Jun 14, 2010 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hi,

for POSIX_FADV_DONTNEED, syncing with fsync(2) or fdatasync(2) is recommended in the man page of posix_fadvise(2).
However, for this task sync_file_range(2) is probably best suited, as it is fast and has the same granularity as posix_fadvise(2).
akpm also used sync_file_range(2) for his user space helpers:
http://userweb.kernel.org/~akpm/pagecache-management/pagecache-management/pagecache-management.c

So I suggest to add sync_file_range(2) to the list of mentioned sync functions.

Cheers,
Manfred
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive

Hello Manfred,

Quoted 10 lines · Manfred Schwarb

Hi,

for POSIX_FADV_DONTNEED, syncing with fsync(2) or fdatasync(2) is recommended in the man page of posix_fadvise(2).
However, for this task sync_file_range(2) is probably best suited, as it is fast and has the same granularity as posix_fadvise(2).
akpm also used sync_file_range(2) for his user space helpers:
http://userweb.kernel.org/~akpm/pagecache-management/pagecache-management/pagecache-management.c

So I suggest to add sync_file_range(2) to the list of mentioned sync functions.

Thanks. Done, for man-pages-3.25.

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface" http://blog.man7.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html