From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755600AbcEQOpn (ORCPT ); Tue, 17 May 2016 10:45:43 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:34224 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbcEQOpl (ORCPT ); Tue, 17 May 2016 10:45:41 -0400 Date: Wed, 18 May 2016 00:43:10 +0900 From: Sergey Senozhatsky To: Tejun Heo Cc: Sergey Senozhatsky , Calvin Owens , "Paul E. McKenney" , Andrew Morton , David Howells , Pranith Kumar , David Woodhouse , Johannes Weiner , Ard Biesheuvel , Petr Mladek , Vasily Averin , Thierry Reding , Geliang Tang , Ivan Delalande , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC][PATCH] printk: Add option to append kernel version to the dict Message-ID: <20160517154310.GC582@swordfish> References: <51047c0f6e86abcb9ee13f60653b6946f8fcfc99.1463172791.git.calvinowens@fb.com> <20160515063643.GA817@swordfish> <20160516220252.GA2281534@devbig337.prn1.facebook.com> <20160517144257.GA582@swordfish> <20160517135128.GA4775@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160517135128.GA4775@htj.duckdns.org> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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