Re: [PATCH 17/33] fsnotify: Free fsnotify_mark_connector when there is no mark attached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 30-03-17 12:02:35, Miklos Szeredi wrote:
> On Tue, Mar 28, 2017 at 06:13:16PM +0200, Jan Kara wrote:
> > Currently we free fsnotify_mark_connector structure only when inode /
> > vfsmount is getting freed. This can however impose noticeable memory
> > overhead when marks get attached to inodes only temporarily. So free the
> > connector structure once the last mark is detached from the object.
> > Since notification infrastructure can be working with the connector
> > under the protection of fsnotify_mark_srcu, we have to be careful and
> > free the fsnotify_mark_connector only after SRCU period passes.
> 
> Hmm, I'm thinking about the corner case when connector gets created and removed
> repeatedly.  Is this a potential DoS problem?  Should perhaps creating new
> connectors be throttled when the destroy_list becomes too large?
> 
> Probably not a big issue, but perhaps needs to be addressed in some way at the
> end of the series...

Well, given marks themselves are SRCU freed (and not accounted in any
counters by the time they are in that phase) we already have that problem
since fsnotify framework beginning. I'm not saying we should not address
this but IMO it isn't a pressing issue and I would not complicate this
series with it.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux