From: Ingo Molnar <mingo@kernel.org>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: acme@redhat.com, mingo@redhat.com, linux-kernel@vger.kernel.org,
jolsa@redhat.com, namhyung@gmail.com, lgoncalv@redhat.com,
ak@linux.intel.com
Subject: Re: [PATCH] perf stat: Add hint for SMI cost measurement
Date: Thu, 25 Apr 2019 19:47:15 +0200 [thread overview]
Message-ID: <20190425174715.GA61828@gmail.com> (raw)
In-Reply-To: <9beeb53a-39ef-7e60-34b7-e2cfbe355a0e@linux.intel.com>
* Liang, Kan <kan.liang@linux.intel.com> wrote:
>
>
> On 4/25/2019 2:39 AM, Ingo Molnar wrote:
> >
> > * kan.liang@linux.intel.com <kan.liang@linux.intel.com> wrote:
> >
> > > +static void smi_env_check(void)
> > > +{
> > > + char *name;
> > > + size_t len;
> > > +
> > > + if (sysfs__read_str(CPUIDLE_CUR_DRV, &name, &len)) {
> > > + pr_warning("Failed to check cstate status.\n");
> >
> > What a meaningless message. What did we want to do, what happened, and
> > why did it fail?
> >
> > > + return;
> > > + }
> > > +
> > > + if (strncmp(name, "none", 4)) {
> > > + pr_warning("Cstate may cause drift between aperf and cycles. "
> > > + "Please completely disable cstate, "
> > > + "E.g. set idle=poll in grub\n");
> >
> > Please keep user-visible strings in the same form that the user sees
> > them, i.e. in a single line.
>
> To avoid the line over 80 characters, the quoted string was split across
> lines in the code. But the string is shown as a single line when it is
> output for user.
>
> Are you suggesting to ignore the 80 characters rule when printing
> user-visible strings?
> Could you please confirm?
What I'd suggest is split it up into multiple messages, or shorten the
message. Small violations of col80 for user visible strings is fine (up
to 100-120 columns I guess), but if the string is longer it's a clear
sign that the syslog message it too long to begin ...
Thanks,
Ingo
next prev parent reply other threads:[~2019-04-25 17:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 15:46 [PATCH] perf stat: Add hint for SMI cost measurement kan.liang
2019-04-25 6:39 ` Ingo Molnar
2019-04-25 13:14 ` Liang, Kan
2019-04-25 17:47 ` Ingo Molnar [this message]
2019-04-25 19:05 ` Liang, Kan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190425174715.GA61828@gmail.com \
--to=mingo@kernel.org \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=lgoncalv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox