Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp536177ybt; Wed, 17 Jun 2020 07:33:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznwRm3fKT0h4vhmIPbbVlcvBgeyXscWU+Oxtx+FV4q4vCTalqLcKz7qm2HRpiK6rF5b2kV X-Received: by 2002:a17:906:2a4d:: with SMTP id k13mr8139787eje.253.1592404427814; Wed, 17 Jun 2020 07:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592404427; cv=none; d=google.com; s=arc-20160816; b=lDYTKpnUf+OilCb28IvmWk+ger2uAcoS9NHP1B8+3tU0xzyN15EJaNkUB9H1XS2J1B UKNvQggu1BA3btWzGtyXDzU6DqUNjlS7t4rpt/kzLQ+SA6kqWze16NhYxH6YtZQTpLWm 0s5be36ICbnOnJ/MjtrFN2rLeDdezn8uA3jS8KdTJ8wDEYeWUJny0cxvbxIImesxrdAD ewD/F1VaGKofd7hPOrNZOh9lGyii48TlTamIrc83UMjQwN7vLZxjp5N+JUUA+6rZ9JS6 +Hk6GM0XVMjXGH4PS4ObPjHwvNwhOrjheBM18XyJBubQDg3RFPpWoiM8BMOnvS9xG+LA QVRA== 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; bh=08SqR31UqxiwFFe1G22QgSjO4riEqmpo6pAESy1cghc=; b=xspNrITEoarOKNA2/+mIog72CWDWrQHeUYKd0IDPIKv2DVWa/k0kJqsxkNjloRdnkD c/eXNJrlJFtzW9qlUHZm5j9mn0l29rYKIYWP3BzVWGzpiaJ7bykoBX71n4kfxB5O6iJe 9UFaLgJjsJ84Qp7ZsYlbZREKt9Yum+zee3k2T782JSV2ymwonWFuv6cD9WX+yN0u1FoK cHyWZwa3FFOl/GExtnn4sCv3Vk5kBSeg7Rg3OzwLRhfE/6e/A/GDMkkCRERDQI6L3ZTc IPlgmeafNfyC86z1Qie/iex0TWfdSY4a65b5wtMSXNiXPXExwdTR9i5bDbIRMnXlS5G8 3RGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kt1si4669ejb.260.2020.06.17.07.33.25; Wed, 17 Jun 2020 07:33:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726949AbgFQObN (ORCPT + 99 others); Wed, 17 Jun 2020 10:31:13 -0400 Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:47858 "EHLO outbound-smtp05.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbgFQObN (ORCPT ); Wed, 17 Jun 2020 10:31:13 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp05.blacknight.com (Postfix) with ESMTPS id 3046CCCCF7 for ; Wed, 17 Jun 2020 15:31:12 +0100 (IST) Received: (qmail 14256 invoked from network); 17 Jun 2020 14:31:12 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.18.5]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 17 Jun 2020 14:31:11 -0000 Date: Wed, 17 Jun 2020 15:31:10 +0100 From: Mel Gorman To: Vlastimil Babka Cc: Roman Gushchin , Shakeel Butt , Andrew Morton , Christoph Lameter , Johannes Weiner , Michal Hocko , Linux MM , Kernel Team , LKML , Jesper Dangaard Brouer Subject: Re: [PATCH v6 00/19] The new cgroup slab memory controller Message-ID: <20200617143110.GJ3183@techsingularity.net> References: <20200608230654.828134-1-guro@fb.com> <20200617024147.GA10812@carbon.lan> <20200617033217.GE10812@carbon.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: 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 Wed, Jun 17, 2020 at 01:24:21PM +0200, Vlastimil Babka wrote: > > Not really. > > > > Sharing a single set of caches adds some overhead to root- and non-accounted > > allocations, which is something I've tried hard to avoid in my original version. > > But I have to admit, it allows to simplify and remove a lot of code, and here > > it's hard to argue with Johanness, who pushed on this design. > > > > With performance testing it's not that easy, because it's not obvious what > > we wanna test. Obviously, per-object accounting is more expensive, and > > measuring something like 1000000 allocations and deallocations in a line from > > a single kmem_cache will show a regression. But in the real world the relative > > cost of allocations is usually low, and we can get some benefits from a smaller > > working set and from having shared kmem_cache objects cache hot. > > Not speaking about some extra memory and the fragmentation reduction. > > > > We've done an extensive testing of the original version in Facebook production, > > and we haven't noticed any regressions so far. But I have to admit, we were > > using an original version with two sets of kmem_caches. > > > > If you have any specific tests in mind, I can definitely run them. Or if you > > can help with the performance evaluation, I'll appreciate it a lot. > > Jesper provided some pointers here [1], it would be really great if you could > run at least those microbenchmarks. With mmtests it's the major question of > which subset/profiles to run, maybe the referenced commits provide some hints, > or maybe Mel could suggest what he used to evaluate SLAB vs SLUB not so long ago. > Last time the list of mmtests configurations I used for a basic comparison were db-pgbench-timed-ro-small-ext4 db-pgbench-timed-ro-small-xfs io-dbench4-async-ext4 io-dbench4-async-xfs io-bonnie-dir-async-ext4 io-bonnie-dir-async-xfs io-bonnie-file-async-ext4 io-bonnie-file-async-xfs io-fsmark-xfsrepair-xfs io-metadata-xfs network-netperf-unbound network-netperf-cross-node network-netperf-cross-socket network-sockperf-unbound network-netperf-unix-unbound network-netpipe network-tbench pagereclaim-shrinker-ext4 scheduler-unbound scheduler-forkintensive workload-kerndevel-xfs workload-thpscale-madvhugepage-xfs workload-thpscale-xfs Some were more valid than others in terms of doing an evaluation. I followed up later with a more comprehensive comparison but that was overkill. Each time I did a slab/slub comparison in the past, I had to reverify the rate that kmem_cache_* functions were actually being called as the pattern can change over time even for the same workload. A comparison gets more complicated when comparing cgroups as ideally there would be workloads running in multiple group but that gets complex and I think it's reasonable to just test the "basic" case without cgroups. -- Mel Gorman SUSE Labs