Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1563675ybv; Sun, 23 Feb 2020 09:37:54 -0800 (PST) X-Google-Smtp-Source: APXvYqygXTHQSgnyVfLnoCcn1HW+TxXW5lFLRzuVGuAvSPEPGH6xU5h7vx624yzRg/WQso4eO8c3 X-Received: by 2002:a9d:7410:: with SMTP id n16mr38095489otk.23.1582479474709; Sun, 23 Feb 2020 09:37:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582479474; cv=none; d=google.com; s=arc-20160816; b=yzlN57TGDM8lv+LzIW79qT/bH5qEwMYcchWx5/RYT2XnuGSNisnlzc97ta/xv3yTMz B9rauzXfzh25rJU3AmPGev4pjguKVbtWCgTM/BI4R608juTJqEiAs7JZQjJdtmZA/xZh qq8XnuxtyXFi4lsq49skliKlB4Ckr6YKoxAwXomFzvugHuMYmAke/X2ZCCm/cOss1Zq2 zY1GrL/j7Hu6vME6BRowwv195lddVBT749DOWCEUmM3qcwClPUgfaJMaT9Y/RVmiEvGE BjZIAo6FW/dJN9G+ScUbqJAdfi+8kauSDKwpSYs68HfXt2mqxVoelQm8e5BofJICY1Xm axLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Oo2h9DpzV8R6DzoyOn3xk6iUMc8ZtWKeVZcgxQnxqcQ=; b=cDK06bkRHO32G09WjrbAo3ZttdfU0rGFAflWCZ9O6S6jdl3S9Ik8R/7/3iDIvIHuYR 6fdZX+k0pTd8AJ+mtvXV+kBSZyt0LgiWxBTgMO6ljPbipwO46ufB+15xRMXYfLHlKCUJ 2aIwgkTcnecK2u6GQDnuWec7vRbMh2AyzzxtMnjJHzdnzlPlCf+52ad6Sdi6MtQZin9P vQfYlvJctfMMj8qz2fNWHG19aKOSdnTtgNDxufDBNuhRWOn8P2amvYVXQIdAE+UDs95A 9vrY8J0CjkNUA75DYQE559ChYcMyqynVp1v0o9QUex0n7VFLPw+4QgLecx7ahOR5cQjy Q01w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=VhyzIhNW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t128si3712331oie.176.2020.02.23.09.37.42; Sun, 23 Feb 2020 09:37:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=VhyzIhNW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727156AbgBWRha (ORCPT + 99 others); Sun, 23 Feb 2020 12:37:30 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45130 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727148AbgBWRha (ORCPT ); Sun, 23 Feb 2020 12:37:30 -0500 Received: by mail-lf1-f65.google.com with SMTP id z5so5135745lfd.12 for ; Sun, 23 Feb 2020 09:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Oo2h9DpzV8R6DzoyOn3xk6iUMc8ZtWKeVZcgxQnxqcQ=; b=VhyzIhNWwECgPdC5MwwHsqqdQSkcG0Xw7qqMhnAY4UFOZI4HyLBBSLcBFQWCHPuGcj vJa0wdQ7PHcIqQHrJXKe5AxBJYOS110g3VfSF4LJOCWVsQJnXWuABGDgZXM+dtG16Mhc /EG1GywwKMGkbI9+Bcps7nuk2B6yDm4FalYeU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Oo2h9DpzV8R6DzoyOn3xk6iUMc8ZtWKeVZcgxQnxqcQ=; b=PgXVOMvt8nvRZ2wGBFxrTWDBywQHy/AQd5J9BwudsSRMO+ykwt0sSUzggaHKA/99EC yeQoSFeRhXDn6+3WwjwQgbJ/EGxaEhPhGZEOZ7172wvKh9NXseuyMh2nORNmKMWUMgmt lgQAclr7WPQWMYzId9VtGwAbxre6fXdqkOw+b7BeavsMRSHSY/OKhb5GQa22nqncJtu9 QqhnKnu1nlonag6glnExEyDgDb+6PK8bkd5f5bJ9MezLQBsbojQAOGKJRgSEqodKjggo lbuqgQ6U/iKfgipl2vXbZU5A+nDNWuO5VhkrTUks/g7JeXZHo3A/GJdbMTqgPIGW8eYy Ktew== X-Gm-Message-State: APjAAAXhAe0wUjER3WsZXFti7tn67xb8p/dp30zT/Jy9jnDIJpbCGXuG gAViS6oB+5PAZ48oDdDUjvUkHKmtuQQ= X-Received: by 2002:ac2:4849:: with SMTP id 9mr25213504lfy.11.1582479446351; Sun, 23 Feb 2020 09:37:26 -0800 (PST) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id k24sm5959596ljj.27.2020.02.23.09.37.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Feb 2020 09:37:24 -0800 (PST) Received: by mail-lj1-f174.google.com with SMTP id y6so7504027lji.0 for ; Sun, 23 Feb 2020 09:37:23 -0800 (PST) X-Received: by 2002:a2e:461a:: with SMTP id t26mr27818722lja.204.1582479442680; Sun, 23 Feb 2020 09:37:22 -0800 (PST) MIME-Version: 1.0 References: <20200205123216.GO12867@shao2-debian> <20200205125804.GM14879@hirez.programming.kicks-ass.net> <20200221080325.GA67807@shbuild999.sh.intel.com> <20200221132048.GE652992@krava> <20200223141147.GA53531@shbuild999.sh.intel.com> In-Reply-To: <20200223141147.GA53531@shbuild999.sh.intel.com> From: Linus Torvalds Date: Sun, 23 Feb 2020 09:37:06 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [LKP] Re: [perf/x86] 81ec3f3c4c: will-it-scale.per_process_ops -5.5% regression To: Feng Tang Cc: Jiri Olsa , Peter Zijlstra , kernel test robot , Ingo Molnar , Vince Weaver , Jiri Olsa , Alexander Shishkin , Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , "Naveen N. Rao" , Ravi Bangoria , Stephane Eranian , Thomas Gleixner , LKML , lkp@lists.01.org, andi.kleen@intel.com, "Huang, Ying" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 23, 2020 at 6:11 AM Feng Tang wrote: > > I tried to use perf-c2c on one platform (not the one that show > the 5.5% regression), and found the main "hitm" points to the > "root_user" global data, as there is a task for each CPU doing > the signal stress test, and both __sigqueue_alloc() and > __sigqueue_free() will call get_user() and free_uid() to inc/dec > this root_user's refcount. What's around it for you? There might be that 'uidhash_lock' spinlock right next to it, and maybe that exacerbates the issue? > Then I added some alignement inside struct "user_struct" (for > "root_user"), then the -5.5% is gone, with a +2.6% instead. Do you actually need to align things inside the struct, or is it sufficient to just align the structure itself? IOW, is the cache conflicts _within_ the user_struct itself, or is it with some nearby data (like that uidhash_lock or whatever?) > One thing I don't understand is, this -5.5% only happens in > one 2 sockets, 96C/192T Cascadelake platform, as we've run > the same test on several different platforms. In therory, > the false sharing may also take effect? Is that the biggest machine you have access to? Maybe it just isn't noticeable with smaller core counts. A lot of conflict loads tend to have "exponential" behavior - when things get overloaded, performance plummets because it just makes things worse as everybody gets slower at that contention point and now it gets even more contended... Linus