summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorTetsuo Handa2015-10-12 06:41:29 +0200
committerDave Chinner2015-10-12 06:41:29 +0200
commit5bf97b1cb430a3a6da4341ae913299706ebc52f5 (patch)
treedbbf0459334e68d36b27baeabe3d2c69a545ca77 /fs/xfs/xfs_buf.c
parentLinux 4.3-rc2 (diff)
downloadkernel-qcow2-linux-5bf97b1cb430a3a6da4341ae913299706ebc52f5.tar.gz
kernel-qcow2-linux-5bf97b1cb430a3a6da4341ae913299706ebc52f5.tar.xz
kernel-qcow2-linux-5bf97b1cb430a3a6da4341ae913299706ebc52f5.zip
xfs: Print name and pid when memory allocation loops
This patch adds comm name and pid to warning messages printed by kmem_alloc(), kmem_zone_alloc() and xfs_buf_allocate_memory(). This will help telling which memory allocations (e.g. kernel worker threads, OOM victim tasks, neither) are stalling because these functions are passing __GFP_NOWARN which suppresses not only backtrace but comm name and pid. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 8ecffb35935b..cac62e14d73a 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -354,7 +354,8 @@ retry:
*/
if (!(++retries % 100))
xfs_err(NULL,
- "possible memory allocation deadlock in %s (mode:0x%x)",
+ "%s(%u) possible memory allocation deadlock in %s (mode:0x%x)",
+ current->comm, current->pid,
__func__, gfp_mask);
XFS_STATS_INC(xb_page_retries);