From: Len Brown <lenb@kernel.org>
To: Thomas Renninger <trenn@suse.de>
Cc: linux-perf-users@vger.kernel.org, mingo@elte.hu,
arjan@linux.intel.com, j-pihet@ti.com,
linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org,
Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 4/9] cpuidle: Introduce .abbr (abbrevation) for cpuidle states
Date: Wed, 12 Jan 2011 17:25:12 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.02.1101121705130.19754@x980> (raw)
In-Reply-To: <201101121437.51122.trenn@suse.de>
> > If the display tools can only handle 3 characters,
> > then why not have them simply use the 1st 3 characters
> > of the existing name field?
> You mean use:
> C3 NHM
> instead of
> NHM-C3
> for intel_idle?
Yes.
is there a reason that would be a problem?
If only 3 characters are useful,
then I'd rather see you simly do this:
#define CPUIDLE_NAME_LEN 3
> Then userspace has to parse the two informations glued
> together, get rid of the whitespace, etc.
what "two informations"?
why is kernel bloat the instrument of choice
to avoid the expense of string truncation
in user-space tools?
> But by sysfs convention a separate file must be used
> if two data are passed to userspace which is the case here.
what two data?
It is fine for a string to include space characters.
> > If that is not unique,
> > then re-arrange the strings so that it is unique...
> See above, it would unnecessarily make life hard for
> userspace.
> Afaik sysfs entries do not consume resources as long as
> they do not get accessed.
they clutter the source code,
they create an additional name for something
that arguably already has 3 names --
the state #, the name, and the description.
I'd rather delete a few of the fields than add a 4th...
> >Of course the ACPI part of this patch will not apply,
> > as it depends on patch 1 in this series, which was erroneous.
> > For ACPI, the existing name field is already fine,
> > as C%d fits into 3 characters.
> For acpi_idle only it would work, but this is (nearly) the only
> one.
> For example for sh arch:
> name: SuperH
> "SH SuperH" contains two data and should get split up into:
> name: SuperH
> abbr: SH
acpi/arch/sh/kernel/cpu/shmobile/cpuidle.c
already uses state->name = "C0", "C1", "C2".
Just use them and be done.
> By convention the first characters of "description" could be
> used, but you would again end up in userspace parsing and
> double info in one sysfs file.
>
> I hope that's enough for convincing, I'd really like to go
> the .abbr way. Do you give me an acked-by for that one?
No.
We should not invent an additional abbreviation field.
The tools should use the existing name field.
If the existing name field is not sufficient, then
the states should simply be enumerated and numbers
be shown in the GUI.
thanks,
Len Brown, Intel Open Source Technology Center
next prev parent reply other threads:[~2011-01-12 22:25 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 10:29 [PATCH 0/9] Make cpu_idle events architecture independent Thomas Renninger
2011-01-07 10:29 ` [PATCH 1/9] acpi: Use ACPI C-state type instead of enumeration value to export cpuidle state name Thomas Renninger
2011-01-07 20:45 ` Len Brown
2011-01-09 12:30 ` Thomas Renninger
2011-01-12 6:36 ` Len Brown
2011-01-12 12:33 ` Thomas Renninger
2011-01-12 22:41 ` Len Brown
2011-01-07 10:29 ` [PATCH 2/9] cpuidle: Rename X86 specific idle poll state[0] from C0 to POLL Thomas Renninger
2011-01-12 6:37 ` Len Brown
2011-01-07 10:29 ` [PATCH 3/9] X86/perf: fix power:cpu_idle double end events and throw cpu_idle events from the cpuidle layer Thomas Renninger
2011-01-12 6:42 ` Len Brown
2011-01-12 15:16 ` Thomas Renninger
2011-01-12 23:12 ` Len Brown
2011-01-07 10:29 ` [PATCH 4/9] cpuidle: Introduce .abbr (abbrevation) for cpuidle states Thomas Renninger
2011-01-07 21:23 ` Kevin Hilman
2011-01-12 6:56 ` Len Brown
2011-01-12 13:37 ` Thomas Renninger
2011-01-12 22:25 ` Len Brown [this message]
2011-01-12 23:39 ` Thomas Renninger
2011-01-13 15:42 ` Valdis.Kletnieks
2011-01-07 10:29 ` [PATCH 5/9] acpi: processor->cpuidle: Only set cpuidle check_bm flag if pr->flags.bm_check is set Thomas Renninger
2011-01-12 7:17 ` Len Brown
2011-01-12 7:30 ` [PATCH] ACPI: processor_idle: delete use of NOP CPUIDLE_FLAGs Len Brown
2011-01-12 7:37 ` [PATCH] cpuidle: delete NOP CPUIDLE_FLAG_POLL Len Brown
2011-01-12 8:00 ` [PATCH] SH, cpuidle: delete use of NOP CPUIDLE_FLAGS_SHALLOW Len Brown
2011-01-12 8:01 ` [PATCH] cpuidle: delete unused CPUIDLE_FLAG_SHALLOW, BALANCED, DEEP definitions Len Brown
2011-01-12 8:02 ` [PATCH] cpuidle: CPUIDLE_FLAG_TLB_FLUSHED is specific to intel_idle Len Brown
2011-01-12 8:04 ` [PATCH] cpuidle: CPUIDLE_FLAG_CHECK_BM is omap3_idle specific Len Brown
2011-01-07 10:29 ` [PATCH 6/9] perf (userspace): Fix variable clash with glibc time() func Thomas Renninger
2011-01-07 10:29 ` [PATCH 7/9] perf (userspace): Introduce --verbose param for perf timechart Thomas Renninger
2011-01-07 10:29 ` [PATCH 8/9] perf timechart: Map power:cpu_idle events to the corresponding cpuidle state Thomas Renninger
2011-01-07 10:52 ` Thomas Renninger
2011-01-07 10:29 ` [PATCH 9/9] perf: timechart: Fix memleak Thomas Renninger
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=alpine.LFD.2.02.1101121705130.19754@x980 \
--to=lenb@kernel.org \
--cc=arjan@linux.intel.com \
--cc=fweisbec@gmail.com \
--cc=j-pihet@ti.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mingo@elte.hu \
--cc=trenn@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).