HomeFreeBSD

Annotate KM_PUSHPAGE call paths with PF_NOFS

Description

Annotate KM_PUSHPAGE call paths with PF_NOFS

The txg_sync(), zfs_putpage(), zvol_write(), and zvol_discard()
call paths must only use KM_PUSHPAGE to avoid potential deadlocks
during direct reclaim.

This patch annotates these call paths so any accidental use of
KM_SLEEP will be quickly detected. In the interest of stability
if debugging is disabled the offending allocation will have its
GFP flags automatically corrected. When debugging is enabled
any misuse will be treated as a fatal error.

This patch is entirely for debugging. We should be careful to
NOT become dependant on it fixing up the incorrect allocations.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Aug 18 2012, 6:17 PM
Parents
rG86dd0fd9222b: Pre-allocate vdev I/O buffers
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG8630650a8d9c: Annotate KM_PUSHPAGE call paths with PF_NOFS (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Aug 27 2012, 7:01 PM