307bf766 | 23-Apr-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
tmpfs - Change paging behavior, fix two directory-entry races
* Change the paging behavior for vfs.tmpfs.bufcache_mode.
These changes try to reduce unnecessary tmpfs flushes to swap when the pa
tmpfs - Change paging behavior, fix two directory-entry races
* Change the paging behavior for vfs.tmpfs.bufcache_mode.
These changes try to reduce unnecessary tmpfs flushes to swap when the pageout daemon is able to locate sufficient clean VM pages. The pageout daemon can still page tmpfs data to swap via its normal operation, but tmpfs itself will not force write()s to pipeline to swap unless memory pressure is severe.
0 tmpfs write()s are pipelined to swap via the buffer cache only if the VM system is below the minimum free page count.
(this is the new default)
1 tmpfs write()s are pipelined to swap via the buffer cache when the VM system is paging.
2 Same as (1) but be more aggressive about releasing buffer cache buffers.
3 tmpfs_write()s are always pipelined to swap via the buffer cache, regardless.
* Fix tmpfs file creation, hard-linking, and rename to ensure that the new file is not created in a deleted directory. We must lock the directory node around existing tests and add checks that were missing.
Also remove a few unnecessary recursive locks.
show more ...
|
4c154053 | 22-Feb-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
tmpfs - Fix races in tmpfs_nrename() and tmpfs_nrmdir()
* Lock all nrename elements before checks. This is particularly important when renaming over a file or empty directory, but other manipul
tmpfs - Fix races in tmpfs_nrename() and tmpfs_nrmdir()
* Lock all nrename elements before checks. This is particularly important when renaming over a file or empty directory, but other manipulations done by this code without locks could also cause races which result in corruption, particularly with the link count.
* Lock all nrmdir elements before checks, for the same reason.
show more ...
|
4eb0bb82 | 13-Feb-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
tmpfs - Improve write clustering
* Setup bmap and max iosize parameters so the kernel's clustering code can actually cluster 16KB tmpfs blocks together into 64KB blocks.
* In low-memory situati
tmpfs - Improve write clustering
* Setup bmap and max iosize parameters so the kernel's clustering code can actually cluster 16KB tmpfs blocks together into 64KB blocks.
* In low-memory situations the pageout daemon will flush tmpfs pages via the VM page queues. This ultimately runs through the tmpfs_vop_write() UIO_NOCOPY path which was previously using cluster_awrite(). However, because other nearby buffers are probably not present (buwrite()'s can allow buffers to be dismissed early), there is nothing for cluster_awrite() to latch onto to improve write granularity beyond 16KB.
Go back to using cluster_write() when SYNC and DIRECT are not specified. This allows the clustering code to collect buffers and flush them in larger chunks.
* Reduces low-memory tmpfs paging I/O overheads by 4x and generally increases paging throughput to SSD-based swap by 2x-4x. Tmpfs is now able to issue a lot more 64KB I/Os when under memory pressure.
show more ...
|