linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Borislav Petkov <bp@alien8.de>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Jia Zhang <qianyue.zj@alibaba-inc.com>,
	"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: Re: [PATCH] x86/cpu: sort cpuinfo flags
Date: Fri, 21 Dec 2018 16:19:25 +0300	[thread overview]
Message-ID: <20181221131925.h6ca375bakwipmo3@kshutemo-mobl1> (raw)
In-Reply-To: <20181221130403.GD1325@zn.tnic>

On Fri, Dec 21, 2018 at 02:04:03PM +0100, Borislav Petkov wrote:
> On Fri, Dec 21, 2018 at 03:40:37PM +0300, Kirill A. Shutemov wrote:
> > But I don't see an improvement in readability of data presented to user as
> > a silly idea.
> 
> Improving readability is not a silly idea and I never said that. Rather,
> the cost of what you're trying to accomplish, needs to be weighed.
> 
> The final goal of this is, AFAIU, finding whether a feature flag is
> there or not and you can use grep for that now, on *any* kernel.
> 
> And if you need the feature flags sorted, you can do that too:
> 
> $ grep -m 1 flags /proc/cpuinfo | tr " " "\n" | sort | xargs
> 
> and there probably is even a simpler way to do that.
> 
> Or add a shell alias for that or a small script or ...

That's very valid point.

Dave's patch made me recall few cases were I wanted to check a presence
of a CPU flag with very limited userspace: shell in initrd with lean
busybox build (no grep around). Eyeballing the flag took frustratingly
long.

Yes, all this can be addressed in userspace one way or another.
But it doesn't take much for kernel to present the data in a more reasonable
way too...

-- 
 Kirill A. Shutemov

  reply	other threads:[~2018-12-21 13:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 19:50 [PATCH] x86/cpu: sort cpuinfo flags Dave Hansen
2018-12-20 12:02 ` Kirill A. Shutemov
2018-12-20 16:04   ` Borislav Petkov
2018-12-21 12:40     ` Kirill A. Shutemov
2018-12-21 13:04       ` Borislav Petkov
2018-12-21 13:19         ` Kirill A. Shutemov [this message]
2018-12-21 13:26           ` Borislav Petkov
2018-12-21 15:19         ` Dave Hansen
2018-12-21 16:12           ` Borislav Petkov
2018-12-20 12:07 ` Kirill A. Shutemov
2018-12-21  9:37 ` kbuild test robot
2018-12-22  7:17 ` kbuild test robot

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=20181221131925.h6ca375bakwipmo3@kshutemo-mobl1 \
    --to=kirill@shutemov.name \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=garsilva@embeddedor.com \
    --cc=hpa@zytor.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=qianyue.zj@alibaba-inc.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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).