lkml.org 
[lkml]   [2020]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] fs: Do not check if there is a fsnotify watcher on pseudo inodes
On Mon 15-06-20 19:26:38, Amir Goldstein wrote:
> > This patch changes alloc_file_pseudo() to always opt out of fsnotify by
> > setting FMODE_NONOTIFY flag so that no check is made for fsnotify watchers
> > on pseudo files. This should be safe as the underlying helper for the
> > dentry is d_alloc_pseudo which explicitly states that no lookups are ever
> > performed meaning that fanotify should have nothing useful to attach to.
> >
> > The test motivating this was "perf bench sched messaging --pipe". On
> > a single-socket machine using threads the difference of the patch was
> > as follows.
> >
> > 5.7.0 5.7.0
> > vanilla nofsnotify-v1r1
> > Amean 1 1.3837 ( 0.00%) 1.3547 ( 2.10%)
> > Amean 3 3.7360 ( 0.00%) 3.6543 ( 2.19%)
> > Amean 5 5.8130 ( 0.00%) 5.7233 * 1.54%*
> > Amean 7 8.1490 ( 0.00%) 7.9730 * 2.16%*
> > Amean 12 14.6843 ( 0.00%) 14.1820 ( 3.42%)
> > Amean 18 21.8840 ( 0.00%) 21.7460 ( 0.63%)
> > Amean 24 28.8697 ( 0.00%) 29.1680 ( -1.03%)
> > Amean 30 36.0787 ( 0.00%) 35.2640 * 2.26%*
> > Amean 32 38.0527 ( 0.00%) 38.1223 ( -0.18%)
> >
> > The difference is small but in some cases it's outside the noise so
> > while marginal, there is still some small benefit to ignoring fsnotify
> > for files allocated via alloc_file_pseudo in some cases.
> >
> > Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
>
> Reviewed-by: Amir Goldstein <amir73il@gmail.com>

Thanks for the patch Mel and for review Amir! I've added the patch to my
tree with small amendments to the changelog.

Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2020-06-16 09:47    [W:0.089 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site