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=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 1F483C64E7B for ; Fri, 27 Nov 2020 09:21:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9D5572065E for ; Fri, 27 Nov 2020 09:21:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lD8zslHr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D5572065E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D812C6B0068; Fri, 27 Nov 2020 04:21:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D0B1C6B006C; Fri, 27 Nov 2020 04:21:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD21E6B006E; Fri, 27 Nov 2020 04:21:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id 9F6CD6B0068 for ; Fri, 27 Nov 2020 04:21:18 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6D55B11234 for ; Fri, 27 Nov 2020 09:21:18 +0000 (UTC) X-FDA: 77529654636.17.vein77_3009ec827386 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 5163F18065941 for ; Fri, 27 Nov 2020 09:21:18 +0000 (UTC) X-HE-Tag: vein77_3009ec827386 X-Filterd-Recvd-Size: 3992 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Nov 2020 09:21:17 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id o4so1607861pgj.0 for ; Fri, 27 Nov 2020 01:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mM0opmhG99f+yvqKcjMo9CYmZA/3g+54NqHS4lC8+r4=; b=lD8zslHrfFhy+YzT/cG1dbu8nRD+D9PsGMMZr2kTpJlWKW0aCUhTNAshpULBDUYJat PD3VHzrun3sPBRwFbvTXze/aWynH3cMqm5uQvs3p9t/ckNV5AhmHEhv1fHZ4hJcvTEiC xcyZOiqEa4gtdX7zlNq8SjIbU26wmPpk2rdsLdFU3eXROm1dFEfVkeiHgJsScRqcU/Q8 Qdzt3tNjvn/zKhKg+fIHY/oN76P3N7Ftng3f+LzRg57eH0vbROLCRc6ivJOu79UQQOmY 8gRqymqnr2NFsxF+x1JJI94oxXQRV/rDhqhbmKOTCKX/oQJ/sDRRxFTC4VqOMTtGcrgJ A/wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mM0opmhG99f+yvqKcjMo9CYmZA/3g+54NqHS4lC8+r4=; b=qLO3xkER9EUzP1evbplTxYWc9ikCZo91ISsPHXD2R6c0aH50dyFQLNNNzwk98M110r uqLmcmJ3N+hu79Y4LRCl0JAF2DYavd/8KqazYX4m/lpLgjGY1AoYivZRP6JRQNhqT0PC KTwS55h9KXYcj1SjqKsfCDl91bL1YCaEiktLI7a+0UgVZ/p3Zvq6JdoIHn1as7LcdpWX jd9TWHGM69EbWelzj8HFIaV2EMjouNO/7Vl55xw8HRpoXZopBZAIcCmqPat7baQ6BmkE 6nI3weF+7v+L+AbdRZdFyZB9yB1r9ArRddTMHmSzSY9KumYegpTuN7b7MnRNA6T6CZiW bu8A== X-Gm-Message-State: AOAM533oPdC9ZU4W4NDOtm6SdctAVuQT8EF/T+RjfZc+rxwVWuhdtgHZ eGT9yJyxGDhPmX6OmNwRSSU= X-Google-Smtp-Source: ABdhPJzWdsBVh72oQjtqafg2Omgq7Ufj90tFKJ39bJJ2Pck7fMEbyEQ2YXol84Flvr5iG6MmxqoJnA== X-Received: by 2002:a63:3857:: with SMTP id h23mr5910392pgn.105.1606468876840; Fri, 27 Nov 2020 01:21:16 -0800 (PST) Received: from localhost (61-68-227-232.tpgi.com.au. [61.68.227.232]) by smtp.gmail.com with ESMTPSA id v63sm7013107pfb.217.2020.11.27.01.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 01:21:15 -0800 (PST) Date: Fri, 27 Nov 2020 20:21:11 +1100 From: Balbir Singh To: Vlastimil Babka Cc: linux-mm@kvack.org, mhocko@kernel.org, hannes@cmpxchg.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org Subject: Re: [PATCH] mm/list_lru: dont make them memcg aware if kmem is disabled Message-ID: <20201127092111.GA473773@balbir-desktop> References: <20201126043023.377343-1-bsingharora@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Nov 26, 2020 at 01:10:18PM +0100, Vlastimil Babka wrote: > On 11/26/20 5:30 AM, Balbir Singh wrote: > > When alloc_super() allocates list_lrus for dentries and inodes > > they are made memcg aware if KMEM is compiled in, we should > > also check if kmem was disabled at runtime. > > > > This overhead is about 32 bytes extra per possible nodes per caller > > of list_lru_init() > > > > Signed-off-by: Balbir Singh > > I'd rather export cgroup_memory_nokmem and make cgroup_kmem_disabled() > inline, put it next to memcg_kmem_enabled() and explain in comments what > each means. > > And ideally, the current memcg_kmem_enabled() should be named e.g. > memcg_kmem_active(), and then the new cgroup_kmem_disabled() could be named > memcg_kmem_enabled(). But that's churn and potential future backport hazard, > so dunno. Yes, I am happy with whatever approach works to fast track the patches Andrew, thoughts/comments? Balbir Singh.