summaryrefslogtreecommitdiffstats
path: root/fs/xfs/kmem.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2015-10-12 16:04:45 +1100
committerDave Chinner <david@fromorbit.com>2015-10-12 16:04:45 +1100
commit847f9f6875fb02b576035e3dc31f5e647b7617a7 (patch)
tree34beacf9cf2facf6251ef86bce93753ba65e498a /fs/xfs/kmem.c
parent51fcbfe7092a18a138e28110df3ab7e666bf69ee (diff)
downloadlinux-stable-847f9f6875fb02b576035e3dc31f5e647b7617a7.tar.gz
linux-stable-847f9f6875fb02b576035e3dc31f5e647b7617a7.tar.bz2
linux-stable-847f9f6875fb02b576035e3dc31f5e647b7617a7.zip
xfs: more info from kmem deadlocks and high-level error msgs
In an effort to get more useful out of "possible memory allocation deadlock" messages, print the size of the requested allocation, and dump the stack if the xfs error level is tuned high. The stack dump is implemented in define_xfs_printk_level() for error levels >= LOGLEVEL_ERR, partly because it seems generically useful, and also because kmem.c has no knowledge of xfs error level tunables or other such bits, it's very kmem-specific. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/kmem.c')
-rw-r--r--fs/xfs/kmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/kmem.c b/fs/xfs/kmem.c
index 535c13677e7a..686ba6fb20dd 100644
--- a/fs/xfs/kmem.c
+++ b/fs/xfs/kmem.c
@@ -55,9 +55,9 @@ kmem_alloc(size_t size, xfs_km_flags_t flags)
return ptr;
if (!(++retries % 100))
xfs_err(NULL,
- "%s(%u) possible memory allocation deadlock in %s (mode:0x%x)",
+ "%s(%u) possible memory allocation deadlock size %u in %s (mode:0x%x)",
current->comm, current->pid,
- __func__, lflags);
+ (unsigned int)size, __func__, lflags);
congestion_wait(BLK_RW_ASYNC, HZ/50);
} while (1);
}