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=-5.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 49AD9C43603 for ; Thu, 5 Dec 2019 23:16:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 069C624658 for ; Thu, 5 Dec 2019 23:16:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="OyvBITRZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 069C624658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8AE346B12AF; Thu, 5 Dec 2019 18:16:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 85E126B12B0; Thu, 5 Dec 2019 18:16:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 774786B12B1; Thu, 5 Dec 2019 18:16:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 6493E6B12AF for ; Thu, 5 Dec 2019 18:16:38 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 0E5004DA1 for ; Thu, 5 Dec 2019 23:16:38 +0000 (UTC) X-FDA: 76232649276.06.ocean64_7413b50f3c63e X-HE-Tag: ocean64_7413b50f3c63e X-Filterd-Recvd-Size: 3841 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Thu, 5 Dec 2019 23:16:37 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id c124so4947627qkg.0 for ; Thu, 05 Dec 2019 15:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dBY8m+DHccXvJ5TnoY1vddTxvF8FWWEtYV2qrc6mL4c=; b=OyvBITRZeb/sOQNiYi7+aXXItWQnIt2KsBz+L5VyPLwpKmIyFEZcGT3cy/3NADs9Cd qn98KTrh2Rdw3sagryAMy/0gM+9b8NFyQnZJfjoik35yOwwSo8TFyh18otEZsHl20LCG uyWg856ybI6mkD6eWAnyK+QgualHbPtute5Z0= 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:user-agent; bh=dBY8m+DHccXvJ5TnoY1vddTxvF8FWWEtYV2qrc6mL4c=; b=LwcEcWFNx1Swt8ssMQFyP1wxJ8Lw3BhT9fJ7YZXGv86dKn2GreohfCguZkSQ5CPW+2 Ur/h6boqnMcMA5Vd6+fs+DRXmyS1zY0RtMUq/W699A3d8s7hCQzBq349hvrIcJhQzbfl fWMoEvcZ1vFIKfChcfTzpGMe2kI2zXxxHytDGHNz3MzivTIYapIMxWALG/SLYQvJLPoD QFSXKK8qL2Mtnz2IBx/zu8yTHh2ZxgdralasoSCa1fu0DtnCV+4CH0zFdwFdGBUhnD++ CrcCHEv4coMXFNkTpYTuchNWir/lvqg2P8+lfGTU5KrB+FQLFZevfrmjPW6oRP3O7ua0 UNsw== X-Gm-Message-State: APjAAAUWZNmC14EEpLPnKSpIgpF0JqTwI6D4G8qd7Gt6cT9hK7NTeLFi aTbs1/2bR/aGBn3qXrQWM5izwg== X-Google-Smtp-Source: APXvYqwHnYpscUASmeuu7HU4LutiUPN6gq71/531cwu2PtoHhcNN/4e4D5uvKkEC3coIl8KAUkv8Ew== X-Received: by 2002:a05:620a:149b:: with SMTP id w27mr10953882qkj.37.1575587796770; Thu, 05 Dec 2019 15:16:36 -0800 (PST) Received: from localhost ([2620:10d:c091:500::1:d1c8]) by smtp.gmail.com with ESMTPSA id u57sm5925231qth.68.2019.12.05.15.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 15:16:36 -0800 (PST) Date: Thu, 5 Dec 2019 18:16:35 -0500 From: Chris Down To: Shakeel Butt Cc: Andrew Morton , Roman Gushchin , linux-mm@kvack.org, Johannes Weiner , Michal Hocko , linux-kernel@vger.kernel.org Subject: Re: [PATCH] memcg: account security cred as well to kmemcg Message-ID: <20191205231635.GA1191846@chrisdown.name> References: <20191205223721.40034-1-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191205223721.40034-1-shakeelb@google.com> User-Agent: Mutt/1.12.2 (2019-09-21) 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: Shakeel Butt writes: >The cred_jar kmem_cache is already memcg accounted in the current >kernel but cred->security is not. Account cred->security to kmemcg. > >Recently we saw high root slab usage on our production and on further >inspection, we found a buggy application leaking processes. Though that >buggy application was contained within its memcg but we observe much >more system memory overhead, couple of GiBs, during that period. This >overhead can adversely impact the isolation on the system. One of source >of high overhead, we found was cred->secuity objects. Makes sense. I took a look through other cred-related allocations to see if any others stood out and this looks like it covers all the relevant cases. __alloc_file is the only other one that caught my eye, but SLAB_ACCOUNT is on the filp cache already. Thanks :-) >Signed-off-by: Shakeel Butt Acked-by: Chris Down