From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbdI1VCd (ORCPT ); Thu, 28 Sep 2017 17:02:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48194 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbdI1VCb (ORCPT ); Thu, 28 Sep 2017 17:02:31 -0400 Date: Thu, 28 Sep 2017 14:02:30 -0700 From: Andrew Morton To: Kirill Tkhai Cc: vdavydov.dev@gmail.com, apolyakov@beget.ru, linux-kernel@vger.kernel.org, linux-mm@kvack.org, aryabinin@virtuozzo.com Subject: Re: [PATCH] mm: Make count list_lru_one::nr_items lockless Message-Id: <20170928140230.a9a0cd44a09eae9441a83bdc@linux-foundation.org> In-Reply-To: References: <150583358557.26700.8490036563698102569.stgit@localhost.localdomain> <20170927141530.25286286fb92a2573c4b548f@linux-foundation.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Sep 2017 10:48:55 +0300 Kirill Tkhai wrote: > >> This patch aims to make super_cache_count() (and other functions, > >> which count LRU nr_items) more effective. > >> It allows list_lru_node::memcg_lrus to be RCU-accessed, and makes > >> __list_lru_count_one() count nr_items lockless to minimize > >> overhead introduced by locking operation, and to make parallel > >> reclaims more scalable. > > > > And... what were the effects of the patch? Did you not run the same > > performance tests after applying it? > > I've just detected the such high usage of shrink slab on production node. It's rather > difficult to make it use another kernel, than it uses, only kpatches are possible. > So, I haven't estimated how it acts on node's performance. > On test node I see, that the patch obviously removes raw_spin_lock from perf profile. > So, it's a little bit untested in this way. Well that's a problem. The patch increases list_lru.o text size by a lot (4800->5696) which will have a cost. And we don't have proof that any benefit is worth that cost. It shouldn't be too hard to cook up a synthetic test to trigger memcg slab reclaim and then run a before-n-after benchmark?