Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7922285imu; Fri, 28 Dec 2018 07:20:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN5zZAm+5MPOdb102kktAymBVHWvpqJqoACRJon24MBc+lel7zuq6tO1jLP/4W2XpCYSVILb X-Received: by 2002:a63:4e15:: with SMTP id c21mr26850574pgb.50.1546010425142; Fri, 28 Dec 2018 07:20:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546010425; cv=none; d=google.com; s=arc-20160816; b=X0ui37sWQSuu8ue/2Irbv+r/mPrq5ftvOrN3dQxesE/UEeZp/W9QphBhGJ8ijM88JB bLycp+yCBgqx8eKSjvAMyuY6XXK2bNSU5WvPbKl7SSca2AMKw7GEUehX+75SAO1zrzz/ 5aVaZF1E59A9cY7xFnDDZ6M45Dgj2x7tEcKKyBMAejXqg1YLcPHNC+Mxch7rnewNSqio a5IAVdgYMHN5ghAbiN2x1xGXqIKPIFtFWSn2p9YCqX6ba0yqOOgxYaWYnM2A8JnPIWsC p5CgNC99YiilOxm6FDlOG1qft65iU8buperX2RCoH7rcrkxHn1lDKo5nU/xjKkqfME8L FkLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=BoAVU98AlnmIPwS+lxgOTWl4oGLlcpQ/kMQbI/U/PNI=; b=YnC2MKsyU96XoA70KhLcljFFVJjHE1h2m44zIb3pKpeDa433gB2JsvkQSvVVMng4b0 yqKJRLzkcQ6795WCAuxnJ4HhWb4VWRz09Lm6NMMPYPndUbyZUSyqnuanjviI8tgAO1Bi /QPLxl2qCoN+JZ4AUd91zULN6L9s3YdwNGSDh9yZ8mZcfJxTC7ncbg+1l/Oay832b4tT wQBEQsitCi8ezZIDJmsjqkP8vb7elNN84/v50F+QYFASynXC1e5JHxmIlHr5iiMdIEH0 ToAkoMWv0m580x6L9L+AUyjOSEv8V5dsg5pBAtw8Z/cB0+e+phTiAz4O8DvAEzh9854t SAtg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69si1752059pgc.164.2018.12.28.07.19.55; Fri, 28 Dec 2018 07:20:25 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728732AbeL1C73 (ORCPT + 99 others); Thu, 27 Dec 2018 21:59:29 -0500 Received: from mga11.intel.com ([192.55.52.93]:20917 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbeL1C73 (ORCPT ); Thu, 27 Dec 2018 21:59:29 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2018 18:59:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,407,1539673200"; d="scan'208";a="131172362" Received: from kemi-desktop.sh.intel.com (HELO [10.239.13.130]) ([10.239.13.130]) by fmsmga004.fm.intel.com with ESMTP; 27 Dec 2018 18:59:27 -0800 Subject: Re: [LKP] [mm] 9bc8039e71: will-it-scale.per_thread_ops -64.1% regression To: Waiman Long , Linus Torvalds , "vbabka@suse.cz" , Davidlohr Bueso Cc: "yang.shi@linux.alibaba.com" , Linux Kernel Mailing List , Matthew Wilcox , "mhocko@kernel.org" , Colin King , Andrew Morton , "ldufour@linux.vnet.ibm.com" , "lkp@01.org" , "kirill.shutemov@linux.intel.com" References: <20181105050813.GP24195@shao2-debian> <60ef3584-6f3a-1a9a-94d1-3d4a5b9f1e56@redhat.com> <25017BF213203E48912DB000DE5F5E1E76365678@SHSMSX101.ccr.corp.intel.com> <9a6fdc15-4ce1-9c55-d660-a9825b9ae104@redhat.com> From: kemi Message-ID: <8963c923-ef98-6752-6670-b9193267ca01@intel.com> Date: Fri, 28 Dec 2018 10:55:05 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <9a6fdc15-4ce1-9c55-d660-a9825b9ae104@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/12/28 上午10:55, Waiman Long wrote: > On 12/27/2018 08:31 PM, Wang, Kemi wrote: >> Hi, Waiman >> Did you post that patch? Let's see if it helps. > > I did post the patch a while ago. I will need to rebase it to a new > baseline. Will do that in a week or 2. > OK.I will take a look at it and try to rebase it on shi's patch to see if the regression can be fixed. May I know where I can get that patch, I didn't find it in my inbox. Thanks > -Longman > >> >> -----Original Message----- >> From: LKP [mailto:lkp-bounces@lists.01.org] On Behalf Of Waiman Long >> Sent: Tuesday, November 6, 2018 6:40 AM >> To: Linus Torvalds ; vbabka@suse.cz; Davidlohr Bueso >> Cc: yang.shi@linux.alibaba.com; Linux Kernel Mailing List ; Matthew Wilcox ; mhocko@kernel.org; Colin King ; Andrew Morton ; ldufour@linux.vnet.ibm.com; lkp@01.org; kirill.shutemov@linux.intel.com >> Subject: Re: [LKP] [mm] 9bc8039e71: will-it-scale.per_thread_ops -64.1% regression >> >> On 11/05/2018 05:14 PM, Linus Torvalds wrote: >>> On Mon, Nov 5, 2018 at 12:12 PM Vlastimil Babka wrote: >>>> I didn't spot an obvious mistake in the patch itself, so it looks >>>> like some bad interaction between scheduler and the mmap downgrade? >>> I'm thinking it's RWSEM_SPIN_ON_OWNER that ends up being confused by >>> the downgrade. >>> >>> It looks like the benchmark used to be basically CPU-bound, at about >>> 800% CPU, and now it's somewhere in the 200% CPU region: >>> >>> will-it-scale.time.percent_of_cpu_this_job_got >>> >>> 800 +-+-------------------------------------------------------------------+ >>> |.+.+.+.+.+.+.+. .+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.+. .+.+.+.| >>> 700 +-+ +. + | >>> | | >>> 600 +-+ | >>> | | >>> 500 +-+ | >>> | | >>> 400 +-+ | >>> | | >>> 300 +-+ | >>> | | >>> 200 O-O O O O O O | >>> | O O O O O O O O O O O O O O O O O O | >>> 100 +-+-------------------------------------------------------------------+ >>> >>> which sounds like the downgrade really messes with the "spin waiting >>> for lock" logic. >>> >>> I'm thinking it's the "wake up waiter" logic that has some bad >>> interaction with spinning, and breaks that whole optimization. >>> >>> Adding Waiman and Davidlohr to the participants, because they seem to >>> be the obvious experts in this area. >>> >>> Linus >> Optimistic spinning on rwsem is done only on writers spinning on a >> writer-owned rwsem. If a write-lock is downgraded to a read-lock, all >> the spinning waiters will quit. That may explain the drop in cpu >> utilization. I do have a old patch that enable a certain amount of >> reader spinning which may help the situation. I can rebase that and send >> it out for review if people have interest. >> >> Cheers, >> Longman >> >> >> _______________________________________________ >> LKP mailing list >> LKP@lists.01.org >> https://lists.01.org/mailman/listinfo/lkp > >