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=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 A74F6C433E0 for ; Thu, 25 Feb 2021 20:37:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1944864DE9 for ; Thu, 25 Feb 2021 20:37:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1944864DE9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5A4E96B0005; Thu, 25 Feb 2021 15:37:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 52DE26B0006; Thu, 25 Feb 2021 15:37:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F7566B006C; Thu, 25 Feb 2021 15:37:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 23F4E6B0005 for ; Thu, 25 Feb 2021 15:37:19 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D4FE2D238 for ; Thu, 25 Feb 2021 20:37:18 +0000 (UTC) X-FDA: 77857950156.28.26A45CC Received: from raptor.unsafe.ru (raptor.unsafe.ru [5.9.43.93]) by imf05.hostedemail.com (Postfix) with ESMTP id F19A5E000103 for ; Thu, 25 Feb 2021 20:37:16 +0000 (UTC) Received: from example.org (ip-94-113-225-162.net.upcbroadband.cz [94.113.225.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by raptor.unsafe.ru (Postfix) with ESMTPSA id 54A7A209D4; Thu, 25 Feb 2021 20:37:07 +0000 (UTC) Date: Thu, 25 Feb 2021 21:36:57 +0100 From: Alexey Gladkov To: "Eric W. Biederman" Cc: kernel test robot , 0day robot , LKML , lkp@lists.01.org, ying.huang@intel.com, feng.tang@intel.com, zhengjun.xing@intel.com, io-uring@vger.kernel.org, Kernel Hardening , Linux Containers , linux-mm@kvack.org, Andrew Morton , Christian Brauner , Jann Horn , Jens Axboe , Kees Cook , Linus Torvalds , Oleg Nesterov Subject: Re: d28296d248: stress-ng.sigsegv.ops_per_sec -82.7% regression Message-ID: <20210225203657.mjhaqnj5vszna5xw@example.org> References: <20210224051845.GB6114@xsang-OptiPlex-9020> <20210224183828.j6uut6sholeo2fzh@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (raptor.unsafe.ru [5.9.43.93]); Thu, 25 Feb 2021 20:37:16 +0000 (UTC) X-Stat-Signature: e5pq553jsnwgdpa9t3ak58bmfrgdw64h X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: F19A5E000103 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf05; identity=mailfrom; envelope-from=""; helo=raptor.unsafe.ru; client-ip=5.9.43.93 X-HE-DKIM-Result: none/none X-HE-Tag: 1614285436-698896 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Feb 24, 2021 at 12:50:21PM -0600, Eric W. Biederman wrote: > Alexey Gladkov writes: > > > On Wed, Feb 24, 2021 at 10:54:17AM -0600, Eric W. Biederman wrote: > >> kernel test robot writes: > >> > >> > Greeting, > >> > > >> > FYI, we noticed a -82.7% regression of stress-ng.sigsegv.ops_per_sec due to commit: > >> > > >> > > >> > commit: d28296d2484fa11e94dff65e93eb25802a443d47 ("[PATCH v7 5/7] Reimplement RLIMIT_SIGPENDING on top of ucounts") > >> > url: https://github.com/0day-ci/linux/commits/Alexey-Gladkov/Count-rlimits-in-each-user-namespace/20210222-175836 > >> > base: https://git.kernel.org/cgit/linux/kernel/git/shuah/linux-kselftest.git next > >> > > >> > in testcase: stress-ng > >> > on test machine: 48 threads Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz with 112G memory > >> > with following parameters: > >> > > >> > nr_threads: 100% > >> > disk: 1HDD > >> > testtime: 60s > >> > class: interrupt > >> > test: sigsegv > >> > cpufreq_governor: performance > >> > ucode: 0x42e > >> > > >> > > >> > In addition to that, the commit also has significant impact on the > >> > following tests: > >> > >> Thank you. Now we have a sense of where we need to test the performance > >> of these changes carefully. > > > > One of the reasons for this is that I rolled back the patch that changed > > the ucounts.count type to atomic_t. Now get_ucounts() is forced to use a > > spin_lock to increase the reference count. > > Which given the hickups with getting a working version seems justified. > > Now we can add incremental patches on top to improve the performance. I'm not sure that get_ucounts() should be used in __sigqueue_alloc() [1]. I tried removing it and running KASAN tests that were failing before. So far, I have not found any problems. [1] https://git.kernel.org/pub/scm/linux/kernel/git/legion/linux.git/tree/kernel/signal.c?h=patchset/per-userspace-rlimit/v7.1&id=2d4a2e2be7db42c95acb98abfc2a9b370ddd0604#n428 -- Rgrds, legion