Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-15 Thread Stephen Brennan
Casey Schaufler writes: > On 12/15/2020 2:04 PM, Eric W. Biederman wrote: >> Casey Schaufler writes: >> >>> On 12/13/2020 3:00 PM, Paul Moore wrote: On Sun, Dec 13, 2020 at 11:30 AM Matthew Wilcox wrote: > On Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: >>

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-15 Thread Casey Schaufler
On 12/15/2020 2:04 PM, Eric W. Biederman wrote: > Casey Schaufler writes: > >> On 12/13/2020 3:00 PM, Paul Moore wrote: >>> On Sun, Dec 13, 2020 at 11:30 AM Matthew Wilcox wrote: On Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: > Matthew Wilcox writes: > >> On

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-15 Thread Eric W. Biederman
Casey Schaufler writes: > On 12/13/2020 3:00 PM, Paul Moore wrote: >> On Sun, Dec 13, 2020 at 11:30 AM Matthew Wilcox wrote: >>> On Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: Matthew Wilcox writes: > On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wr

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-15 Thread Eric W. Biederman
Stephen Brennan writes: > ebied...@xmission.com (Eric W. Biederman) writes: > >> Stephen Brennan writes: >> >>> The pid_revalidate() function requires dropping from RCU into REF lookup >>> mode. When many threads are resolving paths within /proc in parallel, >>> this can result in heavy spinlock

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-15 Thread Casey Schaufler
On 12/13/2020 3:00 PM, Paul Moore wrote: > On Sun, Dec 13, 2020 at 11:30 AM Matthew Wilcox wrote: >> On Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: >>> Matthew Wilcox writes: >>> On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: > -void pid_update_inode

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-14 Thread Casey Schaufler
On 12/13/2020 8:29 AM, Matthew Wilcox wrote: > On Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: >> Matthew Wilcox writes: >> >>> On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: -void pid_update_inode(struct task_struct *task, struct inode *inode) +stati

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-14 Thread Stephen Brennan
ebied...@xmission.com (Eric W. Biederman) writes: > Matthew Wilcox writes: > >> On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: >>> -void pid_update_inode(struct task_struct *task, struct inode *inode) >>> +static int do_pid_update_inode(struct task_struct *task, struct inode >>

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-14 Thread Stephen Brennan
ebied...@xmission.com (Eric W. Biederman) writes: > Stephen Brennan writes: > >> The pid_revalidate() function requires dropping from RCU into REF lookup >> mode. When many threads are resolving paths within /proc in parallel, >> this can result in heavy spinlock contention as each thread tries t

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-13 Thread Paul Moore
On Sun, Dec 13, 2020 at 11:30 AM Matthew Wilcox wrote: > On Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: > > Matthew Wilcox writes: > > > > > On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: > > >> -void pid_update_inode(struct task_struct *task, struct inode *i

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-13 Thread Matthew Wilcox
On Sun, Dec 13, 2020 at 08:30:40AM -0600, Eric W. Biederman wrote: > Stephen Brennan writes: > > > The pid_revalidate() function requires dropping from RCU into REF lookup > > mode. When many threads are resolving paths within /proc in parallel, > > this can result in heavy spinlock contention as

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-13 Thread Matthew Wilcox
On Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: > Matthew Wilcox writes: > > > On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: > >> -void pid_update_inode(struct task_struct *task, struct inode *inode) > >> +static int do_pid_update_inode(struct task_struct *ta

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-13 Thread Eric W. Biederman
Stephen Brennan writes: > The pid_revalidate() function requires dropping from RCU into REF lookup > mode. When many threads are resolving paths within /proc in parallel, > this can result in heavy spinlock contention as each thread tries to > grab a reference to the /proc dentry lock (and drop i

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-13 Thread Eric W. Biederman
Matthew Wilcox writes: > On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: >> -void pid_update_inode(struct task_struct *task, struct inode *inode) >> +static int do_pid_update_inode(struct task_struct *task, struct inode >> *inode, >> + unsigned int flag

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-12 Thread Matthew Wilcox
On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: > -void pid_update_inode(struct task_struct *task, struct inode *inode) > +static int do_pid_update_inode(struct task_struct *task, struct inode *inode, > +unsigned int flags) I'm really nitpicking here, b

[PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-03 Thread Stephen Brennan
The pid_revalidate() function requires dropping from RCU into REF lookup mode. When many threads are resolving paths within /proc in parallel, this can result in heavy spinlock contention as each thread tries to grab a reference to the /proc dentry lock (and drop it shortly thereafter). Allow the