linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Calvin Owens <calvinowens@fb.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Howells <dhowells@redhat.com>,
	Pranith Kumar <bobby.prani@gmail.com>,
	David Woodhouse <David.Woodhouse@intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Petr Mladek <pmladek@suse.com>, Vasily Averin <vvs@virtuozzo.com>,
	Thierry Reding <treding@nvidia.com>,
	Geliang Tang <geliangtang@163.com>,
	Ivan Delalande <colona@arista.com>,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [RFC][PATCH] printk: Add option to append kernel version to the dict
Date: Wed, 18 May 2016 00:43:10 +0900	[thread overview]
Message-ID: <20160517154310.GC582@swordfish> (raw)
In-Reply-To: <20160517135128.GA4775@htj.duckdns.org>

Hello Tejun,

On (05/17/16 06:51), Tejun Heo wrote:
> On Tue, May 17, 2016 at 11:42:57PM +0900, Sergey Senozhatsky wrote:
> > > > what if there is no place left for init_utsname() after
> > > > msg_print_ext_header() + msg_print_ext_body()?
> > > 
> > > It ends up being truncated, like either of the preceeding calls would.
> > 
> > well, I meant once it's truncated your matching doesn't work anymore.
> 
> Given that most of the messages are written minding typical console
> widths, whether for editing or outputting, I don't think that's a
> practical concern.  We're not talking about appending kilobytes worth
> of additional information here.

hm, I'd probably agree. any chance printk(KERN_CONT) can cause any problems?
for example,

mem_cgroup_print_oom_info():

	for_each_mem_cgroup_tree(iter, memcg) {
		pr_info("Memory cgroup stats for ");
		pr_cont_cgroup_path(iter->css.cgroup);
		pr_cont(":");

		for (i = 0; i < MEM_CGROUP_STAT_NSTATS; i++) {
			if (i == MEM_CGROUP_STAT_SWAP && !do_swap_account)
				continue;
			pr_cont(" %s:%luKB", mem_cgroup_stat_names[i],
				K(mem_cgroup_read_stat(iter, i)));
		}

		for (i = 0; i < NR_LRU_LISTS; i++)
			pr_cont(" %s:%luKB", mem_cgroup_lru_names[i],
				K(mem_cgroup_nr_lru_pages(iter, BIT(i))));

		pr_cont("\n");
	}


there are some other places that do KERN_CONT. e.g. ACPI does KERN_CONT
printk-s from acpi_error/acpi_warning/etc functions. but I've no idea if
there is anything long enough to cause the truncation.


	-ss

  reply	other threads:[~2016-05-17 14:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 20:58 [RFC][PATCH] printk: Add option to append kernel version to the dict Calvin Owens
2016-05-14 22:19 ` Richard Weinberger
2016-05-16 21:41   ` Calvin Owens
2016-05-15  6:36 ` Sergey Senozhatsky
2016-05-16 22:02   ` Calvin Owens
2016-05-17 14:42     ` Sergey Senozhatsky
2016-05-17 13:51       ` Tejun Heo
2016-05-17 15:43         ` Sergey Senozhatsky [this message]
2016-05-17 16:05           ` Tejun Heo
2016-05-17  9:24 ` Petr Mladek
2016-05-17 10:08   ` Tejun Heo

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=20160517154310.GC582@swordfish \
    --to=sergey.senozhatsky@gmail.com \
    --cc=David.Woodhouse@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bobby.prani@gmail.com \
    --cc=calvinowens@fb.com \
    --cc=colona@arista.com \
    --cc=dhowells@redhat.com \
    --cc=geliangtang@163.com \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pmladek@suse.com \
    --cc=tj@kernel.org \
    --cc=treding@nvidia.com \
    --cc=vvs@virtuozzo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).