Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp413357ybt; Wed, 17 Jun 2020 04:27:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye48pEwYBvM4vuHBec+8/yW7RMtTYHHN0cpp+yiRqFREWBKdCpWVD1NAQ7TlhngCeMEb3r X-Received: by 2002:a17:906:c102:: with SMTP id do2mr6928675ejc.126.1592393252278; Wed, 17 Jun 2020 04:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592393252; cv=none; d=google.com; s=arc-20160816; b=G2MDcIa9KwF5Mu3tJsEz5ZfIX0Uk6WSqeAnju4QhhjAq4HLmYZ/q+SJrZFOFP8xJFK sqauvW/BGI9qe0tLrlD08iTMZ9vgU8fKdxK+QIsGS955pFE6PeGhWili6EUWZmUmT4yX B6P0TVxyd9Bu/UuzK4jLgR6yRv3M+KWCC5NKt8fQ4ql0r0so9D2yDR4l5vgvo3VtlFYz tmiOsOZDSBp92MZPNN6g4A8tp/MBx/pxuJG7JCLOHv21FKAQ/wXyixyHbFWFmuF4DK3d /KAbcB/HHIK6n7Qi9IOsW1PvgeZQ0e0guCIYrgEj3SFbYrVOBFVgysb5RfAiP6Id1d8A w7cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=w97yFXRkmPE9Hez4Olx7xQuYQSiKpM3lSZxxUX15iEM=; b=Wtba6JnKXajrNed/sEgqV9JjWccaDpm5EsoZaXCWrT1cUSdxASodp9CG427rPeWO3I UNWVPT6SvTf5FwI6HqCJg1HHHHf8q86CqRvgGTKqWlpl2hVwrs7Xxoqb0G5EFi2MDt1v D36M0n8pieTKIv/OsNQ96l73tGzInkBEIDpn1ZXpNC2v/ALHU3M9GrkLBARR2XBlIwqO fY0tp50a7zA9pzLRj4HI1Si+96Ef6y6kzYNP3Rr9DUQdjRREDonggzsXfrVNRs7iadNV rYHX+/t9HE19hDSIdRRfA+deKiUJZsnU+nNQ7GnN8Dql5gdheCySjBg++NS3Jk5odZfV oisg== 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 w11si12274465ede.55.2020.06.17.04.27.09; Wed, 17 Jun 2020 04:27:32 -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 S1725964AbgFQLYZ (ORCPT + 99 others); Wed, 17 Jun 2020 07:24:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:43984 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbgFQLYY (ORCPT ); Wed, 17 Jun 2020 07:24:24 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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! >