Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4301199ybl; Tue, 20 Aug 2019 09:50:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqypWWs8AfTSGaHNONqQ7jiv/QWrNCX2RRtJ13w/TMwSpHZ/M9N9Xz0581KBH03iQcnGXuED X-Received: by 2002:a63:1d4:: with SMTP id 203mr25289939pgb.441.1566319809057; Tue, 20 Aug 2019 09:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566319809; cv=none; d=google.com; s=arc-20160816; b=bXYo6EGDOpDS1tUfb5DYoBzjIVvVTrWkl6rmDkzHYU360kuRcOPaRRplbfXR4U4/Ol Wc6nd6EeP5Jx0w7wFy8f3yAtum9bbyR6a/v6LZoQS4+NqG/bA80uwDWFHnnHUIKfBOT1 c3q1+ZXeBmp9MSZPK3zDcxxI4CIXVZN0GtraplV4+rO8vvj08ge/G5UGbHYh3mZYJXdp K+mu3VRNttJhGL+gdrEVCIJ1ajMHMboppnqF4/60NlhZwUUs/+w/NAURexnjE86dnWLN lIB7Bd7yMOycxHod8LRLUuvxDj0xhckcOWsbiuKJ6VowECy170Y9iDTar6hmL7fXi/M5 pgyA== 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=HfS/3YweTIcGGO2RRMlCPJRIxqMja+WwkZZpwCr9I0U=; b=F9y2vFPcwi6Ad8N3KUVpau159jvtM4o71Yp905Ra3NoB9EMzB14SNhHzCGTuV74EVW BKM2ZnZLTQgmkZzEGQuy5AvyGgl+MycQWxTi4iGPySZSAMNWus4cTfprrLhpdontK5Zj FP5pHj3xGPqctLqbVPCPk6PIrklDbvo1boTwlYnejfTXivgLTpxi8GBRLTHcmtZg5/bs 0VQUaejSHBTYeJ8u7JqBpqdNtAhgcrG1Cre3gzLsiTqAKH2SunOoutH+fknfY49cVCUG KuByKl+7IjHbf++6z4Jiqmiwso9HNtk6IfCrcUYALx0wslManYxG4Aqqdtj202ddwZiF o34Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=K+mam5zv; 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 71si12802327plf.156.2019.08.20.09.49.53; Tue, 20 Aug 2019 09:50:09 -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=K+mam5zv; 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 S1730020AbfHTQsx (ORCPT + 99 others); Tue, 20 Aug 2019 12:48:53 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:43334 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbfHTQsw (ORCPT ); Tue, 20 Aug 2019 12:48:52 -0400 Received: by mail-yb1-f196.google.com with SMTP id o82so2294849ybg.10 for ; Tue, 20 Aug 2019 09:48:52 -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=HfS/3YweTIcGGO2RRMlCPJRIxqMja+WwkZZpwCr9I0U=; b=K+mam5zvf/E3cU2LIDxXZWug/rqk3N2IZZ43MXOq44SNotDZn+byvLHrUFInHkDO7K krZMi68j2Wv9KleBJmISlXyAtf+AWs9TyWORM/Is9r/JWDOIisvRoaxJKLMa9X2+DkSD X8/9HsIrCN6cY1UKIUVTesBhBp4i3524bVcclEQ++s0bi/yh5/iX8yzTgk/KVOUmV0on 7IlLZhBsYqtAIBE6vQRbijMnbR9VYedqBUFYnNM8Rbdx/bhjrOR+OtiJMEX84yYFHCtT KdyACLP9WpPoCaDmJFCRZjVP1xzZkn+G18umMyHY3eO4qR19pRTmM/TC8TB1C0CiILyZ TXzg== 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=HfS/3YweTIcGGO2RRMlCPJRIxqMja+WwkZZpwCr9I0U=; b=Wthu8y+PiHytJqFSWMx9xKlPYEyQ9/6jSQlIo9xPw6I6x9hdYLWvNStWL/JSdYPa/j 7Te+bxzsQdZUtK+dSlfGF0y8ui8Evt+1CRmD1is7E0ChV50J6llg30y0S8BzOkNRQC/i AbEgH83bCg8fGLXFBZQAzrb0cCvhbJ2QF0wRYlfRSBQSBlgfcDizpBKaSrXKVRmwW5eU /sIkXa0cbJ9f0mONJBhxEQZ++qrBrnoCsseyCTSHOj709+vUX0zejHGvxjF1Yp6YU9SK lxU9lK+iSns53l916bUzw4r/hqEgCi8WD6g4phf9soLndxPR+8+skPviZ9+3Y+cbvwRx c6Mw== X-Gm-Message-State: APjAAAU8rml+tpdPTkzg1WE6XuJ5GNqRyPU5cwz+o4kTR0I43E7kZ+5m jDNPjazM6ESHW4W3MRrOLXypSgyI+YB6oD4Ls4JF2w== X-Received: by 2002:a25:f503:: with SMTP id a3mr21166644ybe.358.1566319731656; Tue, 20 Aug 2019 09:48:51 -0700 (PDT) MIME-Version: 1.0 References: <1566294517-86418-1-git-send-email-alex.shi@linux.alibaba.com> <20190820104532.GP3111@dhcp22.suse.cz> In-Reply-To: <20190820104532.GP3111@dhcp22.suse.cz> From: Shakeel Butt Date: Tue, 20 Aug 2019 09:48:40 -0700 Message-ID: Subject: Re: [PATCH 00/14] per memcg lru_lock To: Michal Hocko Cc: Alex Shi , Cgroups , LKML , Linux MM , Andrew Morton , Mel Gorman , Tejun Heo , Hugh Dickins 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 20, 2019 at 3:45 AM Michal Hocko wrote: > > On Tue 20-08-19 17:48:23, 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 memcg lru_lock would ease the lru_lock contention a lot in > > this patch series. > > > > In some data center, containers are used widely to deploy different kind > > of services, then multiple memcgs share per node pgdat->lru_lock which > > cause heavy lock contentions when doing lru operation. > > Having some real world workloads numbers would be more than useful > for a non trivial change like this. I believe googlers have tried > something like this in the past but then didn't have really a good > example of workloads that benefit. I might misremember though. Cc Hugh. > We, at Google, have been using per-memcg lru locks for more than 7 years. Per-memcg lru locks are really beneficial for providing performance isolation if there are multiple distinct jobs/memcgs running on large machines. We are planning to upstream our internal implementation. I will let Hugh comment on that. thanks, Shakeel