From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FE43C433E0 for ; Wed, 17 Jun 2020 11:24:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D2304208B3 for ; Wed, 17 Jun 2020 11:24:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2304208B3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 55CB96B0022; Wed, 17 Jun 2020 07:24:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50C766B0023; Wed, 17 Jun 2020 07:24:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 422E86B0024; Wed, 17 Jun 2020 07:24:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 2815C6B0022 for ; Wed, 17 Jun 2020 07:24:25 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BE29E8248076 for ; Wed, 17 Jun 2020 11:24:24 +0000 (UTC) X-FDA: 76938470448.30.stick97_370aa1626e07 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 9807D180B3C8B for ; Wed, 17 Jun 2020 11:24:24 +0000 (UTC) X-HE-Tag: stick97_370aa1626e07 X-Filterd-Recvd-Size: 4059 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Wed, 17 Jun 2020 11:24:24 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9F06BACDB; Wed, 17 Jun 2020 11:24:26 +0000 (UTC) Subject: Re: [PATCH v6 00/19] The new cgroup slab memory controller To: Roman Gushchin , Shakeel Butt Cc: Andrew Morton , Christoph Lameter , Johannes Weiner , Michal Hocko , Linux MM , Kernel Team , LKML , Mel Gorman , Jesper Dangaard Brouer References: <20200608230654.828134-1-guro@fb.com> <20200617024147.GA10812@carbon.lan> <20200617033217.GE10812@carbon.lan> From: Vlastimil Babka Message-ID: Date: Wed, 17 Jun 2020 13:24:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200617033217.GE10812@carbon.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 9807D180B3C8B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 6/17/20 5:32 AM, Roman Gushchin wrote: > On Tue, Jun 16, 2020 at 08:05:39PM -0700, Shakeel Butt wrote: >> On Tue, Jun 16, 2020 at 7:41 PM Roman Gushchin wrote: >> > >> > On Tue, Jun 16, 2020 at 06:46:56PM -0700, Shakeel Butt wrote: >> > > On Mon, Jun 8, 2020 at 4:07 PM Roman Gushchin wrote: >> > > > >> [...] >> > > >> > > Have you performed any [perf] testing on SLAB with this patchset? >> > >> > The accounting part is the same for SLAB and SLUB, so there should be no >> > significant difference. I've checked that it compiles, boots and passes >> > kselftests. And that memory savings are there. >> > >> >> What about performance? Also you mentioned that sharing kmem-cache >> between accounted and non-accounted can have additional overhead. Any >> difference between SLAB and SLUB for such a case? > > 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. [1] https://lore.kernel.org/linux-mm/20200527103545.4348ac10@carbon/ > Thanks! >