From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C969C432BE for ; Wed, 4 Aug 2021 19:07:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21C6261002 for ; Wed, 4 Aug 2021 19:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240381AbhHDTHW (ORCPT ); Wed, 4 Aug 2021 15:07:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239199AbhHDTHU (ORCPT ); Wed, 4 Aug 2021 15:07:20 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1EFAC0613D5; Wed, 4 Aug 2021 12:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject: Sender:Reply-To:Content-ID:Content-Description; bh=DhwLtsNskNFFTWvabwpi9A2MO0bfG7bv9FAj/gK66CI=; b=k7LQJkIyN1PHacBvHfvyVjjYe0 KnucxBVgwnNfc+ceQCrLVF/i97zN4mrfPsrSQRhLGNpZl0UcsL6fozcvNzT90C42IrZPVRo1yYMcv 4TRG8d7NbLVd6J98XOVIOCRu7fw73geUIN4j9+MGIXorUaH0Fn0XgYmgFCEYklbIp0mT8P1r8YiWM Zt5SP0MBno+dmPs50yr3z8v3F/PyRyQnMBng35YnU4yBEswdAUWy76GcMKihBI2DSa6EUKVVO4fVV gACsPUT1Vh3RGPYPs61DtM5Fm+XUXScHv9Yvqm+TS6qEX9Nz86FwqGqoFRUDXbamhbGl/VfiG7Spw 9uisiOjQ==; Received: from [2601:1c0:6280:3f0:e65e:37ff:febd:ee53] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBMEJ-005oBL-M4; Wed, 04 Aug 2021 19:07:04 +0000 Subject: Re: [PATCH v1] fs/epoll: use a per-cpu counter for user's watches count To: Guenter Roeck , Nicholas Piggin Cc: Andrew Morton , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Anton Blanchard References: <20210802032013.2751916-1-npiggin@gmail.com> <20210804152222.GA3717568@roeck-us.net> From: Randy Dunlap Message-ID: Date: Wed, 4 Aug 2021 12:06:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210804152222.GA3717568@roeck-us.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> Signed-off-by: Nicholas Piggin > > 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