From: Randy Dunlap <rdunlap@infradead.org>
To: Guenter Roeck <linux@roeck-us.net>, Nicholas Piggin <npiggin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Anton Blanchard <anton@ozlabs.org>
Subject: Re: [PATCH v1] fs/epoll: use a per-cpu counter for user's watches count
Date: Wed, 4 Aug 2021 12:06:57 -0700 [thread overview]
Message-ID: <f641fd9b-56c7-ddef-45d8-36ba340b9ab9@infradead.org> (raw)
In-Reply-To: <20210804152222.GA3717568@roeck-us.net>
On 8/4/21 8:22 AM, Guenter Roeck wrote:
> On Mon, Aug 02, 2021 at 01:20:13PM +1000, Nicholas Piggin wrote:
>> 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.
>>
>> Reported-by: Anton Blanchard <anton@ozlabs.org>
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> With all tinyconfig builds (and all other builds with CONFIG_EPOLL=n),
> this patch results in:
>
> kernel/user.c: In function 'free_user':
> kernel/user.c:141:35: error: 'struct user_struct' has no member named 'epoll_watches'
> 141 | percpu_counter_destroy(&up->epoll_watches);
> | ^~
> kernel/user.c: In function 'alloc_uid':
> kernel/user.c:189:45: error: 'struct user_struct' has no member named 'epoll_watches'
> 189 | if (percpu_counter_init(&new->epoll_watches, 0, GFP_KERNEL)) {
> | ^~
> kernel/user.c:203:52: error: 'struct user_struct' has no member named 'epoll_watches'
> 203 | percpu_counter_destroy(&new->epoll_watches);
> | ^~
> kernel/user.c: In function 'uid_cache_init':
> kernel/user.c:225:43: error: 'struct user_struct' has no member named 'epoll_watches'
> 225 | if (percpu_counter_init(&root_user.epoll_watches, 0, GFP_KERNEL))
> | ^
>
> Guenter
>
Hi,
Nick and I have also posted patches for this.
https://lore.kernel.org/lkml/1628051945.fens3r99ox.astroid@bobo.none/
thanks.--
~Randy
prev parent reply other threads:[~2021-08-04 19:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 3:20 [PATCH v1] fs/epoll: use a per-cpu counter for user's watches count Nicholas Piggin
2021-08-04 15:22 ` Guenter Roeck
2021-08-04 19:06 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f641fd9b-56c7-ddef-45d8-36ba340b9ab9@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=anton@ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=npiggin@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).