Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp93358imj; Wed, 13 Feb 2019 05:17:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IZiZFsTTi3y72KRowCqDXiJo05KQUjT7rWIZ8UxeqEHMVb1Ogc4ZitvxyJxOPlhprjf0qG/ X-Received: by 2002:a17:902:bf08:: with SMTP id bi8mr517481plb.210.1550063864890; Wed, 13 Feb 2019 05:17:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550063864; cv=none; d=google.com; s=arc-20160816; b=DuVkE26QTW8wcPbD5lNA1LjC0FEnSclIFI03IOE2Vlbkzr/9cXUItyVfWqSdg87vCU xkB/XFQfZ092QFG8BmskPWp8yviHTvcvqtAK196Kmq9ksK7MautjhYNabzl0ShXhjWm2 eYIc8iX7yGaEdJiPAnuMKEOhKC+63N9xLva4xNQ0rxRNok7bNo9JtL4i/mBC5jO1OX9o Zom411y2KYnEA92DXXHqCyevXvaUpG3z52PTz1atyv1dcvRUrmPkC6Xl9vPEYuSUSO68 jLxtjQd/ELa8N7lNjjZA/BC0c4K6mkR7AsA0OurPAbyMYBvla/50ocGKpOK98i95f2bB s5Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vvNtqUgRn+5xblfASqqm7+ICkQoCoEzCjFID4kRMhuE=; b=PqCoZXeitGzci/udNmUXgcThyYGni/c3Yr8QphqLnppuhKxPvrnSePQAO5VcysN6xe Iy1xFM9uqup0ucwHqw0ALjUx9Koz7BoasfSGWQK0UQ7o4xoOWsk6mir48tg9RZtXwiXS MLQ4aW7Diy9kZFC0x9pOXVephOTj9Vwd6dljSGJmfmU87Casaf5E4lL1/6Rc+tv1Xe/Q 6+CYCEnvcQ4buEF/oyh4NobafjU6TGOunaEC4C9A1jEtY0net8iWLSejOgT9LOg1co22 FNELgg/HTFaFdu80h4DgovahrUJ4d+I5g3EvbRGGePhuCVP58SxY4FRNUZocK9NVsOEE SF0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RGkwSLay; 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 i6si3365034pgm.590.2019.02.13.05.17.26; Wed, 13 Feb 2019 05:17:44 -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=RGkwSLay; 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 S2390856AbfBMIxL (ORCPT + 99 others); Wed, 13 Feb 2019 03:53:11 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42805 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389921AbfBMIxK (ORCPT ); Wed, 13 Feb 2019 03:53:10 -0500 Received: by mail-qt1-f196.google.com with SMTP id b8so1660156qtr.9 for ; Wed, 13 Feb 2019 00:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vvNtqUgRn+5xblfASqqm7+ICkQoCoEzCjFID4kRMhuE=; b=RGkwSLayIeUVbURr0AxmrHuMENhgK05GZE0P40NPeNnnrZvSY4iSUAynHBHQoYj1J6 7D5k5X9q85O2nW4wXA7WkiZDArpYopMfjWonzT/BUo+VhIoqjbWcv8kCG9cVjX1pnjWg bp881/72/e4ETB33ehQpuqFg56uRFbbyia4nVSXnyhRTIpU9WBCnHutr5RgXhqwursLu wPheNmZY5sgjHZTFGL29oiUptRciiHjxAv7XOMiJVrrNAsVMo9+NJ23NNtnq138LtRTg 5mX81YRAFuGnTp4/kQpP7DXCsJZT8JoJrpFOVk0JN2yWy62q5YVUslkxJs4KfoBAaPfO NxHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vvNtqUgRn+5xblfASqqm7+ICkQoCoEzCjFID4kRMhuE=; b=nY2AG3tvG5JgS84nTy6+twbfxvr2BRHuwnSmBDrIRRqxGJnAsEwIsPFo+zcQhpLJGY sjNxgMh0qpT15T+g3PZTBK34/dfUICpukhGlMFwEa/2VZC7lY8RS0Opcm66NKF3OauaP CK9vq3hV+mO8LIeTdCYljNfy/q2GEutUJdMm0YXrzAUpDOTkk/Ao3+HURyiCEgjh2t/N /yeTXIekP8Fcpy26h9o7jcPb0egOlbusrPBeFMGD5vYLLlbJn1E1Qkk7eOpvORgEKQRD lYv7uhvyfel8u5B293HNs3TLEPZ+Y+6sRsMgFed5luKJdoa7F3uakB4RbLgY9Eg09QAf K9eA== X-Gm-Message-State: AHQUAuZs/mpu8d9qPF9z9f3LO0rQtZV3/5dXF6wE8VayNtirOcYrbvfp dOhPJqbIt7Ou+jhh3XoyO6O72fkQ2ho0sDxOQrk= X-Received: by 2002:aed:3ba9:: with SMTP id r38mr6137680qte.330.1550047989280; Wed, 13 Feb 2019 00:53:09 -0800 (PST) MIME-Version: 1.0 References: <1549995065-27597-1-git-send-email-xiaoxiang@xiaomi.com> <20190212144606.4b7cf0f8@gandalf.local.home> <20190213062912.GA23233@jagdpanzerIV> <20190213063815.GA32272@jagdpanzerIV> <20190213080852.GA1702@jagdpanzerIV> In-Reply-To: <20190213080852.GA1702@jagdpanzerIV> From: xiang xiao Date: Wed, 13 Feb 2019 16:52:49 +0800 Message-ID: Subject: Re: [PATCH] printk: add KERN_NOTIME to skip the timestamp To: Sergey Senozhatsky Cc: Steven Rostedt , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Xiang Xiao Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 13, 2019 at 4:08 PM Sergey Senozhatsky wrote: > > On (02/13/19 15:14), xiang xiao wrote: > > > > But how can I precisely control timestamp on/off per message > > through sysfs node? > > > > Hmm. I don't know how many kernel printk-s you have and how often > do you write to kmsg. It depend on use case, but I plan to create a generic driver which could reuse by all rpmsg based remoteproc. This is the driver for upstream: https://github.com/thesofproject/linux/pull/177/commits/a0b7009fede5552dc98733f2996a8140bff62455 so we need more precisely control here. > I was thinking about something like this: > > echo 0 > /...printk.../time > dump buffer to /dev/kmsg > echo 1 > /...printk../time > Another problem is how to control sysfs node from driver code naturally, the concurrency and global side effect also need to address. > - If you would have several kernel printk-s in the meantime, then > those would not have timestamps, but you kinda can roughly guess > it > > write [1243] foo > /dev/kmsg > write [1244] foo > /dev/kmsg > << printk(bar) > write [1245] foo > /dev/kmsg > > Maybe this won't suffice. > > -ss