Re: fsnotify_mark_srcu wtf?

2016-12-07 Thread Jan Kara
On Fri 02-12-16 12:02:33, Miklos Szeredi wrote: > On Fri, Dec 2, 2016 at 11:48 AM, Jan Kara wrote: > > On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: > >> On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > >> > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: > >> >>

Re: fsnotify_mark_srcu wtf?

2016-12-07 Thread Jan Kara
On Fri 02-12-16 12:02:33, Miklos Szeredi wrote: > On Fri, Dec 2, 2016 at 11:48 AM, Jan Kara wrote: > > On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: > >> On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > >> > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: > >> >> On Wed, Nov 9, 2016 at 1:10

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Amir Goldstein
On Fri, Dec 2, 2016 at 1:41 PM, Amir Goldstein wrote: > On Fri, Dec 2, 2016 at 12:48 PM, Jan Kara wrote: >> On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: > ... >>> >>> Hmm, how about this: when removing mark from inode, drop refcount. If >>> refcount is zero

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Amir Goldstein
On Fri, Dec 2, 2016 at 1:41 PM, Amir Goldstein wrote: > On Fri, Dec 2, 2016 at 12:48 PM, Jan Kara wrote: >> On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: > ... >>> >>> Hmm, how about this: when removing mark from inode, drop refcount. If >>> refcount is zero can remove from list. Otherwise

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Amir Goldstein
On Fri, Dec 2, 2016 at 12:48 PM, Jan Kara wrote: > On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: ... >> >> Hmm, how about this: when removing mark from inode, drop refcount. If >> refcount is zero can remove from list. Otherwise mark the mark "dead" >> and leave it on the list.

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Amir Goldstein
On Fri, Dec 2, 2016 at 12:48 PM, Jan Kara wrote: > On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: ... >> >> Hmm, how about this: when removing mark from inode, drop refcount. If >> refcount is zero can remove from list. Otherwise mark the mark "dead" >> and leave it on the list. >> >> And

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Miklos Szeredi
On Fri, Dec 2, 2016 at 11:48 AM, Jan Kara wrote: > On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: >> On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: >> > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: >> >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Miklos Szeredi
On Fri, Dec 2, 2016 at 11:48 AM, Jan Kara wrote: > On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: >> On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: >> > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: >> >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: >> >> >> > And this does not work as

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Jan Kara
On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: > On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: > >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: > > >> > And this does not work as well... Fanotify must notify

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Jan Kara
On Fri 02-12-16 09:26:51, Miklos Szeredi wrote: > On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: > >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: > > >> > And this does not work as well... Fanotify must notify groups by their > >> >

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Miklos Szeredi
On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: >> > And this does not work as well... Fanotify must notify groups by their >> > priority so you cannot arbitrarily

Re: fsnotify_mark_srcu wtf?

2016-12-02 Thread Miklos Szeredi
On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: >> > And this does not work as well... Fanotify must notify groups by their >> > priority so you cannot arbitrarily reorder ordering in which

Re: fsnotify_mark_srcu wtf?

2016-11-14 Thread Amir Goldstein
On Sun, Nov 13, 2016 at 8:43 PM, Amir Goldstein wrote: > On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: > > ... > >> >> Well but how would you like to protect the mark list hanging off the inode >> / mountpoint with two SRCUs? You'd need two lists hanging off

Re: fsnotify_mark_srcu wtf?

2016-11-14 Thread Amir Goldstein
On Sun, Nov 13, 2016 at 8:43 PM, Amir Goldstein wrote: > On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: > > ... > >> >> Well but how would you like to protect the mark list hanging off the inode >> / mountpoint with two SRCUs? You'd need two lists hanging off the inode & >> mountpoint (for

Re: fsnotify_mark_srcu wtf?

2016-11-13 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: ... > > Well but how would you like to protect the mark list hanging off the inode > / mountpoint with two SRCUs? You'd need two lists hanging off the inode & > mountpoint (for different priorities) and that's too big cost to pay to

Re: fsnotify_mark_srcu wtf?

2016-11-13 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: ... > > Well but how would you like to protect the mark list hanging off the inode > / mountpoint with two SRCUs? You'd need two lists hanging off the inode & > mountpoint (for different priorities) and that's too big cost to pay to > accomodate

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 10:44 PM, Miklos Szeredi wrote: > On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: >> Except it doesn't quite work. We can pin the current marks by a refcount >> but they can still be removed from the list so after we regain srcu lock, >>

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 10:44 PM, Miklos Szeredi wrote: > On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: >> Except it doesn't quite work. We can pin the current marks by a refcount >> but they can still be removed from the list so after we regain srcu lock, >> we are not sure their ->next

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Miklos Szeredi
On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > Except it doesn't quite work. We can pin the current marks by a refcount > but they can still be removed from the list so after we regain srcu lock, > we are not sure their ->next pointers still point to still allocated marks > :-|

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Miklos Szeredi
On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > Except it doesn't quite work. We can pin the current marks by a refcount > but they can still be removed from the list so after we regain srcu lock, > we are not sure their ->next pointers still point to still allocated marks > :-| Sadly I

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: >> > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: >> >> On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Amir Goldstein
On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: > On Wed 09-11-16 20:26:16, Amir Goldstein wrote: >> On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: >> > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: >> >> On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: >> >> > On Wed 02-11-16 23:09:26,

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Jan Kara
On Wed 09-11-16 20:26:16, Amir Goldstein wrote: > On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: > > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: > >> On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: > >> > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: > >> >>

Re: fsnotify_mark_srcu wtf?

2016-11-10 Thread Jan Kara
On Wed 09-11-16 20:26:16, Amir Goldstein wrote: > On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: > > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: > >> On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: > >> > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: > >> >> We've got a report where a

Re: fsnotify_mark_srcu wtf?

2016-11-09 Thread Amir Goldstein
On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: >> On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: >> > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: >> >> We've got a report where a fanotify daemon that implements

Re: fsnotify_mark_srcu wtf?

2016-11-09 Thread Amir Goldstein
On Wed, Nov 9, 2016 at 1:10 PM, Jan Kara wrote: > On Sun 06-11-16 08:45:54, Amir Goldstein wrote: >> On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: >> > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: >> >> We've got a report where a fanotify daemon that implements permission >> >> checks >>

Re: fsnotify_mark_srcu wtf?

2016-11-09 Thread Jan Kara
On Sun 06-11-16 08:45:54, Amir Goldstein wrote: > On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: > > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: > >> We've got a report where a fanotify daemon that implements permission > >> checks > >> screws up and doesn't send a reply.

Re: fsnotify_mark_srcu wtf?

2016-11-09 Thread Jan Kara
On Sun 06-11-16 08:45:54, Amir Goldstein wrote: > On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: > > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: > >> We've got a report where a fanotify daemon that implements permission > >> checks > >> screws up and doesn't send a reply. This then causes

Re: fsnotify_mark_srcu wtf?

2016-11-06 Thread Amir Goldstein
On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: >> We've got a report where a fanotify daemon that implements permission checks >> screws up and doesn't send a reply. This then causes widespread hangs due to >> fsnotify_mark_srcu

Re: fsnotify_mark_srcu wtf?

2016-11-06 Thread Amir Goldstein
On Sat, Nov 5, 2016 at 11:34 PM, Jan Kara wrote: > On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: >> We've got a report where a fanotify daemon that implements permission checks >> screws up and doesn't send a reply. This then causes widespread hangs due to >> fsnotify_mark_srcu read side lock

Re: fsnotify_mark_srcu wtf?

2016-11-05 Thread Jan Kara
On Thu 03-11-16 12:25:13, Amir Goldstein wrote: > On Thu, Nov 3, 2016 at 12:09 AM, Miklos Szeredi wrote: > > We've got a report where a fanotify daemon that implements permission checks > > screws up and doesn't send a reply. This then causes widespread hangs due > > to > >

Re: fsnotify_mark_srcu wtf?

2016-11-05 Thread Jan Kara
On Thu 03-11-16 12:25:13, Amir Goldstein wrote: > On Thu, Nov 3, 2016 at 12:09 AM, Miklos Szeredi wrote: > > We've got a report where a fanotify daemon that implements permission checks > > screws up and doesn't send a reply. This then causes widespread hangs due > > to > > fsnotify_mark_srcu

Re: fsnotify_mark_srcu wtf?

2016-11-05 Thread Jan Kara
On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: > We've got a report where a fanotify daemon that implements permission checks > screws up and doesn't send a reply. This then causes widespread hangs due to > fsnotify_mark_srcu read side lock being held and thus causing > synchronize_srcu() >

Re: fsnotify_mark_srcu wtf?

2016-11-05 Thread Jan Kara
On Wed 02-11-16 23:09:26, Miklos Szeredi wrote: > We've got a report where a fanotify daemon that implements permission checks > screws up and doesn't send a reply. This then causes widespread hangs due to > fsnotify_mark_srcu read side lock being held and thus causing > synchronize_srcu() >

Re: fsnotify_mark_srcu wtf?

2016-11-03 Thread Amir Goldstein
On Thu, Nov 3, 2016 at 12:09 AM, Miklos Szeredi wrote: > We've got a report where a fanotify daemon that implements permission checks > screws up and doesn't send a reply. This then causes widespread hangs due to > fsnotify_mark_srcu read side lock being held and thus causing

Re: fsnotify_mark_srcu wtf?

2016-11-03 Thread Amir Goldstein
On Thu, Nov 3, 2016 at 12:09 AM, Miklos Szeredi wrote: > We've got a report where a fanotify daemon that implements permission checks > screws up and doesn't send a reply. This then causes widespread hangs due to > fsnotify_mark_srcu read side lock being held and thus causing >

fsnotify_mark_srcu wtf?

2016-11-02 Thread Miklos Szeredi
We've got a report where a fanotify daemon that implements permission checks screws up and doesn't send a reply. This then causes widespread hangs due to fsnotify_mark_srcu read side lock being held and thus causing synchronize_srcu() called from e.g. inotify_release()->

fsnotify_mark_srcu wtf?

2016-11-02 Thread Miklos Szeredi
We've got a report where a fanotify daemon that implements permission checks screws up and doesn't send a reply. This then causes widespread hangs due to fsnotify_mark_srcu read side lock being held and thus causing synchronize_srcu() called from e.g. inotify_release()->