[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181221131925.h6ca375bakwipmo3@kshutemo-mobl1>
Date: Fri, 21 Dec 2018 16:19:25 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Borislav Petkov <bp@...en8.de>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-kernel@...r.kernel.org, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Jia Zhang <qianyue.zj@...baba-inc.com>,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>
Subject: Re: [PATCH] x86/cpu: sort cpuinfo flags
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
Powered by blists - more mailing lists