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 A06FBC433DF for ; Mon, 22 Jun 2020 18:11:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5BFBA20738 for ; Mon, 22 Jun 2020 18:11:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MNyJjwmB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BFBA20738 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 07A1A6B0003; Mon, 22 Jun 2020 14:11:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 002DB6B0005; Mon, 22 Jun 2020 14:11:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E33186B0006; Mon, 22 Jun 2020 14:11:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0165.hostedemail.com [216.40.44.165]) by kanga.kvack.org (Postfix) with ESMTP id C26D86B0003 for ; Mon, 22 Jun 2020 14:11:18 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 798B21AEBBD for ; Mon, 22 Jun 2020 18:11:18 +0000 (UTC) X-FDA: 76957639836.14.hose41_5411f4c26e34 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 4A14E181713EA for ; Mon, 22 Jun 2020 18:10:02 +0000 (UTC) X-HE-Tag: hose41_5411f4c26e34 X-Filterd-Recvd-Size: 5462 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Mon, 22 Jun 2020 18:10:01 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id k15so3161924lfc.4 for ; Mon, 22 Jun 2020 11:10:01 -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=Fj6T6vWIu+7/zMEXZA/hWOf/ZtxjF8z8xDJ7BJ6W0P0=; b=MNyJjwmBp7DllDG0Dl5Oec25nmm80IFwxUsVhL96ER3oAiK3RcA3WQj9qi8eQu9mVb ks1WFCScTP4gLWuknMHVAkon/VmQWMNwHVw3MDr+FK4EHkFxDTJpUTB5As/QR7S13v7g uPljpnRH+KPhwVNLrLcX9N1BHJRK3qr8CNuPajZPiVHe3+KEN0Ndw/YIXvfDCYVR8Rx1 InhvhQmsUWQELNWpfG0VaQZb19NeIFEUNFen+Lf/8XwC/JZXI5v0DYnnDXEHKUfSlZZZ rbvTAvp92GmxMxb7pwEYp9IpX3LvVE+bpIvhd0cUd49vNH+sZ0h7NcVFKU4QzBVFiTQH Pa1A== 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=Fj6T6vWIu+7/zMEXZA/hWOf/ZtxjF8z8xDJ7BJ6W0P0=; b=heh6/bobY49Gby/GgH6F/JLoEUUpWTnqFOcYWy1GB0Ul7f/nCHaEEdK47Ir52ldhHe YQPDAG7/pQxYgBR0ZiMPrv4cw1FSq4+9NVK0Wc1jm6Clo3i2zUWHt+Ww2Hau9aNVEZjQ YS+LLmShVZ+KE3Mj/yx8nU15pw2Q3rankFew4uKEYtgk2POlIpx8UoHQlkdU6qaTCB/j NWupdLgQ3cwBIKv/T/GmCCOGBJvW9GHdi5civ/W6KfzYzr63ZX8ZK2ySoKC/6OqjFDhv Lmx3Ws1q+Jg2+FaJr7sQDTO1HpdzZr0DVU29q8n4MukQbx9dSg2MJA93xctGYpsnb9DY 3j7g== X-Gm-Message-State: AOAM530BN1HI7S8s6rpLVXNsiC4XVlpTtGiGjFkJPJVyZ2IcMfTu7i7v RQCrgOeISbKN+V3rJfNUiIqijlslD3f1f0PAWQHqlA== X-Google-Smtp-Source: ABdhPJxXDeGb1uizBd27egpvFtr2RKQ3SI3nhBEIjsWi6IrwEvf6HGYQB1DUElDoEzbVkH591OEe9QkQjyq8GHl5PTI= X-Received: by 2002:a05:6512:482:: with SMTP id v2mr10359032lfq.3.1592849400059; Mon, 22 Jun 2020 11:10:00 -0700 (PDT) MIME-Version: 1.0 References: <20200608230654.828134-1-guro@fb.com> <20200608230654.828134-11-guro@fb.com> <20200622180153.GB301338@carbon.dhcp.thefacebook.com> In-Reply-To: <20200622180153.GB301338@carbon.dhcp.thefacebook.com> From: Shakeel Butt Date: Mon, 22 Jun 2020 11:09:47 -0700 Message-ID: Subject: Re: [PATCH v6 10/19] mm: memcg/slab: deprecate memory.kmem.slabinfo 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: 4A14E181713EA X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 11:02 AM Roman Gushchin wrote: > > On Mon, Jun 22, 2020 at 10:12:46AM -0700, Shakeel Butt wrote: > > On Mon, Jun 8, 2020 at 4:07 PM Roman Gushchin wrote: > > > > > > Deprecate memory.kmem.slabinfo. > > > > > > An empty file will be presented if corresponding config options are > > > enabled. > > > > > > The interface is implementation dependent, isn't present in cgroup v2, > > > and is generally useful only for core mm debugging purposes. In other > > > words, it doesn't provide any value for the absolute majority of users. > > > > > > A drgn-based replacement can be found in tools/cgroup/slabinfo.py . > > > It does support cgroup v1 and v2, mimics memory.kmem.slabinfo output > > > and also allows to get any additional information without a need > > > to recompile the kernel. > > > > > > If a drgn-based solution is too slow for a task, a bpf-based tracing > > > tool can be used, which can easily keep track of all slab allocations > > > belonging to a memory cgroup. > > > > > > Signed-off-by: Roman Gushchin > > > Acked-by: Johannes Weiner > > > Reviewed-by: Vlastimil Babka > > > > Hi Roman, > > > > I am not against removing the memory.kmem.slabinfo interface but I > > would like to have an alternative solution more accessible than > > tools/cgroup/slabinfo.py. > > > > In our case, we don't have ssh access and if we need something for > > debugging, it is much more preferable to provide a file to read to > > SREs. After the review, that file will be added to a whitelist and > > then we can directly read that file through automated tools without > > approval for each request. > > > > I am just wondering if a file interface can be provided for whatever > > tools/cgroup/slabinfo.py is providing. > > > > Shakeel > > Hello, Shakeel! > > I understand your point, but Idk how much we wanna make this code a part > of the kernel and the cgroup interface. No need for the cgroup interface. I was thinking of a new interface like /proc/slabinfo_full which tells active objects for each kmem_cache and memcg pair. > The problem is that reading > from it will be really slow in comparison to all other cgroup interface > files. Idk if Google's version of SLAB has a list of all slab pages, > but if not (as in generic SLUB case), it requires scanning of the whole RAM. That's a bummer. Does drgn-based script scan the whole RAM?