mirror_zfs/include
Richard Yao c2fa09454e 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 <behlendorf1@llnl.gov>
2015-01-16 13:55:09 -08:00
..
fs Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
linux Refactor existing code 2015-01-16 13:55:08 -08:00
rpc Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
sharefs Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
sys Add hooks for disabling direct reclaim 2015-01-16 13:55:09 -08:00
util Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
vm Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
Makefile.am Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-ctl.h Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-ctl.h Update code to use misc_register()/misc_deregister() 2014-10-17 15:07:28 -07:00
strings.h Refresh links to web site 2013-03-04 19:09:34 -08:00
unistd.h Refresh links to web site 2013-03-04 19:09:34 -08:00