Messages in this thread | | | Date | Wed, 18 Jun 2014 16:28:48 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [PATCH 1/2] proc/stat: convert to single_open_size() |
| |
On Mon, 16 Jun 2014, Heiko Carstens wrote:
> Use seq_file's single_open_size() to preallocate a buffer that is large > enough to hold the whole output, instead of open coding it. > Also calculate the requested size using the number of online cpus instead > of possible cpus, since the size of the output only depends on the number > of online cpus. > > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: David Rientjes <rientjes@google.com>
I have no idea why the check for size > KMALLOC_MAX_SIZE was there, all slab allocators will fallback to the page allocator and the slowpath will return NULL.
| |