Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp762061ybc; Tue, 19 Nov 2019 08:51:52 -0800 (PST) X-Google-Smtp-Source: APXvYqz8pN0PaoLPxw0KTz7gVREUzz8qk5p8WO9E0bVhF357W2qgmqoQ5S/knRp/tAftb6rJ5++g X-Received: by 2002:a5d:5306:: with SMTP id e6mr37436002wrv.187.1574182312121; Tue, 19 Nov 2019 08:51:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574182312; cv=none; d=google.com; s=arc-20160816; b=GpmyDcPjJ7xdHzZzcF2TcKQVQic2GHLBn2xmaaGFjujHrE+DoFqUKuLSXuxkfUp30D zZvliKCZrBQqo0pj4YcpzK/KdIMZCWaTfLxmO20CVlWa19+LGmRxL7yMxoLn1xkehKyc hZC/0V98X0yZB6m0YNtyrP+sAgJXLSq/aBJBpNE1DJl+HXvh3xWw2zCmrZIJ1ZPR+qY0 oCQINIGBb0xpUuzrQDwMWfbAc4M0afksrPlsyjVnYn8Q4yr//sv122xLNRPWY0LYUtm7 bIzJs0QExzF5WixceOsXcw/FZL4Qu71kZrGHzLoOf2xm2G/LKE25K1Iqyein02mNJY66 2JeQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xTSI3K4thH+dUGZBU/j6hslBPPzRGNTIfM5lXqXhgmU=; b=wXTwAaqV4fARn7+Tt+z18ETtzh5q+6I5vgXdB4PMePib0Vy6Fdzw5ZuJ3WOZbwCSdB JC2JrpjjVo6pStnefA4p4g4xuGfE0GC/cPlQYaHfrPo8NtCpfln6vgAlhFI2L5VULxLE XJsPEEO25A+S/MpjSrK+k3UUS0srqXwGKO+X31VmSBAhj/Fxglvw0vtGSy3dqu9BAVwO oPGEyMqBhAwQBRFndV9hqBt2nvI2fJc0yzNdv9qdrUIgKlYCPp32HBeJFOwvO4nO+XkA O20sd7C3zL2UqaPlCZsi9xwBKxBQS7P8U9EPKnBwNw8rfIz44oZSrxwmB+fSJmeB8TZA aTbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nLO0j7Gg; 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 d28si15689181edb.10.2019.11.19.08.51.27; Tue, 19 Nov 2019 08:51:52 -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=@google.com header.s=20161025 header.b=nLO0j7Gg; 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 S1728459AbfKSQts (ORCPT + 99 others); Tue, 19 Nov 2019 11:49:48 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:40189 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbfKSQtr (ORCPT ); Tue, 19 Nov 2019 11:49:47 -0500 Received: by mail-ot1-f65.google.com with SMTP id m15so18466468otq.7 for ; Tue, 19 Nov 2019 08:49:46 -0800 (PST) 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:content-transfer-encoding; bh=xTSI3K4thH+dUGZBU/j6hslBPPzRGNTIfM5lXqXhgmU=; b=nLO0j7Gg0I4t2Cwt7ZY4AmeHh+8e+5HrEz65UbBvjuE5gjjl3g0SEF2i93MCVB5gXA lUjFrjYHHZ7qMKnUMS2tkQoUfe4RU1yx/FVi/vXctllao1EVx0erNqphH2gvvXJ5UpVA /hKrFLc5Xolw/tcSpWvt4E0vbM4C/jjPTyEBxD0otVIUPDDIx0YJqEFYifVydKMdXpCO gRUeqP0Sy82tWw8eQvh3FsOyJCZisrf6vHeAPfBaszfGzxBfr+lRZ7e/jZVslvWlTRzS 0QSvsOKyOb9RJ4mxNzlRl/c39ddBbBmkFzZ9JREw7bhXl1xIsXnIx2f1K0nQ8iQIXiad UdcQ== 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:content-transfer-encoding; bh=xTSI3K4thH+dUGZBU/j6hslBPPzRGNTIfM5lXqXhgmU=; b=AxjeOOOLdO5VH1vXm092VqM7QFXY/FHZ7tM4T5s6bsN/BUxj+McJ8FL1dJIjyR3yeb cVC3A5yjxYC4KHY4xVRWc54TilUawGJ71ak2Gv7n9m22PLMZ3E1tEcSPs4ZacIQbPmqP PlYaFO83zKcv7OZn/VDrZJMa4VQeJeKghs76ccxai7FVWlDoLiUBI+mlivRPVMrcL/wL wTEv+EnEYFksQDeK+JFPehrGKZD/k/t8nsPPwLlFwsrEEVXVlG8esFfTEcbFhYfcotqn f2dL/Jldnz5HUor2MaskJiNe50h8vC3TWFMFXetNGXGPXpy4eN+luVB2EQ3r0GLlhpjo WSIQ== X-Gm-Message-State: APjAAAWLWck0pY+V6g+0JpDSp6tMq/fbaMLbMfQy7X1w1oOSG9PpeRsR nbipRN1JdGqvdrzXEtuKrV/zVK6eSY9SdYM5p2mzrg== X-Received: by 2002:a9d:66d9:: with SMTP id t25mr4780662otm.30.1574182186119; Tue, 19 Nov 2019 08:49:46 -0800 (PST) MIME-Version: 1.0 References: <1574166203-151975-1-git-send-email-alex.shi@linux.alibaba.com> <1574166203-151975-4-git-send-email-alex.shi@linux.alibaba.com> In-Reply-To: <1574166203-151975-4-git-send-email-alex.shi@linux.alibaba.com> From: Shakeel Butt Date: Tue, 19 Nov 2019 08:49:34 -0800 Message-ID: Subject: Re: [PATCH v4 3/9] mm/lru: replace pgdat lru_lock with lruvec lock To: Alex Shi Cc: Cgroups , LKML , Linux MM , Andrew Morton , Mel Gorman , Tejun Heo , Hugh Dickins , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Matthew Wilcox , Johannes Weiner , Michal Hocko , Vladimir Davydov , Roman Gushchin , Chris Down , Thomas Gleixner , Vlastimil Babka , Qian Cai , Andrey Ryabinin , "Kirill A. Shutemov" , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Andrea Arcangeli , David Rientjes , "Aneesh Kumar K.V" , swkhack , "Potyra, Stefan" , Mike Rapoport , Stephen Rothwell , Colin Ian King , Jason Gunthorpe , Mauro Carvalho Chehab , Peng Fan , Nikolay Borisov , Ira Weiny , Kirill Tkhai , Yafang Shao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 19, 2019 at 4:24 AM Alex Shi wrote= : > > This patchset move lru_lock into lruvec, give a lru_lock for each of > lruvec, thus bring a lru_lock for each of memcg per node. > > This is the main patch to replace per node lru_lock with per memcg > lruvec lock. > > We introduce function lock_page_lruvec, it's same as vanilla pgdat lock > when memory cgroup unset, w/o memcg, the function will keep repin the > lruvec's lock to guard from page->mem_cgroup changes in page > migrations between memcgs. (Thanks Hugh Dickins and Konstantin > Khlebnikov reminder on this. Than the core logical is same as their > previous patchs) > > According to Daniel Jordan's suggestion, I run 64 'dd' with on 32 > containers on my 2s* 8 core * HT box with the modefied case: > https://git.kernel.org/pub/scm/linux/kernel/git/wfg/vm-scalability.git/= tree/case-lru-file-readtwice > > With this and later patches, the dd performance is 144MB/s, the vanilla > kernel performance is 123MB/s. 17% performance increased. > > Signed-off-by: Alex Shi > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: Vladimir Davydov > Cc: Andrew Morton > Cc: Roman Gushchin > Cc: Shakeel Butt > Cc: Chris Down > Cc: Thomas Gleixner > Cc: Mel Gorman > Cc: Vlastimil Babka > Cc: Qian Cai > Cc: Andrey Ryabinin > Cc: "Kirill A. Shutemov" > Cc: "J=C3=A9r=C3=B4me Glisse" > Cc: Andrea Arcangeli > Cc: Yang Shi > Cc: David Rientjes > Cc: "Aneesh Kumar K.V" > Cc: swkhack > Cc: "Potyra, Stefan" > Cc: Mike Rapoport > Cc: Stephen Rothwell > Cc: Colin Ian King > Cc: Jason Gunthorpe > Cc: Mauro Carvalho Chehab > Cc: Matthew Wilcox > Cc: Peng Fan > Cc: Nikolay Borisov > Cc: Ira Weiny > Cc: Kirill Tkhai > Cc: Yafang Shao > Cc: Konstantin Khlebnikov > Cc: Hugh Dickins > Cc: Tejun Heo > Cc: linux-kernel@vger.kernel.org > Cc: linux-mm@kvack.org > Cc: cgroups@vger.kernel.org This patch (and series) still have unsafe accesses to lruvec. Alex, I was hoping that you would drop this series in favor of Hugh's patches. Anyways I will post Hugh patches for review to be considered for 5.6. I will run a couple of performance experiments. Shakeel