All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Dave Young <dyoung@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Petr Mladek <pmladek@suse.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH v2] printk: move dump stack related code to lib/dump_stack.c
Date: Tue, 13 Feb 2018 17:35:05 +0900	[thread overview]
Message-ID: <20180213083505.GA1953@jagdpanzerIV> (raw)
In-Reply-To: <20180213072834.GA24784@dhcp-128-65.nay.redhat.com>

On (02/13/18 15:28), Dave Young wrote:
> 
> dump_stack related stuff should belong to lib/dump_stack.c thus move them
> there. Also conditionally compile lib/dump_stack.c since dump_stack code
> does not make sense if printk is disabled.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Suggested-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>


The patch also saves us some additional memory on !PRINTK configs.
For example things like this

	if (kobj->state_initialized) {
		/* do not error out as sometimes we can recover */
		printk(KERN_ERR "kobject (%p): tried to init an initialized "
		       "object, something is seriously wrong.\n", kobj);
		dump_stack();
	}

now we won't have that dump_stack() call, which does not seems to be doing
anything useful anyway when printk() is not available.

	-ss

  reply	other threads:[~2018-02-13  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13  7:28 [PATCH v2] printk: move dump stack related code to lib/dump_stack.c Dave Young
2018-02-13  8:35 ` Sergey Senozhatsky [this message]
2018-02-27 10:03   ` Petr Mladek

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=20180213083505.GA1953@jagdpanzerIV \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dyoung@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.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.