]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs/epoll: use a per-cpu counter for user's watches count
authorNicholas Piggin <npiggin@gmail.com>
Tue, 24 Aug 2021 00:00:00 +0000 (10:00 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:53 +0000 (09:34 +1000)
commit5d9d50f0a6031094a720c309afa80bf9294b27b9
treed812d54e31949142431688ad3b0fd0b150873cf2
parentb81f67c562dcaf7bbb6aa3a07e9dc6558f6432bd
fs/epoll: use a per-cpu counter for user's watches count

This counter tracks the number of watches a user has, to compare against
the 'max_user_watches' limit. This causes a scalability bottleneck on
SPECjbb2015 on large systems as there is only one user. Changing to a
per-cpu counter increases throughput of the benchmark by about 30% on a
16-socket, > 1000 thread system.

Link: https://lkml.kernel.org/r/20210802032013.2751916-1-npiggin@gmail.com
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reported-by: Anton Blanchard <anton@ozlabs.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
fs/eventpoll.c
include/linux/sched/user.h
kernel/user.c