Re: [PATCH 0/2] fs, proc: optimize smaps output formatting
From: Joe Perches
Date: Fri Aug 19 2016 - 16:19:14 EST
On Fri, 2016-08-19 at 10:43 -0700, Joe Perches wrote:
> And this would definitely be faster if seq_has_overflowed() was
> used somewhere in the iteration loop.
Adding a seq_has_overflowed() test seems unnecessary as the
fs/seq_file.c traverse() static function already does a
seq_has_overflowed().
And I get:
$ t_mm (your allocate all vma program modified to show count)
count: 65514 pid:2051
$ wc -c /proc/2051/smaps
39515615 /proc/2051/smaps
smap vma output is a little more than 600 bytes per vma.
I'll look around to see how best go use single_open_size
assuming 768 bytes/vma rounded up to the next PAGE_SIZE.