Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1119071imu; Mon, 5 Nov 2018 14:16:57 -0800 (PST) X-Google-Smtp-Source: AJdET5dRlK0rQGWOPLOC895fGXRkLeb+Szab7UJQglQg5/aXt8/eJZgbJppmnHzyrUc9wCLBU9HI X-Received: by 2002:a63:4926:: with SMTP id w38mr954659pga.353.1541456217197; Mon, 05 Nov 2018 14:16:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541456217; cv=none; d=google.com; s=arc-20160816; b=XpMw0Lja/JWZKvCERgj/PuoIlcGwy4d3kr+CoVe/v38HCDs51tapkTwtYrkL4VZXfv Z7xNHGrgno/EH+b0wDr1ot6bB0CYgP3xlkHOOFU9MnNbJVhM0MENO17nFYtdwEOfuy15 pIRNANPWQgh4oEucyr/NSzMAJai2WQKrs3nQapyIvE85PM9O+pAUekk2G8upmZxTMxmd Tbe7M9byIDGiMleQokJ5n/L+6m+c/bCF07+829PwK6//X/V1RxSnxxI4bCHPKyw1lK4C fN1ul7Ziys2TMeJ7HPDu7/URpNtNvj0SIKzT2UnM7W3BJScjZg8u1sfC62T2HugHvVn9 qgBQ== 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=iS9HcM7scadamVAkyGmxnkQhRhD2ci3kYLJ1wJh3zV4=; b=XWDyhTLN/K05xdw2g6jmZ7QSr7635qpDwvriIpU+flSDwdtP5mZckjO1IspdhsPinR YN2CsKdI9pBS5E4zxong9aLMTzXX5dyqQJa4cgIFOav0QcZ5m+Rb/N8/EEoprwUpvD0v Ffq4YkYsJbNpUQ15TpdvteE4qoXOcBbfNWMwH4cyfLVICabfZIsYp29XnTWgYdgiunfN f/t7wdi/5e0yK1R5FUSKjpv5V1zeHl7UoIP32s8ZYTlXbJMGBNyUObOU+Fit7R5Mqj57 8V8pyBcFC/O1QqN+WkZp9MlMEYf3g63S5Th87v72fDBD7Bs9+ZndBxDpV6LLliBThs+J 1v/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Rt030h6/"; 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 61-v6si16086407plz.40.2018.11.05.14.16.42; Mon, 05 Nov 2018 14:16:57 -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="Rt030h6/"; 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 S2388198AbeKFHgq (ORCPT + 99 others); Tue, 6 Nov 2018 02:36:46 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:33621 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387768AbeKFHgq (ORCPT ); Tue, 6 Nov 2018 02:36:46 -0500 Received: by mail-lf1-f65.google.com with SMTP id i26so7385967lfc.0 for ; Mon, 05 Nov 2018 14:14:53 -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=iS9HcM7scadamVAkyGmxnkQhRhD2ci3kYLJ1wJh3zV4=; b=Rt030h6/y/mGymyVCvKnQiOzl9WMlaFRh7YniAVTPUg24ly9F5It7Wmn8wCdg/47nc JUIRTz2MzKp66QNpmeXFJwUgtojLJ4JRnWz6lM+kigI8L7jxtwiO7zlQkN8ZJ9yoibzV f+FBusGUiqgIZvysA0G+1T2bUCxpqUM8mQyu0= 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=iS9HcM7scadamVAkyGmxnkQhRhD2ci3kYLJ1wJh3zV4=; b=n4EYMlR5k+ff4G0o098fhTOlwnpUQwwEzopUPGG8a74TUxlbw9m6wJlu/RKrdZPVdn kGb8eRdKLYCyjMFoH2QZiNFeEs9Vr1EkU/y2W80828RHtPCRSo52wQnP47bGbW80pwO5 6xOTOWjBNN012cC++zv7nbxE2SADAZu5wK9GY3x/BcC30saKvmgf5771mU/NqJTxSNf2 ypI2qzelCgvR1uVRGAn3lDqaoG00TUg0jSvppgd4cs+hviDp5s7nlHL/FRE+X9xAbSB6 zb6cCJGqyhntJnorLf11P83pupJLR1A6jN/j6jByWdrGwXFc7g7skME5703n46cJUWBl TxTw== X-Gm-Message-State: AGRZ1gLYqrLNsGQKvtDpPgHnjbp8RCfHRLUsFYcTKoKDoUQIeuR4uyNg mQftUaK5KzmmxO9nnZhuhLJi83U68lOBkg== X-Received: by 2002:a19:4287:: with SMTP id p129mr14281927lfa.135.1541456092742; Mon, 05 Nov 2018 14:14:52 -0800 (PST) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id r69sm502541lfi.15.2018.11.05.14.14.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 14:14:50 -0800 (PST) Received: by mail-lj1-f175.google.com with SMTP id t9-v6so6383925ljh.6 for ; Mon, 05 Nov 2018 14:14:50 -0800 (PST) X-Received: by 2002:a2e:9983:: with SMTP id w3-v6mr16710377lji.133.1541456089708; Mon, 05 Nov 2018 14:14:49 -0800 (PST) MIME-Version: 1.0 References: <20181105050813.GP24195@shao2-debian> In-Reply-To: From: Linus Torvalds Date: Mon, 5 Nov 2018 14:14:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [LKP] [mm] 9bc8039e71: will-it-scale.per_thread_ops -64.1% regression To: vbabka@suse.cz, Davidlohr Bueso , Waiman Long Cc: rong.a.chen@intel.com, yang.shi@linux.alibaba.com, kirill.shutemov@linux.intel.com, mhocko@kernel.org, Matthew Wilcox , ldufour@linux.vnet.ibm.com, Colin King , Andrew Morton , Linux Kernel Mailing List , lkp@01.org 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 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