linux/Documentation/filesystems
Shaohua Li 09223371de rcu: Use softirq to address performance regression
Commit a26ac2455ffcf3(rcu: move TREE_RCU from softirq to kthread)
introduced performance regression. In an AIM7 test, this commit degraded
performance by about 40%.

The commit runs rcu callbacks in a kthread instead of softirq. We observed
high rate of context switch which is caused by this. Out test system has
64 CPUs and HZ is 1000, so we saw more than 64k context switch per second
which is caused by RCU's per-CPU kthread.  A trace showed that most of
the time the RCU per-CPU kthread doesn't actually handle any callbacks,
but instead just does a very small amount of work handling grace periods.
This means that RCU's per-CPU kthreads are making the scheduler do quite
a bit of work in order to allow a very small amount of RCU-related
processing to be done.

Alex Shi's analysis determined that this slowdown is due to lock
contention within the scheduler.  Unfortunately, as Peter Zijlstra points
out, the scheduler's real-time semantics require global action, which
means that this contention is inherent in real-time scheduling.  (Yes,
perhaps someone will come up with a workaround -- otherwise, -rt is not
going to do well on large SMP systems -- but this patch will work around
this issue in the meantime.  And "the meantime" might well be forever.)

This patch therefore re-introduces softirq processing to RCU, but only
for core RCU work.  RCU callbacks are still executed in kthread context,
so that only a small amount of RCU work runs in softirq context in the
common case.  This should minimize ksoftirqd execution, allowing us to
skip boosting of ksoftirqd for CONFIG_RCU_BOOST=y kernels.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Tested-by: "Alex,Shi" <alex.shi@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2011-06-14 15:25:39 -07:00
..
caching Fix common misspellings 2011-03-31 11:26:23 -03:00
configfs Documentation: configfs examples crash fix 2011-05-26 17:12:34 -07:00
nfs Create Documentation/security/, 2011-05-19 15:59:38 -07:00
pohmelfs Fix common misspellings 2011-03-31 11:26:23 -03:00
9p.txt 9p: update Documentation pointers 2011-05-25 09:33:05 -05:00
00-INDEX
adfs.txt adfs: add hexadecimal filetype suffix option 2011-03-22 17:44:17 -07:00
affs.txt
afs.txt
autofs4-mount-control.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
automount-support.txt
befs.txt
bfs.txt
btrfs.txt
ceph.txt
cifs.txt
coda.txt
cramfs.txt
debugfs.txt
devpts.txt
directory-locking
dlmfs.txt
dnotify_test.c
dnotify.txt
ecryptfs.txt
exofs.txt
ext2.txt
ext3.txt
ext4.txt ext4: remove obsolete mount options from ext4's documentation 2011-05-01 18:14:26 -04:00
fiemap.txt
files.txt
fuse.txt
gfs2-glocks.txt
gfs2-uevents.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
gfs2.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
hfs.txt
hfsplus.txt
hpfs.txt
inotify.txt
isofs.txt
jfs.txt
Locking fs: pass exact type of data dirties to ->dirty_inode 2011-05-27 07:04:40 -04:00
locks.txt
logfs.txt
Makefile
mandatory-locking.txt
ncpfs.txt
nilfs2.txt
ntfs.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
ocfs2.txt ocfs2: clean up mount option about atime in ocfs2.txt 2011-05-23 23:37:12 -07:00
omfs.txt
path-lookup.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
porting fs: remove inode_lock from iput_final and prune_icache 2011-03-24 21:16:32 -04:00
proc.txt rcu: Use softirq to address performance regression 2011-06-14 15:25:39 -07:00
quota.txt
ramfs-rootfs-initramfs.txt
relay.txt
romfs.txt
seq_file.txt
sharedsubtree.txt
spufs.txt
squashfs.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
sysfs-pci.txt
sysfs-tagging.txt
sysfs.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
sysv-fs.txt
tmpfs.txt
ubifs.txt UBIFS: switch to dynamic printks 2011-05-23 08:22:20 +03:00
udf.txt
ufs.txt
vfat.txt
vfs.txt fs: pass exact type of data dirties to ->dirty_inode 2011-05-27 07:04:40 -04:00
xfs-delayed-logging-design.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
xfs.txt xfs: add online discard support 2011-05-24 11:17:13 -05:00
xip.txt