summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2014-07-13 14:45:20 -0400
committerBrian Behlendorf <[email protected]>2015-01-16 13:55:09 -0800
commitc2fa09454ef322a34df58655978e79c1c7fab641 (patch)
tree402e6e539d6eefdc0732bacb84f68fe2f5cc77ee /Makefile.am
parentc3eabc75b1ea41a12e3fec06db74a2995bda7514 (diff)
Add hooks for disabling direct reclaim
The port of XFS to Linux introduced a thread-specific PF_FSTRANS bit that is used to mark contexts which are processing transactions. When set, allocations in this context can dip into kernel memory reserves to avoid deadlocks during writeback. Linux 3.9 provided the additional PF_MEMALLOC_NOIO for disabling __GFP_IO in page allocations, which XFS began using in 3.15. This patch implements hooks for marking transactions via PF_FSTRANS. When an allocation is performed in the context of PF_FSTRANS, any KM_SLEEP allocation is transparently converted to a GFP_NOIO allocation. Additionally, when using a Linux 3.9 or newer kernel, it will set PF_MEMALLOC_NOIO to prevent direct reclaim from entering pageout() on on any KM_PUSHPAGE or KM_NOSLEEP allocation. This effectively allows the spl_vmalloc() helper function to be used safely in a thread which is responsible for IO. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'Makefile.am')
0 files changed, 0 insertions, 0 deletions