Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7453427imu; Mon, 3 Dec 2018 13:11:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/UErzTluMLSCP7b1eLXsNfRNRndfg31vLus2I6qd64lBPQzLXA7QVpomCrLxRjbFjRscmwh X-Received: by 2002:a65:58ca:: with SMTP id e10mr13217050pgu.99.1543871511803; Mon, 03 Dec 2018 13:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543871511; cv=none; d=google.com; s=arc-20160816; b=obV1lxtF21YebF27k0SIb9Ksu75wuedZbA5ZAh/7DoWvCx6YkFxnaJtEkHDSqeqhuI 2Xu3+mL9fPFa08TUxgxIhaig5/JeuA5cuQECK9xIiQpw5IE+T3njbmiQlq+6u6BU/QzW /C2WVWoT1kzCzl7ipzi5cX9mBcBq39ny2XyNOx9gHXo/WXw/hdZC32iJEK4OJp9aIHew fLQY6V82Xjkp7UKNry2Pte3sRa3Wm+YQs4dJ4NlKTmR++Rr+ZHtElmPR0FlfQxwpwSnj Wk+o+kea3awPf/CUaAtsVLp6xcX2rbXajHEG5yErIqLIRskOhESrx7+Zz/kwMS2WxX9S jxMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=wb9tJlDtF/6z9xg7Xsp/0Auye3JuYNH8DRle6l3c528=; b=WjYe+KNp0WgH0voC6BOVVbMT3Yt7zPNXzhe0yQXORlBn1QJl21xRvkRVZxRiGj8xA9 pQXCnfFLnaf2j2cwvvFVE3T/qaHCzzKQwyVysxnClxtxSHjNH+mi7Vp/92yGkH0Z5hks FMEtm9NTW0eHtd7i2yw4XdScVKlFVa+P8tXeemqfibjzwlRYwQ2XKJVRZ2L3VjpYiHFe o5I9JA7IkLSPe9doT8ImmKeAlU6Z7H4LExOXTz+p8j6Bb1PZxQQs8TdpyHAExFQ5jtjb PPIxghoX3IpmHsN2dz0PsI6Xg5flR5M99M88KRfxe3opeF2JcwwpL+lfBSigASXt2kXf aQ1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si12532076pgy.35.2018.12.03.13.11.35; Mon, 03 Dec 2018 13:11:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726008AbeLCVKv (ORCPT + 99 others); Mon, 3 Dec 2018 16:10:51 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:26364 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725952AbeLCVKu (ORCPT ); Mon, 3 Dec 2018 16:10:50 -0500 Received: from fsav304.sakura.ne.jp (fsav304.sakura.ne.jp [153.120.85.135]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id wB3LAmr2011442; Tue, 4 Dec 2018 06:10:48 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav304.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav304.sakura.ne.jp); Tue, 04 Dec 2018 06:10:48 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav304.sakura.ne.jp) Received: from [192.168.1.8] (softbank126126163036.bbtec.net [126.126.163.36]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id wB3LAgv0011428 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NO); Tue, 4 Dec 2018 06:10:48 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] printk: Add caller information to printk() output. To: Petr Mladek Cc: Dmitry Vyukov , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Andrew Morton , LKML References: <1543045075-3008-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <20181130154024.ls3mntfdr4zvluub@pathway.suse.cz> <20181203150603.cdqii263e4kmmibo@pathway.suse.cz> From: Tetsuo Handa Message-ID: Date: Tue, 4 Dec 2018 06:10:40 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: <20181203150603.cdqii263e4kmmibo@pathway.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/12/04 0:06, Petr Mladek wrote: >> If we modify print_time(), I think that the leading spaces inserted by "%5lu" >> makes little sense, for "%5lu" is too small for systems with uptime >= 1.16 days >> and parsers after all cannot assume fixed length for the timestamp field. Then, >> we could change from "%5lu.%06lu" to "%lu.%06lu" so that parsers (like /bin/awk) >> can get prefix part using white spaces as a delimiter. > > My primary concern was a human readability. The different header columns > are separated by brackets and the message itself is separated by the space. PID_MAX_LIMIT is 4194304, which can take up to 10 bytes if [T%u] is used. But unless a race occurs, each series of printk() lines are printed with same width. My concern is how to minimize number of characters written to consoles, for writing to consoles are slow, and userspace usually uses /dev/kmsg rather than netconsole as a source. For normal users who do not need to directly parse console/netconsole output, saving spaces in the header fields will be OK. > /dev/kmsg uses key=value notation. It does not need any version. The > version filed was intended for crashdump. It would make the life > easier for its maintainers. If the version field is for crashdump rather than for netconsole, we can get it from some vmcoreinfo variable rather than appending to every record.