Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp7295pxk; Tue, 8 Sep 2020 19:45:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHoytKbN3PVBTiujnOczJr9Op4J5kn7d4ykJ/F1nkHtqlNED/eJsXTwr8kRlIztlKvGcbL X-Received: by 2002:a17:906:46d5:: with SMTP id k21mr1433185ejs.247.1599619546837; Tue, 08 Sep 2020 19:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599619546; cv=none; d=google.com; s=arc-20160816; b=BsVE/qhwCofJL2PIFG6nfUA54+TIUBuXAB8C1c7ZX/PD40nH29X06txhB1QdPX0xmS oE1F42jsHCSWRSCfzkAw4wFjaJEywo2xdqD8xS6vnPu+FhEtAZXnNnRNKwO4CEHzNoUB qcOCAjAbwpN5e+99iriu3ed7HThoMnKBSYCFOFysrWNc6nt/ZiQlCe2ErbMViTDjpllz QRrveqZX6H45NpPTRiAJxx+TnmZa9Uzq6RiUrfW0NyeX+OO27lozLlppYji2Ix/Kx4YP Ja+cd7iJxlTt7HgvIub8navvtIVgiM82GECvOMQYqAHIgAl/sNwP6YJiEt2DvR6Kwr+U 2e0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0ZdmUVaaik0Cd28h3Zbe2m43Ssgf1GR/sAhP0i4ZEkE=; b=n94JjpOHLWuyW01JzOBsL+VERHmYGCQyFES6acLDIuc5THoqyb3U1AOUd5v9tQq6ll YbGh2F5FzJlhjWyETZzgZt7BvsE5VCxs07J4UDiHHB7hZEAUnhXgJ2jidGDs+jjeWLUR ODulv35yV0kKthpNPDDIhOkGWT7wvQVJoynVFgOWsGiPQA2gtxSoNt7UPLMJgxop7ya2 JBgRZv0oqGjBPQocJqyXsV15vnvanudx62HMYWWC63nvavua1MIfNM/5Xg9Q0emJmNBe hdtVw1tlESYuvDzRHcjcNecCWWStiljIXx/QXSOv0Xoo4IcFztRafUAoD9eh3xNpmypZ 6zwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AnELXMNt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si636779ejv.148.2020.09.08.19.45.24; Tue, 08 Sep 2020 19:45:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AnELXMNt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728405AbgIICoo (ORCPT + 99 others); Tue, 8 Sep 2020 22:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbgIICon (ORCPT ); Tue, 8 Sep 2020 22:44:43 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC6D9C061573; Tue, 8 Sep 2020 19:44:42 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id m8so976523pgi.3; Tue, 08 Sep 2020 19:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0ZdmUVaaik0Cd28h3Zbe2m43Ssgf1GR/sAhP0i4ZEkE=; b=AnELXMNtpHPPvFIglx8F3SVHWevil/Qj/z/vpbBRAvIn5Z+8QZvRRdtDrnet3+bsLM 5mCLGxCFpyFhqz95Hx4U4HTvz5lQjzyhOuSdSEsfTMrNQimYLdlqYew1C5g66rd5/su2 CNH0k30TqQpa5zqkDQirUnbrGnTL0LJeLOdkLsfi2Z7BI4YZu/TDAbvV38KLLXcrhNH6 zfotW278dwua1xutDu6WQ4z4I55XsYNz9vIlb2ToKsKtYIXaTYjXBj6Dr7qzfXmWutZN ZY89N3EA5hpaqooLt1MKRRrIEkQhWYLwuREAdK6vuhA2hQvMXg+kaJBSOiAgPVm5ebo/ hrTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0ZdmUVaaik0Cd28h3Zbe2m43Ssgf1GR/sAhP0i4ZEkE=; b=lgUfN4KK0n3awGsKwwYCRGSK7EgB2/HCL5KDe0Y/VbGLHdSuNn4kwULEnHrRC05B6K wK4B1vU7sDFXfKHa+yFBIbvU/qaRh7wjsUY7oQN8fB+bydxGWQcke4fBsr4YdCq4Gxgr RBJr4B141tzsqzjuidOy6mw+IhJsQLzRnQs4uOEaVHfZJ1PMq/gh0xFTgLObasKBCHoA sOSKsWaHwHFFo5z8CbBwqSyJe3MJOZHYKnuL5cRh8PGKl1Ql3VsaZUIrdqtjlaoyf0bR QCZC3IaM6c9+EOJOkpsQwc61fP8jIREfuB7+8ZUkilE43mHQrAdc/JBsdrn9qq85DWNm S1dQ== X-Gm-Message-State: AOAM531aZVaRWKbnCyeUXsA+neHxGluxzFHIHEguM+XNygZ0lQhXjPTu Xo5Rjbv1qfQAYvm1TfujVdk= X-Received: by 2002:a63:110c:: with SMTP id g12mr1261586pgl.91.1599619482359; Tue, 08 Sep 2020 19:44:42 -0700 (PDT) Received: from desktop-ziqianlu ([47.89.83.67]) by smtp.gmail.com with ESMTPSA id m190sm684741pfm.184.2020.09.08.19.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 19:44:41 -0700 (PDT) Date: Wed, 9 Sep 2020 10:44:32 +0800 From: Aaron Lu To: Daniel Jordan Cc: Alex Shi , Hugh Dickins , Andrew Morton , mgorman@techsingularity.net, tj@kernel.org, khlebnikov@yandex-team.ru, willy@infradead.org, hannes@cmpxchg.org, lkp@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, shakeelb@google.com, iamjoonsoo.kim@lge.com, richard.weiyang@gmail.com, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com, mhocko@suse.com, vdavydov.dev@gmail.com, shy828301@gmail.com Subject: Re: [PATCH v18 00/32] per memcg lru_lock Message-ID: <20200909024432.GA9736@desktop-ziqianlu> References: <1598273705-69124-1-git-send-email-alex.shi@linux.alibaba.com> <20200824114204.cc796ca182db95809dd70a47@linux-foundation.org> <20200825015627.3c3pnwauqznnp3gc@ca-dmjordan1.us.oracle.com> <20200826011946.spknwjt44d2szrdo@ca-dmjordan1.us.oracle.com> <01ed6e45-3853-dcba-61cb-b429a49a7572@linux.alibaba.com> <20200828014022.y5xju6weysqpzxd2@ca-dmjordan1.us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200828014022.y5xju6weysqpzxd2@ca-dmjordan1.us.oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 09:40:22PM -0400, Daniel Jordan wrote: > I went back to your v1 post to see what motivated you originally, and you had > some results from aim9 but nothing about where this reared its head in the > first place. How did you discover the bottleneck? I'm just curious about how > lru_lock hurts in practice. I think making lru_lock per-memcg helps in colocated environment: some workloads are of high priority while some workloads are of low priority. For these low priority workloads, we may even want to use some swap for it to save memory and this can cause frequent alloc/reclaim, depending on its workingset etc. and these alloc/reclaim need to hold the global lru lock and zone lock. And then when the high priority workloads do page fault, their performance can be adversely affected and that is not acceptible since these high priority workloads normally have strict SLA requirement.