Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp696258pxb; Thu, 25 Feb 2021 12:40:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJy90dxsb/ZOsqkI8IBNxAhGE2mxvziIAiIW2emHveRs0wYNw6WcZMwrEzgiNiVbpsgxBH42 X-Received: by 2002:a17:906:27d3:: with SMTP id k19mr4630956ejc.73.1614285619519; Thu, 25 Feb 2021 12:40:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614285619; cv=none; d=google.com; s=arc-20160816; b=t7zaZE2MR8+Wc3ZfqaVR1vr8POTeGq7n4zOVSre9m2IcmNAZTtXvZRmWDAMeBc/RSQ 1igtF2KRPvN3VqOWOgW93x7Rbs0l2CrkIfMBzlXOI96qPmhoY5N31rfWyo852y6WvhcZ ZPEhEIwxD1dZPPJi10FUmIIx4uaVDOi2I4FKT7kXAvHZOergGT4thIchBWcmEdOQfXRv rOPsAv2SrMHwvko/jGmutKsNiGZvLNI4+aYqOTmHehlAdEAwaGGJxGOecXP3kXg3m0Wo IZxkHZgrjmU8I06/B7gVcTexcS899SX4UqFba2DCWbv1fXbuM4TEXJgimj6uaq9OPbGg 2Fvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=IfTaFo4yJJqNk68nHMcFFobH3NZMi7m9RrciUlNZ7zY=; b=TmVoheyrOCXG0XnewUEw3XopoZ7fUbvstdvc1e6UQQdir475q85L1M5GEkrBWAOFQx Co34t6ATvu9+eVV8hWV8zita9VvniyLjQCz5/GmB8i8vWYlCh+JpTJqPt6Fxs6KF1fui PJSiiJtCGWXmy2Qj7po/0Y2IRnCxgQ7/PFiQ/U0NU57ksDvhLNdU8fRRjakCBnntKenm zLyHP3coAHJ8Ja6f1/enKZbaWb2Uf6edfl0VnyJc1Hh4bNALTtaKzTC23ykz05PQqnXf wMwpLhH1NZ90TEsM1rhnp80k0TcGiKLO/0VSzmWPnFxZrw5Ma5XrL/ODI9otCkvnadKW 9PFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si3944580edt.118.2021.02.25.12.39.56; Thu, 25 Feb 2021 12:40:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234379AbhBYUjJ (ORCPT + 99 others); Thu, 25 Feb 2021 15:39:09 -0500 Received: from raptor.unsafe.ru ([5.9.43.93]:47106 "EHLO raptor.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234690AbhBYUiC (ORCPT ); Thu, 25 Feb 2021 15:38:02 -0500 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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