Re: [RFC PATCH 1/5] proc: intoduce proc_inode->pid_entry and is_tgid_pid_entry()

2014-08-10 Thread Cyrill Gorcunov
On Sat, Aug 09, 2014 at 04:28:50PM +0200, Oleg Nesterov wrote: > > > > Hi Oleg, sorry for not responding to previous emails, will try to review > > this > > things tomorrow (from a glance looks quite good!). Btw, this moment strike > > my > > eyes -- why don't we use kmem_cache_zalloc here but do

Re: [RFC PATCH 1/5] proc: intoduce proc_inode->pid_entry and is_tgid_pid_entry()

2014-08-09 Thread Oleg Nesterov
On 08/09, Cyrill Gorcunov wrote: > > On Fri, Aug 08, 2014 at 08:57:47PM +0200, Oleg Nesterov wrote: > ... > > +++ b/fs/proc/inode.c > > @@ -73,6 +73,7 @@ static struct inode *proc_alloc_inode(struct super_block > > *sb) > > ei->pde = NULL; > > ei->sysctl = NULL; > > ei->sysctl_entry =

Re: [RFC PATCH 1/5] proc: intoduce proc_inode->pid_entry and is_tgid_pid_entry()

2014-08-08 Thread Cyrill Gorcunov
On Fri, Aug 08, 2014 at 08:57:47PM +0200, Oleg Nesterov wrote: ... > +++ b/fs/proc/inode.c > @@ -73,6 +73,7 @@ static struct inode *proc_alloc_inode(struct super_block > *sb) > ei->pde = NULL; > ei->sysctl = NULL; > ei->sysctl_entry = NULL; > + ei->pid_entry = NULL; > e

[RFC PATCH 1/5] proc: intoduce proc_inode->pid_entry and is_tgid_pid_entry()

2014-08-08 Thread Oleg Nesterov
Add the new "struct pid_entry *" member into struct proc_inode, and the new helper, is_tgid_pid_entry(), it can be used by *base_stuff to figure out whether we need tgid or tid info. Note: this obviously blows struct proc_inode, but I think it is simple to put ->fd, ->sysctl/sysctl_entry, and the