Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp431282imm; Tue, 7 Aug 2018 22:41:07 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyon2zbrBq07H1UTWl/VncbBt57k9qRvGnZIQ+jH6P9qlVRbTVGiQza6nlPNiM8E7JCY09a X-Received: by 2002:a17:902:28e4:: with SMTP id f91-v6mr1219036plb.146.1533706867361; Tue, 07 Aug 2018 22:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533706867; cv=none; d=google.com; s=arc-20160816; b=uhX0PMWPSVPnBoSzMT3QPXG4nUdh3Yk0uILW91687Hij1bCgPE+UPFMfCCPv3ddTrw 7KRkUNayBBq0TXGZSREvySJw3Ii0UG7MrNjmcAPqal+vEUGE53l+fOD4pETjfNh1rtVN /JcI1dj2B0NB5yIYeqQypeT0YVva1LPviu7eL3XrgBunvQzfT9EzFyFQy0eweRLxL94Z 8PzLJX5xNAxeFn0DGpKGFrnAfAxUsZK3Q+YV7vt7XixKkK+j6adTomrrOIk7Vm03VrUJ tms+enMrEosrJ3cQTk0wmKE8+y5Uy3NbszfH2hVo/ZOihhED4L9f+ciK4jQzHpbpE/TX 2vGw== 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 :arc-authentication-results; bh=fuFGJTwobW7U1ZIvZwW5qIhH/Zcagoxv4fUF36W0zoY=; b=ht9fZ0C6SxahXAg+2rfInFT88B3FNAFxYvKyuLMCE+gp6J31hGm5Yfk2Y8VQ5JYDxf fNFETM2O/xs4VYsR33KMwnuwEGr1/md6O3DoPHrPA4IytluT8ZYDFckmOdz5HvYdotZr Cvwjtl2I6j/W4PBhjmXXwZQnssN4DC4EmhmIn3XL1DGaZDjeeBBtKNTJLtRJMbLdQ9q/ 9uVc9HZw7RoEIkmloFAs7dyUQXbuiVLjRbjCtuZnaBmsntpiwSJXMXqcoJcQP9RiPIIk ys4S2OP85UuPJ0Q7Cn4bVSPnV1YX8nRlCf4DBpTYhF5jb+n9tALHiAknXA8eeLpgM1Hl dr7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OeMhzx1g; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w22-v6si2669534plk.512.2018.08.07.22.40.52; Tue, 07 Aug 2018 22:41:07 -0700 (PDT) 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=@google.com header.s=20161025 header.b=OeMhzx1g; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726823AbeHHH57 (ORCPT + 99 others); Wed, 8 Aug 2018 03:57:59 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:38353 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbeHHH57 (ORCPT ); Wed, 8 Aug 2018 03:57:59 -0400 Received: by mail-ua0-f193.google.com with SMTP id o11-v6so1096621uak.5 for ; Tue, 07 Aug 2018 22:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fuFGJTwobW7U1ZIvZwW5qIhH/Zcagoxv4fUF36W0zoY=; b=OeMhzx1g1sdD25Q6h81BFqBrLjyq7G6wbupgXrJY2GLbR3BoKpNml7GRQ5FaL00Ka6 MjeRAc3uS+TowYhggnpgzou/Z4cIztOYBkdIayIy6iGp/CC4bLgZtJrnio64trUu3C1x S/DkKRXSiNJ/j87HInJUnuXJjmtg7rmXk+JTD+qlv9ZMMTfIyTDqu9H52w9idNWy3a9z 8+YYsoqWbnB06UEmwDZ0qfhLx/0Mpv+iCHExyM08TCqRKDT6mq4VLnT9fyzd+DA7Y7Kl ub3RWHFgvMJNU+0WBAZTvs2TxeS3fViNsubh8YGdtLU3EplGXo8d9DMBltXB28Dqjeuq 4C5A== 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=fuFGJTwobW7U1ZIvZwW5qIhH/Zcagoxv4fUF36W0zoY=; b=rqcxURN24fGCgQ55nqkHCQYsNKYzDvHBP+TEd3UEOyf/J8PtZNCWygPiCAhL4+4UHd oFND6vlBkOsw1HV88RuqnJ5CEah0QmF7am4TRX7y8qoCrMF7nY/JRxXQS5oaccHYI1Pf HbLBsszPSK4j/da5yjTK4deZutfe+7MFPAiaUTbgSDRMGJG+RfYSJ/RV7F4aIgPhH21J kA/7McPsn5b/NvsaLpIrw2/u6sIrFovZ9TOwpzxK+8Uicu6rqaKsyAOU0m+raH4Agelb YSsvtvREJKH7EjA1KMAzTqTlS4IKuPu4pnROUFUe6yAzCrpHi4qHEutz94QDX7nJSWLW ISOg== X-Gm-Message-State: AOUpUlGFPsWM4SkoL+XOTBuNHircD0IL3EnRLeSBajXJraAtFp6jZ99/ /fPCoXP1KgXwSajZMUsKhY4VnAfTV5dl5CB3yLME5w== X-Received: by 2002:a9f:3ed9:: with SMTP id n25-v6mr934291uaj.25.1533706802317; Tue, 07 Aug 2018 22:40:02 -0700 (PDT) MIME-Version: 1.0 References: <153365347929.19074.12509495712735843805.stgit@localhost.localdomain> <20180808111224.52a451d9@canb.auug.org.au> In-Reply-To: <20180808111224.52a451d9@canb.auug.org.au> From: Shakeel Butt Date: Tue, 7 Aug 2018 22:39:50 -0700 Message-ID: Subject: Re: [PATCH RFC 00/10] Introduce lockless shrink_slab() To: Stephen Rothwell Cc: Kirill Tkhai , Andrew Morton , gregkh@linuxfoundation.org, rafael@kernel.org, Alexander Viro , "Darrick J. Wong" , Paul McKenney , josh@joshtriplett.org, Steven Rostedt , mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, Hugh Dickins , shuah@kernel.org, robh@kernel.org, ulf.hansson@linaro.org, aspriel@gmail.com, vivek.gautam@codeaurora.org, robin.murphy@arm.com, joe@perches.com, heikki.krogerus@linux.intel.com, Vladimir Davydov , Michal Hocko , Chris Wilson , Tetsuo Handa , Andrey Ryabinin , Matthew Wilcox , Huang Ying , jbacik@fb.com, Ingo Molnar , mhiramat@kernel.org, LKML , linux-fsdevel , Linux MM 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 Tue, Aug 7, 2018 at 6:12 PM Stephen Rothwell wrote: > > Hi Kirill, > > On Tue, 07 Aug 2018 18:37:19 +0300 Kirill Tkhai wrote: > > > > After bitmaps of not-empty memcg shrinkers were implemented > > (see "[PATCH v9 00/17] Improve shrink_slab() scalability..." > > series, which is already in mm tree), all the evil in perf > > trace has moved from shrink_slab() to down_read_trylock(). > > As reported by Shakeel Butt: > > > > > I created 255 memcgs, 255 ext4 mounts and made each memcg create a > > > file containing few KiBs on corresponding mount. Then in a separate > > > memcg of 200 MiB limit ran a fork-bomb. > > > > > > I ran the "perf record -ag -- sleep 60" and below are the results: > > > + 47.49% fb.sh [kernel.kallsyms] [k] down_read_trylock > > > + 30.72% fb.sh [kernel.kallsyms] [k] up_read > > > + 9.51% fb.sh [kernel.kallsyms] [k] mem_cgroup_iter > > > + 1.69% fb.sh [kernel.kallsyms] [k] shrink_node_memcg > > > + 1.35% fb.sh [kernel.kallsyms] [k] mem_cgroup_protected > > > + 1.05% fb.sh [kernel.kallsyms] [k] queued_spin_lock_slowpath > > > + 0.85% fb.sh [kernel.kallsyms] [k] _raw_spin_lock > > > + 0.78% fb.sh [kernel.kallsyms] [k] lruvec_lru_size > > > + 0.57% fb.sh [kernel.kallsyms] [k] shrink_node > > > + 0.54% fb.sh [kernel.kallsyms] [k] queue_work_on > > > + 0.46% fb.sh [kernel.kallsyms] [k] shrink_slab_memcg > > > > The patchset continues to improve shrink_slab() scalability and makes > > it lockless completely. Here are several steps for that: > > So do you have any numbers for after theses changes? > I will do the same experiment as before with these patches sometime this or next week. BTW Kirill, thanks for pushing this. regards, Shakeel