From: aris@redhat.com
To: linux-kerne@vger.kernel.org
Cc: linux-mm@kvack.org, x86@kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Michal Hocko <mhocko@kernel.org>,
Greg Thelen <gthelen@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
David Rientjes <rientjes@google.com>
Subject: [PATCH 1/5] dump_stack: pass log level to dump_stack_print_info()
Date: Thu, 05 Nov 2015 17:30:15 -0500 [thread overview]
Message-ID: <20151105223014.759064379@redhat.com> (raw)
In-Reply-To: 20151105223014.701269769@redhat.com
[-- Attachment #1: 0001-dump_stack-pass-log-level-to-dump_stack_print_info.patch --]
[-- Type: text/plain, Size: 1754 bytes --]
This is in preparation for dump_stack_lvl() which will allow the log level to
be passed.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
---
lib/dump_stack.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
--- linux-2.6.orig/lib/dump_stack.c 2015-11-05 13:56:08.387048346 -0500
+++ linux-2.6/lib/dump_stack.c 2015-11-05 13:56:34.900748897 -0500
@@ -9,9 +9,9 @@
#include <linux/smp.h>
#include <linux/atomic.h>
-static void __dump_stack(void)
+static void __dump_stack(char *log_lvl)
{
- dump_stack_print_info(KERN_DEFAULT);
+ dump_stack_print_info(log_lvl);
show_stack(NULL, NULL);
}
@@ -23,7 +23,7 @@ static void __dump_stack(void)
#ifdef CONFIG_SMP
static atomic_t dump_lock = ATOMIC_INIT(-1);
-asmlinkage __visible void dump_stack(void)
+static void _dump_stack(char *log_lvl)
{
int was_locked;
int old;
@@ -47,17 +47,23 @@ was_locked = 0;
goto retry;
}
- __dump_stack();
+ __dump_stack(log_lvl);
if (!was_locked)
atomic_set(&dump_lock, -1);
preempt_enable();
}
+
+asmlinkage __visible void dump_stack(void)
+{
+ _dump_stack(KERN_DEFAULT);
+}
+
#else
asmlinkage __visible void dump_stack(void)
{
- __dump_stack();
+ __dump_stack(KERN_DEFAULT);
}
#endif
EXPORT_SYMBOL(dump_stack);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-11-05 22:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 22:30 [PATCH 0/5] dump_stack: allow specifying printk log level aris
2015-11-05 22:30 ` aris [this message]
2015-11-05 22:30 ` [PATCH 2/5] dump_stack: introduce dump_stack_lvl aris
2015-11-05 22:30 ` [PATCH 3/5] dump_stack: introduce generic show_stack_lvl() aris
2015-11-05 22:30 ` [PATCH 4/5] x86: dumpstack - implement show_stack_lvl() aris
2015-11-12 8:06 ` Ingo Molnar
2015-11-05 22:30 ` [PATCH 5/5] mm: use KERN_DEBUG for dump_stack() during an OOM aris
2015-11-12 10:26 ` Michal Hocko
2015-11-09 16:21 ` [PATCH 0/5] dump_stack: allow specifying printk log level Michal Hocko
2015-12-01 23:48 ` Andrew Morton
2015-12-02 13:53 ` Aristeu Rozanski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151105223014.759064379@redhat.com \
--to=aris@redhat.com \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=hpa@zytor.com \
--cc=linux-kerne@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.