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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 9C436C2D0C2 for ; Sat, 7 Dec 2019 05:07:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4588D206DB for ; Sat, 7 Dec 2019 05:07:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="g5J7CiQ+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4588D206DB 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 9B01C6B19AE; Sat, 7 Dec 2019 00:07:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 961456B19AF; Sat, 7 Dec 2019 00:07:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 828B06B19B0; Sat, 7 Dec 2019 00:07:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id 69BBD6B19AE for ; Sat, 7 Dec 2019 00:07:11 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id D6C7E2C33 for ; Sat, 7 Dec 2019 05:07:10 +0000 (UTC) X-FDA: 76237161420.19.heart48_2186bd3be0938 X-HE-Tag: heart48_2186bd3be0938 X-Filterd-Recvd-Size: 3643 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Sat, 7 Dec 2019 05:07:10 +0000 (UTC) Received: by mail-oi1-f193.google.com with SMTP id x14so1778631oic.10 for ; Fri, 06 Dec 2019 21:07:10 -0800 (PST) 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=x4tYSfmjncZwEgCZUipa3ucgtSA2eOj9nUIydr2BkTA=; b=g5J7CiQ+iLVs9qjGqBq2nRjqCcnEPWmflZbN7T+ibgaMFk4q8PHYCjtbCB+tKbVA/i AGtHvOLcity2+891sMcGcvY9PrD/n2I+JmVQg/VP1Xn+tfACTHtWqAySuo3pabHHSVIp RurSSEgtr34D6hkyT7uTW+4yPLZuyL1TJ6DWRSwVRn+UWGu3FFEHNUiUQEJftWSa8QYW /jOsjG7obXFHIa4eEFHHfM+EfQjIla1V5RJ6+u57Hw+JZ4++k0OD95HxylTdn2ezur1r dITR+blvkf9ELTwCgIp0BLSfxHZKA3GMbJPz7FyqgOpw3q7VhipxC8uXXp34jDl2xQC3 TJag== 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=x4tYSfmjncZwEgCZUipa3ucgtSA2eOj9nUIydr2BkTA=; b=L0zCofk/Fwud7uLIOW0dfJOXLvfH0JUBxRim+yhofmzIE2jMCNofVTrM5+bhsYC1Xj /jWNhrxDTtYYO3Dqp253KF7bC4FBk++j24VCAi3Wbe3yzSCsVfRwrvvbDpH5Bjq5jkxM oH5favwyITlPO9CFcn+zNcYc4Rch8+PMTVSJtoBBkSGJMCFjOPpc5izGetNvm1jZYQed O38Y/TkuHQSE1KvxJ04jkTjZb6y3csGS3zbtuSBT3FaAHzAMABdF953seb6TllSjM8EZ L1AbCM8FA6iKbcMhz2C90BVvz85bfvWc606SF+4AGEFuj7is/gh8MRlFJnracsLa9F7Z XxYQ== X-Gm-Message-State: APjAAAUxLPFCIco9PJj9SB+TMy0DOQeRkAEN87LOgNLEMiXbDGqZqDGl eUHpIEadavVRo0CdQaBFUJpWEHYY1fb3ALBubDQSQw== X-Google-Smtp-Source: APXvYqx24PqGbVO1GPEP0uwg9cyIo63VU9b8+5UR5JHIYO6n9OX8LIpimcrl/xuAFCktaGiPTfPNAm0B3Xqo2gtJS7c= X-Received: by 2002:a54:451a:: with SMTP id l26mr15984300oil.69.1575695229213; Fri, 06 Dec 2019 21:07:09 -0800 (PST) MIME-Version: 1.0 References: <20191205223721.40034-1-shakeelb@google.com> <20191206161321.35ec9a9dc0ed50222a06fee3@linux-foundation.org> In-Reply-To: <20191206161321.35ec9a9dc0ed50222a06fee3@linux-foundation.org> From: Shakeel Butt Date: Fri, 6 Dec 2019 21:06:58 -0800 Message-ID: Subject: Re: [PATCH] memcg: account security cred as well to kmemcg To: Andrew Morton Cc: Roman Gushchin , Linux MM , Johannes Weiner , Michal Hocko , LKML Content-Type: text/plain; charset="UTF-8" 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 Fri, Dec 6, 2019 at 4:13 PM Andrew Morton wrote: > > On Thu, 5 Dec 2019 14:37:21 -0800 Shakeel Butt wrote: > > > 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. > > A bit of an oversight and the fix is simple. Is it worth a cc:stable? Yes, I think it is simple and safe enough for stable.