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=-11.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 8D9EAC433E0 for ; Tue, 23 Jun 2020 05:25:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2A33120716 for ; Tue, 23 Jun 2020 05:25:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RmiiafxL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A33120716 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6A7746B0002; Tue, 23 Jun 2020 01:25:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6586D6B0005; Tue, 23 Jun 2020 01:25:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5467E6B0006; Tue, 23 Jun 2020 01:25:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id 3CCB86B0002 for ; Tue, 23 Jun 2020 01:25:30 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E0EDE180AD82F for ; Tue, 23 Jun 2020 05:25:29 +0000 (UTC) X-FDA: 76959338778.04.body10_041701726e38 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id C16E1800AB6F for ; Tue, 23 Jun 2020 05:25:29 +0000 (UTC) X-HE-Tag: body10_041701726e38 X-Filterd-Recvd-Size: 3906 Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 23 Jun 2020 05:25:29 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id g139so10153297lfd.10 for ; Mon, 22 Jun 2020 22:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rJGdd4T1mBh6VgSImvcGDguOX2vlHVdKbQpgCLbiU9k=; b=RmiiafxLLKP875OzgpqZ62/Lueewk4AOM3UHierW9MmyLuFOgunQuv2x7ggwJzDS7L DqNGoKesY5Am1qhK++Bjesr+thJEeWpG84HNpPFd0faqO5GFMEDVBhZ1Lf2CaZ1USRfx 2xPufwx2D+kbwV3Q+dFzpaJWkMjW6uyJsdKAFqXba5DBffD2fXJfED/K0QUUY3X3Md34 3Ztm7/3pga7dWeEZZc7e5AmpDM9WpU7xcwhkCHKnMcypmeHY/AvNbpAQPmRxDtKBkZGM u3ZTnFsaC+eJg9b1CORgGXjO1Ri2e3wCTT1gyC/uyyXGTTvNr4Dr9WCn481BkzJr+ATE LgHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rJGdd4T1mBh6VgSImvcGDguOX2vlHVdKbQpgCLbiU9k=; b=HMThlCM9Wmfsi5WE3Ac1FeAsnQ/vDe8V70s+Sy1JIRnDpPLXR0W5rxGfLtARtUpuqD JdvS4LhUHMGbGoTcOe/BrgLOchYuAAR50Tt/cGH/fqoJkRso2xK+cK/OzGaBZIzdgptj 0bwu0I4iXR4Omg48Zpq0k0qIvS/UvxUTB4Y/6H7zd8lh3pYKbTb64169TQ0j4X15QCYl KR7umWzcFLVLJAcQRHTjF2z+82JddCJzUYWCyeBcNBxpf33broOkEIcpnnjkh+SRaqSY /UwYQy4BE5sxT8aesK567LR384j0B5sGcb9+LI8Tct0d7xS4F2fF91W2n7eBwXZJdIH4 knHA== X-Gm-Message-State: AOAM530ArUCAIFTXrrUaXAGgKze3gH67WIeEC2xX/DA/atI4U0ztFVev SoR0yI0VNQCTxzxTEy0mzCd6QEACrDZ/rL4QXjn54A== X-Google-Smtp-Source: ABdhPJz9eBvD8p4BLTBmgJcnnsG76Z1d+HAQFe3qCicUvtbVRXv3IGAHF/rmFO0b3XgwG555GId3UUY2FgJSjUj1C6s= X-Received: by 2002:a19:11:: with SMTP id 17mr11756487lfa.125.1592889927504; Mon, 22 Jun 2020 22:25:27 -0700 (PDT) MIME-Version: 1.0 References: <20200623015846.1141975-1-guro@fb.com> <20200623015846.1141975-18-guro@fb.com> In-Reply-To: <20200623015846.1141975-18-guro@fb.com> From: Shakeel Butt Date: Mon, 22 Jun 2020 22:25:16 -0700 Message-ID: Subject: Re: [PATCH v7 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations To: Roman Gushchin Cc: Andrew Morton , Christoph Lameter , Johannes Weiner , Michal Hocko , Linux MM , Vlastimil Babka , Kernel Team , LKML Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: C16E1800AB6F X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Mon, Jun 22, 2020 at 6:58 PM Roman Gushchin wrote: > > Instead of having two sets of kmem_caches: one for system-wide and > non-accounted allocations and the second one shared by all accounted > allocations, we can use just one. > > The idea is simple: space for obj_cgroup metadata can be allocated on > demand and filled only for accounted allocations. > > It allows to remove a bunch of code which is required to handle kmem_cache > clones for accounted allocations. There is no more need to create them, > accumulate statistics, propagate attributes, etc. It's a quite > significant simplification. > > Also, because the total number of slab_caches is reduced almost twice (not > all kmem_caches have a memcg clone), some additional memory savings are > expected. On my devvm it additionally saves about 3.5% of slab memory. > > Suggested-by: Johannes Weiner > Signed-off-by: Roman Gushchin > Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt