Bug 725893

Summary: Fix scalability of vfsmount_lock access for internally mounted filesystems like sockfs and pipefs
Product: Red Hat Enterprise Linux 6 Reporter: Tim Chen <tim.c.chen>
Component: filesystemAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2CC: andi.kleen, matthew.r.wilcox
Target Milestone: rc   
Target Release: 6.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-26 21:48:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tim Chen 2011-07-26 21:23:48 UTC
Description of problem:

For a number of file systems that don't have a mount point (e.g. sockfs
and pipefs), they are not marked as long term. Therefore in
mntput_no_expire, all locks in vfs_mount lock are taken instead of just
local cpu's lock to aggregate reference counts when we release
reference to file objects.  In fact, only local lock need to have been
taken to update ref counts as these file systems are in no danger of
going away until we are ready to unregister them. 

The attached patch marks file systems using kern_mount without 
mount point as long term.  The contentions of vfs_mount lock 
is now eliminated.  Before un-registering such file system,
kern_unmount should be called to remove the long term flag and
make the mount point ready to be freed. 

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
See https://lkml.org/lkml/2011/7/16/122
  
Actual results:
Heavy contention on vfsmount_lock for sockfs and pipefs

Expected results:
Low contention on vfsmount_lock

Additional info:
Problem fixed in mainline commit 423e0ab086ad8b33626e45fa94ac7613146b7ffa

Comment 2 Tim Chen 2011-07-26 21:48:35 UTC
This issue doesn't affect RHEL6 kernel on further review.