lkml.org 
[lkml]   [2019]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm/slab: Increase width of first /proc/slabinfo column
From
Date
Hi,

On 01/02/2019 4.34, Christopher Lameter wrote:
> On Fri, 1 Feb 2019, Tobin C. Harding wrote:
>
>> Currently when displaying /proc/slabinfo if any cache names are too long
>> then the output columns are not aligned. We could do something fancy to
>> get the maximum length of any cache name in the system or we could just
>> increase the hardcoded width. Currently it is 17 characters. Monitors
>> are wide these days so lets just increase it to 30 characters.
>
> Hmm.. I wonder if there are any tools that depend on the field width here?
>

It's possible, but it's more likely that userspace parses by whitespace
because it's easier to write it that way.

At least procps, which is used by slabtop, is prepared to parse a cache
name of 128 characters. See the scanf() call in parse_slabinfo20()
function in proc/slab.c of procps:

http://procps.sourceforge.net/

Of course, testing with slabtop would make sense.

- Pekka

\
 
 \ /
  Last update: 2019-02-02 07:48    [W:0.118 / U:14.276 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site