Re: [patch 1/6] procfs: Introduce sequential fdinfo engine

2013-10-31 Thread Cyrill Gorcunov
On Thu, Oct 31, 2013 at 02:57:52PM +0400, Cyrill Gorcunov wrote: > > > At moment the fdinfo operations (ie the output from /proc/$pid/fdinfo/$fd) > > > are generating output in one pass, which makes useless memory pressue > > > if the reader/user provides a buffer with a small size. > > > > cat(1)

Re: [patch 1/6] procfs: Introduce sequential fdinfo engine

2013-10-31 Thread Cyrill Gorcunov
On Thu, Oct 31, 2013 at 01:32:13PM +0300, Alexey Dobriyan wrote: > On Wed, Oct 30, 2013 at 10:59 PM, Cyrill Gorcunov wrote: > > At moment the fdinfo operations (ie the output from /proc/$pid/fdinfo/$fd) > > are generating output in one pass, which makes useless memory pressue > > if the reader/use

Re: [patch 1/6] procfs: Introduce sequential fdinfo engine

2013-10-31 Thread Alexey Dobriyan
On Wed, Oct 30, 2013 at 10:59 PM, Cyrill Gorcunov wrote: > At moment the fdinfo operations (ie the output from /proc/$pid/fdinfo/$fd) > are generating output in one pass, which makes useless memory pressue > if the reader/user provides a buffer with a small size. cat(1) uses 64 KB buffer. The out

[patch 1/6] procfs: Introduce sequential fdinfo engine

2013-10-30 Thread Cyrill Gorcunov
At moment the fdinfo operations (ie the output from /proc/$pid/fdinfo/$fd) are generating output in one pass, which makes useless memory pressue if the reader/user provides a buffer with a small size. Instead, provide proc_fdinfo structure where each file hook own seq_operations for fdinfo output