Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Michal Hocko
On Mon 22-08-16 01:30:14, Joe Perches wrote: > On Mon, 2016-08-22 at 01:00 -0700, Joe Perches wrote: > > On Mon, 2016-08-22 at 09:24 +0200, Michal Hocko wrote: > > > On Sat 20-08-16 01:00:17, Joe Perches wrote: > [] > > > > static int proc_maps_open(struct inode *inode, struct file *file, > > > >  

Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Michal Hocko
On Mon 22-08-16 01:30:14, Joe Perches wrote: > On Mon, 2016-08-22 at 01:00 -0700, Joe Perches wrote: > > On Mon, 2016-08-22 at 09:24 +0200, Michal Hocko wrote: > > > On Sat 20-08-16 01:00:17, Joe Perches wrote: > [] > > > > static int proc_maps_open(struct inode *inode, struct file *file, > > > >  

Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Joe Perches
On Mon, 2016-08-22 at 01:00 -0700, Joe Perches wrote: > On Mon, 2016-08-22 at 09:24 +0200, Michal Hocko wrote: > > On Sat 20-08-16 01:00:17, Joe Perches wrote: [] > > > static int proc_maps_open(struct inode *inode, struct file *file, > > >   const struct seq_operations *ops, int

Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Joe Perches
On Mon, 2016-08-22 at 01:00 -0700, Joe Perches wrote: > On Mon, 2016-08-22 at 09:24 +0200, Michal Hocko wrote: > > On Sat 20-08-16 01:00:17, Joe Perches wrote: [] > > > static int proc_maps_open(struct inode *inode, struct file *file, > > >   const struct seq_operations *ops, int

Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Joe Perches
On Mon, 2016-08-22 at 09:24 +0200, Michal Hocko wrote: > On Sat 20-08-16 01:00:17, Joe Perches wrote: > [...] > > > >  static int proc_maps_open(struct inode *inode, struct file *file, > >   const struct seq_operations *ops, int psize) > >  { > > - struct proc_maps_private

Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Joe Perches
On Mon, 2016-08-22 at 09:24 +0200, Michal Hocko wrote: > On Sat 20-08-16 01:00:17, Joe Perches wrote: > [...] > > > >  static int proc_maps_open(struct inode *inode, struct file *file, > >   const struct seq_operations *ops, int psize) > >  { > > - struct proc_maps_private

Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Michal Hocko
On Sat 20-08-16 01:00:17, Joe Perches wrote: [...] > static int proc_maps_open(struct inode *inode, struct file *file, > const struct seq_operations *ops, int psize) > { > - struct proc_maps_private *priv = __seq_open_private(file, ops, psize); > + struct

Re: [PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-22 Thread Michal Hocko
On Sat 20-08-16 01:00:17, Joe Perches wrote: [...] > static int proc_maps_open(struct inode *inode, struct file *file, > const struct seq_operations *ops, int psize) > { > - struct proc_maps_private *priv = __seq_open_private(file, ops, psize); > + struct

[PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-20 Thread Joe Perches
Use the new __seq_open_private_buffer to estimate the final output /proc//smaps filesize to reduce the number of reallocations of overflowed buffers. Use a simpler single-line function to emit various values in kB. Signed-off-by: Joe Perches --- fs/proc/task_mmu.c | 94

[PATCH 2/2] proc: task_mmu: Reduce output processing cpu time

2016-08-20 Thread Joe Perches
Use the new __seq_open_private_buffer to estimate the final output /proc//smaps filesize to reduce the number of reallocations of overflowed buffers. Use a simpler single-line function to emit various values in kB. Signed-off-by: Joe Perches --- fs/proc/task_mmu.c | 94