Przeglądaj źródła
dpkg: On non-Linux use fadvise(FADV_DONTNEED) to initiate writeback
Use the posix_fadvise(POSIX_FADV_DONTNEED) hint to notify the kernel
dpkg does not need the unpacked files any longer and as such it can
start writeback asynchronously.
Although POSIX does not explicitly say so, and this is merely a hint,
this is the only sensible thing to do for the kernel. On Linux at least
it also evicts the pages if they are not currently under writeback,
locked or dirty, which might be undesired if a maintainer script has
to use the data, but unlikely as the writeback will still be ongoing
if it started at all.
In addition it could be argued the Linux implementation is not optimal
as the standard talks about the application not needing the data any
longer, not the system. So it seems the NetBSD implementation which
just marks the pages as not active would be more correct.