From patchwork Fri Jun 1 07:26:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lu X-Patchwork-Id: 10442559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 55685602BD for ; Fri, 1 Jun 2018 07:26:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BB0228D53 for ; Fri, 1 Jun 2018 07:26:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FDAF28D60; Fri, 1 Jun 2018 07:26:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF0EF28D53 for ; Fri, 1 Jun 2018 07:26:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A5D0D6B0007; Fri, 1 Jun 2018 03:26:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A0DBC6B0008; Fri, 1 Jun 2018 03:26:07 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FD5B6B000A; Fri, 1 Jun 2018 03:26:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f72.google.com (mail-pl0-f72.google.com [209.85.160.72]) by kanga.kvack.org (Postfix) with ESMTP id 526DA6B0007 for ; Fri, 1 Jun 2018 03:26:07 -0400 (EDT) Received: by mail-pl0-f72.google.com with SMTP id 31-v6so14880095plf.19 for ; Fri, 01 Jun 2018 00:26:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:date:from:to :cc:subject:message-id:references:mime-version:content-disposition :in-reply-to:user-agent; bh=2has8zB/wOnZWN3aASSCL23GEBlSpjuBLy8B8cgmwkE=; b=m+/tLGzDBVx/yREWZuwqJWEOXQOsk5XuydZzn42FGL1eYRFJGjsOycbmV01Ic7foBr wUmR8lAdPKKKF+L1INk5EKXljcielKrf3QMmikrs7DpYNJq5JssnbdSX8+Jp5b9ld/97 FjnPDByeMWbcRImLBCnksTorsA/Ewqoq2y/zM0q85qV9u8GHGPNAgDqCUzQJ6eLGLNuO Zm2coDRCPMqO8aZbO/1YjCUu2WmBKwJeW695LqUtFcMvnhr4H/9TA19RwzYQL/puAncn 4LBTQGg/A0WJRISbdcjIyBEcpMLYH2i9gMDwV+7Ha9KxjqEAs7g9F5hawK8pbuNuB5gL uaRQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of aaron.lu@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=aaron.lu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: ALKqPwcr54c9NvQRWggq8C74rJ4RpPbkIwJJphjph8IB5U7Pu3I2FoV+ RsiPLWs/f7PkyI28poX/i8i00jV3DS0gX0dWXBoRB9SEH+NwXVxouG7AYtUymOqVhxHzP7YNBBC mxqog37ZO2PaZM5XgVJ3y5NAHoQMh9DmJjm+mXKtOvxNyjlA+oYlD2gOVDKvr3MLLvQ== X-Received: by 2002:a63:744c:: with SMTP id e12-v6mr8024468pgn.4.1527837966999; Fri, 01 Jun 2018 00:26:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJrb/BhpGivvTe6eDfP7bB6J3xMJ47o98fE3zcR3OSXO8Ma2z4/WOBFh0toL6KRNq+KUO7W X-Received: by 2002:a63:744c:: with SMTP id e12-v6mr8024441pgn.4.1527837966194; Fri, 01 Jun 2018 00:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527837966; cv=none; d=google.com; s=arc-20160816; b=CT0GEK2Pw3s+9yREIl9WzrNIVGPMwOFnNTd0xp1v0lK1SmCo7GkWvKxdjHqxNKlAhc B+hrBAHF1IIzpF22Y3Bpj4V1PYT9XsRZ6vn+rhc8bj6h8kyYXp/4uw0xlRP2xWNoVxKE 9TRwe85ShvhXO7TyzOvvU7LO5Ms8lPYxEF2lXmMGewrZjbdtivEEp7e2tV0rohBySd+9 19r2z6ZyzNHxjzIijoqI3ibJl6UNiXlYQVaX/oZVkk8v9KBwQN0dFOtT/0CVCpGD5T5j AS0qkgRVCWKeHOW+MM///JpJneyY5ntkyuw/r4KKujkYWtOQ28+sRldWnH7lK9bDJk55 ZvWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:arc-authentication-results; bh=2has8zB/wOnZWN3aASSCL23GEBlSpjuBLy8B8cgmwkE=; b=afQ2sdL/CdsznzPcHZzEtWyaboJd2FE32YmnmCgU7KNTdkpEyPKrtcrdi8mn08aXyd +/uehAr8M4HB+ZcUwtcCuHTYGNwTWBq/c07wcJdLF6nlaWHbYuNMsqvv5It87D1nG3ud C+ofLY6Y2l0ZZJcvkLiF/M+zEn4bF0cdHI9CpA28t9woDkPWpiobDAtmRN8/iDpJ61Bv KWT3e+zVJpY1/uzBtqIZIfIQbZuZa+06NyZONbhDfJ+kmpwZZqItcX0zDlHR74DP6LFP WTMNxmClckHaNWenizr9iI8r0N1JELjLyPtiM728MxuDme+Coso32xeYpvlVeCeJ0A/W U37w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of aaron.lu@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=aaron.lu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga11.intel.com (mga11.intel.com. [192.55.52.93]) by mx.google.com with ESMTPS id v18-v6si39065055plo.285.2018.06.01.00.26.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 00:26:06 -0700 (PDT) Received-SPF: pass (google.com: domain of aaron.lu@intel.com designates 192.55.52.93 as permitted sender) client-ip=192.55.52.93; Authentication-Results: mx.google.com; spf=pass (google.com: domain of aaron.lu@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=aaron.lu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2018 00:26:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,465,1520924400"; d="scan'208";a="43855683" Received: from aaronlu.sh.intel.com (HELO intel.com) ([10.239.159.135]) by fmsmga007.fm.intel.com with ESMTP; 01 Jun 2018 00:26:04 -0700 Date: Fri, 1 Jun 2018 15:26:04 +0800 From: Aaron Lu To: kernel test robot Cc: Tejun Heo , lkp@01.org, LKML , Michal Hocko , linux-mm@kvack.org Subject: Re: [LKP] [lkp-robot] [mm, memcontrol] 309fe96bfc: vm-scalability.throughput +23.0% improvement Message-ID: <20180601072604.GB27302@intel.com> References: <20180528114019.GF9904@yexl-desktop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180528114019.GF9904@yexl-desktop> User-Agent: Mutt/1.9.5 (2018-04-13) 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: X-Virus-Scanned: ClamAV using ClamSMTP On Mon, May 28, 2018 at 07:40:19PM +0800, kernel test robot wrote: > > Greeting, > > FYI, we noticed a +23.0% improvement of vm-scalability.throughput due to commit: > > > commit: 309fe96bfc0ae387f53612927a8f0dc3eb056efd ("mm, memcontrol: implement memory.swap.events") > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master > > in testcase: vm-scalability > on test machine: 144 threads Intel(R) Xeon(R) CPU E7-8890 v3 @ 2.50GHz with 512G memory > with following parameters: > > runtime: 300s > size: 1T > test: lru-shm > cpufreq_governor: performance > > test-description: The motivation behind this suite is to exercise functions and regions of the mm/ of the Linux kernel which are of interest to us. > test-url: https://git.kernel.org/cgit/linux/kernel/git/wfg/vm-scalability.git/ > With the patch I just sent out: "mem_cgroup: make sure moving_account, move_lock_task and stat_cpu in the same cacheline" Applying this commit on top doesn't yield 23% improvement any more, but a 6% performace drop... I found the culprit being the following one line introduced in this commit: diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d90b0201a8c4..07ab974c0a49 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6019,13 +6019,17 @@ int mem_cgroup_try_charge_swap(struct page *page, swp_entry_t entry) if (!memcg) return 0; - if (!entry.val) + if (!entry.val) { + memcg_memory_event(memcg, MEMCG_SWAP_FAIL); return 0; + } memcg = mem_cgroup_id_get_online(memcg); If I remove that memcg_memory_event() call, performance will restore. It's beyond my understanding why this code path matters since there is no swap device setup in the test machine so I don't see how possible get_swap_page() could ever be called. Still investigating...