Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4826854imj; Wed, 13 Feb 2019 01:36:55 -0800 (PST) X-Google-Smtp-Source: AHgI3IZkKFOBBsnKnnTccKd2YDsmyY/vm/NFtqKdRHshdU+SXXhcHGPoQGOXD6NRFE5foV9v6kbA X-Received: by 2002:a17:902:8304:: with SMTP id bd4mr8519187plb.329.1550050615311; Wed, 13 Feb 2019 01:36:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550050615; cv=none; d=google.com; s=arc-20160816; b=D5v/S4n7LXKoQ+nkb83rtALGQAdYclALkRVNtDGxamCxJWBOoBaOp7650iG+5Ji2TF WxTlYtqJTH4Db+liR5jpSnqaE1l2CLbON/rtZ2y/u/rh5oAh+N76FcHA4v4yvR4JXt0+ SCzL973gnP+70fuptlykL/3YdCyZ2rpKdlbCT8jelaUrsoNiFcUuEh16Y9oCPoZ1yCXH m1yY5QJlz6NRbspmLXK2H5X/nmpVyCXmuhcTc7R4EGluyoXBrP6RwmqWHr7zCRSc/TPz 0RNy5IesCQHJ0YDyBHg746RGgsW2AIT+hdr6dcfsnRmKMfB3+s3dZl+s4Y/ODsYWxnZZ g3Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sv9/LKEnpYwGLMUP3w3TvtBoynYhwg7Tk2v6eo4unZY=; b=M7j/uVi3yV4kCZzkj32+nolvUWtxcYswFnS4QZkwIGK8gVQc049cXdGWOf3Q4VFYa7 LXOycdhHiGNOOjZYlRC2Biil1DhvxD6rnft2jr0/3/MXz9CWzdbLfL9N+kG5ys89z3F7 qA8NXvbBFhxIVCZ9Nbnt7mssiHerWYSnHh7SAj/lQO3r3tg3SuhThID+zuwCJ1U6Nygj D/alqQbjCuxs0KFGDdb/RSPaYC1SNp10k4OsT08iC+oJtwcCxDmkxdiOg9FZjliMlOlW TLqcHr7AI+6gyaUq5xO9IcPVuIgBPnbVK9c4uOTCvSh2/pSPFagFJ/wy0V7cBBxxi8y4 w6Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X+ri0rsI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si14727915pgq.35.2019.02.13.01.36.36; Wed, 13 Feb 2019 01:36:55 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X+ri0rsI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732907AbfBMG3S (ORCPT + 99 others); Wed, 13 Feb 2019 01:29:18 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35483 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727172AbfBMG3S (ORCPT ); Wed, 13 Feb 2019 01:29:18 -0500 Received: by mail-pf1-f194.google.com with SMTP id z15so705875pfa.2 for ; Tue, 12 Feb 2019 22:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sv9/LKEnpYwGLMUP3w3TvtBoynYhwg7Tk2v6eo4unZY=; b=X+ri0rsITtoA/OYe22sGYeFft2TPL/q4wEy18AtjSAndTi9CIfufrr1A8Y/Jtm07GQ gbaCEAauDg9xk0aLa+XceMUfN0S9dg6DK9s1t3f1xevT3hjLnRUkcqZ8LNJceSa9wzAd Sq4k0Dr07STZ2WdGPcPUHX4LKu5q851F0HvwTuPWG5079Yg4B9TYRrNSjJlJ4+KGRFpZ qDvaNIA5WbpGxM+VuEUaaVhLHk5hG0qfANFypLiYua4YL1P67UilGHZ99Fc/fWfvPUtW /ufX+BwqI4/aH4vYTftaHqRgEHbMKjf1AsE+uDGivUo49DBA+db9c3odpDQlo7ONw7q0 gP6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sv9/LKEnpYwGLMUP3w3TvtBoynYhwg7Tk2v6eo4unZY=; b=f2/pqEsB7bzJLqg0iHE2xnGCLLqNSBw66GfjhugSuyLN9W6RBoavVDeOEGEm0VlH9U kKqA79ASMrz4OtEHy5t4231Mo/Zv8k76CAtDWjpHQbzuO9sO+qcuOv9e3VTFF9iaq4yr nkMg6nM4+i80VgqgdUeECKhGTzqEux9tMI6o9di83J6yp1j+hoCII/xOpavePv70mJZn AANLMrHRmVE+9mAD542oJhivZlS9Yd0/ZZdZV/d8BRbLLsMs1WtyMGpQFr7s1g8I19sF 0519xubUo5Nb5MpHMyxBZDvUHf3HBjvtIoW/isfULBK8B8+2Yv5wtlSvmdCsDyCf3gG0 VRVQ== X-Gm-Message-State: AHQUAubHR+POBYdqzBqrrWaulUMhBoC/HasIolCMFV7wNeyjtzgDJLZD z5JLD8rJsroCknUpF3WaESw= X-Received: by 2002:a62:3811:: with SMTP id f17mr8193207pfa.206.1550039357653; Tue, 12 Feb 2019 22:29:17 -0800 (PST) Received: from localhost ([39.7.15.189]) by smtp.gmail.com with ESMTPSA id d21sm17562572pgv.37.2019.02.12.22.29.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Feb 2019 22:29:16 -0800 (PST) Date: Wed, 13 Feb 2019 15:29:12 +0900 From: Sergey Senozhatsky To: xiang xiao Cc: Steven Rostedt , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Xiang Xiao Subject: Re: [PATCH] printk: add KERN_NOTIME to skip the timestamp Message-ID: <20190213062912.GA23233@jagdpanzerIV> References: <1549995065-27597-1-git-send-email-xiaoxiang@xiaomi.com> <20190212144606.4b7cf0f8@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/13/19 14:19), xiang xiao wrote: > Here is my case: > 1.A small MCU(Cortex M4) in SoC run RTOS > 2.RTOS append timestamp to log for the accurate timing > 3.RTOS send log to Linux kernel when buffer exceed the threshold > 4.Kernel call printk to dump the received buffer > So I want that printk skip the timestamp here. > > > If anything, I would probably prefer that we export whether > > time is being printed, and have the caller not print time if printk is > > doing it already, than to add the complexity into printk itself. > > Actually, the timestamp of our initial implementation like your > suggestion come from printk, cat /sys/module/printk/parameters/time ? Y - we add time prefix N - we don't add time prefix -ss