Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5121522imd; Tue, 30 Oct 2018 12:17:34 -0700 (PDT) X-Google-Smtp-Source: AJdET5c5x0fkpEWTsiMThLJ9CcWwO75CQVH8l08GK2spyQcP3XXCpvSftgiyxCr/dZPFpb6L6psX X-Received: by 2002:a62:f94b:: with SMTP id g11-v6mr4205347pfm.244.1540927054384; Tue, 30 Oct 2018 12:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540927054; cv=none; d=google.com; s=arc-20160816; b=lOgPqaxKdhfyUeDPfK6tw7aPfi5V/z/qd5IpLp0Eq6rIjp0FcyCqmHNTXBozuabZ6l xFN+ixaMIkagCpkw3tf73+ZphHRx1mDPeJiXgZ4kwbfA0CBQ+CraygdY/iIukmKoBNMk nvca2tQw/i/Br7yr0GnuzY1cdmvX4dZNUCyqSuvQOgygW9C2Az9/DqAs8+OyfSI55CKt COaY3MO7UCbsJxWuy0wdjLO7zxgWUCLlEWzMmq/qZGsiRNirA1ksr0Zg7NknTbJZbX/H g7LA+3qvxtnp2umYWqsNW0O51CJ0M8shZQRKifbP4Zr6lsgfZ1F+slrJqUyu4yIGomhB miGw== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=SGsxzfad7O0SZNhgrnU2gEfIxUIX6pmdshuA4LVq4ns=; b=Zr4j75+e4Dw/r3rmZrzdaqreEm2f25RZCIxEJ/X+YICkBI4cLWtYGa5tQHywQbpjJM RV3cfcUYQHGvm2UglpKbcbl2VRL2Yuy0EKMmfxWXAH1qQ4ph3kys03dfakzWRWAdHi+1 v5yPszuvuIOviWZB81LNtD+PaHhko3t8VSGKZI8U+TK+51qj77X6oD+52fuhqI7hHxQq Aa7cWSZ8J2ayLV7Fo+rHgjMOHHmxiK1OYlKAR6BlxE8h6hfdZIgnb2ZYvtty+ZKbTIr6 20wG2krfDS+ySGyeJNacpDa9RHLCiASrOIsCESQsCSFL9zsuUo/SERrfPleJ5Dqlao/E NU7g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6-v6si24365050pgt.320.2018.10.30.12.17.16; Tue, 30 Oct 2018 12:17:34 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727453AbeJaDok (ORCPT + 99 others); Tue, 30 Oct 2018 23:44:40 -0400 Received: from mga17.intel.com ([192.55.52.151]:28923 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbeJaDok (ORCPT ); Tue, 30 Oct 2018 23:44:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2018 11:50:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,445,1534834800"; d="scan'208";a="87109522" Received: from spandruv-desk.jf.intel.com ([10.54.75.31]) by orsmga008.jf.intel.com with ESMTP; 30 Oct 2018 11:50:00 -0700 Message-ID: <327d2cd2561270d975e26a7f52d81ef85cbcc507.camel@linux.intel.com> Subject: Re: [PATCH v2 1/4] platform/x86: intel_pmc_core: Show Latency Tolerance info From: Srinivas Pandruvada To: Andy Shevchenko Cc: rajneesh.bhardwaj@linux.intel.com, Platform Driver , Darren Hart , Andy Shevchenko , Linux Kernel Mailing List , Rajneesh Bhardwaj Date: Tue, 30 Oct 2018 11:50:00 -0700 In-Reply-To: References: <20181006065113.669-1-rajneesh.bhardwaj@linux.intel.com> <0d940313e1be7ddaa06c5ebf4aea7a4df84540f2.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-10-30 at 20:33 +0200, Andy Shevchenko wrote: > On Tue, Oct 30, 2018 at 8:03 PM Srinivas Pandruvada > wrote: > > > > > Index printing is required here (for LTR Show and LTR Ignore) > > > > because it > > > > paves an obvious and easy way for the users of this driver to > > > > know > > > > the > > > > IP number to be used for LTR ignore. This was specifically > > > > requested by > > > > some customer and Srinivas asked me to implement this so adding > > > > him > > > > for > > > > his inputs. > > > > > > So, why it should be in kernel? When user prints this, they > > > usually > > > call `cat /.../file`, right? > > > Is it too hard to call `cat -n /.../file` instead? The benefit of > > > such > > > approach is that it's independent on the file we are printing. > > > > > > (Note, `grep -n /.../file` does the same`) > > > > > > For more variants > > > > > > > https://stackoverflow.com/questions/8206370/add-numbers-to-the-beginning-of-every-line-in-a-file > > > > > > > We get copy/paste data from some serial terminals from systems > > which > > don't have traditional linux shell or busy box. Not sure if they > > can do > > cat "-n" option or have this command at all. So line number helps. > > They > > can't even store output as as file as this is RO file system. > > Hmm... I'm not following this. If there is serial connection where at > least you may see things, how it's guaranteed that it will not print > more enough to rewrite the DTE's input buffer? No guarantee, This is just best effort. We get something like this from emails: Device S-state Status Sysfs node BR1A S4 *disabled pci: 0000:00:01.0 BR1B S4 *disabled BR2A S4 *disabled pci: 0000:00:02.0 Any line marker helps. But again this is not a hard requirement. There will always be argument, that this can be done in other ways. For sake of time discussing this: Rajneesh, Please get rid of index printing. > On the other hand if you copy the data to the other system which, I > bet, has `cat -n` available, not a problem either. > > So, the use case here, AFAICS, if you have a debug log enabled and > it's spitted out like SysRq where you can see, but not able to copy > and it's guaranteed not to overflow on the screen / output device. > > > But I am not as sticky on this. > > Since it's a debugfs and not any ABI implied, I'm fine with it to > have, but I would like to understand the real use case of it (and > this > definitely should be reflected in the commit message). >