From patchwork Tue Mar 9 08:03:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 12124305 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=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 D7FC6C433DB for ; Tue, 9 Mar 2021 08:03:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2D4D365295 for ; Tue, 9 Mar 2021 08:03:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D4D365295 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A9FBA8D00BB; Tue, 9 Mar 2021 03:03:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A4FDF8D007F; Tue, 9 Mar 2021 03:03:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 87B698D00BB; Tue, 9 Mar 2021 03:03:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id 6CB828D007F for ; Tue, 9 Mar 2021 03:03:48 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 31AF01730865 for ; Tue, 9 Mar 2021 08:03:48 +0000 (UTC) X-FDA: 77899596936.15.9899293 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130105.outbound.protection.outlook.com [40.107.13.105]) by imf21.hostedemail.com (Postfix) with ESMTP id AB420E0011F8 for ; Tue, 9 Mar 2021 08:03:45 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dWY30OFTYql7zuo/G6zvNjz/P41KmLrKK4Uamava6QlNUgKWFq8WoV5m7jAwMSEHJKtC3R/Celw/Ff+0SCIdd0mulRWxdu9dLegBBrdVkvnp8jX5M9V1LnAy+XgfSv9er4GN/h2wAHNM3eqZ+Vr8+lmxjKcZRWfveQS9pVixNzjoQWl5ZLySZAtqj2oVPp+/TTmBRoe6yIPRhmkPXxpjpN2hVP2zN8hkPjeth1D1kUPUorU3DrQPDWrVWauqyyy7qkZpaOzW/++rFwnkPuKdzH1GUEGmV3bgpHmN9ajrtxzWL2HMNn9JxzqoWqQAlWZ9FER/N4GEKgygJFvy+B5+0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M6uPTswKNmLvexfE4/75jOdnrZwI9g4iTWJL/mKN+8g=; b=N7C3+wGUuj5KWG1FCej3ZZxVFYXnHocMXgz/P/0b8EnMh0nTt9GQXbmDD3o2bLCbMMua3nQDksdJXuRkdUMpt63z9LRSBfby4zjnF2lKQmpbkB+7pUOxyF84+avK6v3r4SpVY0YIpK9/PnJSHbw/+zGpEWZXKx+2ixWA6fq90wz4FD3T60PdVQWvify6DcFMLoBqt0rjLaArNseZjUk3RBf7FxIh233yahxNx7LJxN/2CFzwhrUTJoJGdc0Auld3xmyGB3jERAqpNt73nF1rN/I0hJ0ra4Chs7qeFn5Kx7vgWOVJb/BHVzlGdC+7HhCBtfj+rq9zO/NaT489IzQFsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M6uPTswKNmLvexfE4/75jOdnrZwI9g4iTWJL/mKN+8g=; b=dgDJo6Xnm42fPBfYY3hUmPlYwHhQxEC8yfdhS9qj58rAtya0VBKyo85rONiajYrpVXMFKbnLX2FyRZ6q1VZJza/Jux55PDRB9wyZ31r3e8RrSH/2t6uqsPvIJP2tlbVyAfzwfYJqNZOA6FnXa47xffBT6yys77lxGNHnObpxbbo= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=virtuozzo.com; Received: from VI1PR0802MB2254.eurprd08.prod.outlook.com (2603:10a6:800:9c::22) by VI1PR0802MB2511.eurprd08.prod.outlook.com (2603:10a6:800:b1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.26; Tue, 9 Mar 2021 08:03:41 +0000 Received: from VI1PR0802MB2254.eurprd08.prod.outlook.com ([fe80::e4c3:b366:458c:c613]) by VI1PR0802MB2254.eurprd08.prod.outlook.com ([fe80::e4c3:b366:458c:c613%11]) with mapi id 15.20.3912.028; Tue, 9 Mar 2021 08:03:41 +0000 From: Vasily Averin Subject: [PATCH 0/9] memcg accounting from OpenVZ To: cgroups@vger.kernel.org, linux-mm@kvack.org Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov Message-ID: <5affff71-e503-9fb9-50cb-f6d48286dd52@virtuozzo.com> Date: Tue, 9 Mar 2021 11:03:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Content-Language: en-US X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: AM0PR02CA0008.eurprd02.prod.outlook.com (2603:10a6:208:3e::21) To VI1PR0802MB2254.eurprd08.prod.outlook.com (2603:10a6:800:9c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [172.16.24.21] (185.231.240.5) by AM0PR02CA0008.eurprd02.prod.outlook.com (2603:10a6:208:3e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Tue, 9 Mar 2021 08:03:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e74f4325-0a42-4e07-a844-08d8e2d1d9cf X-MS-TrafficTypeDiagnostic: VI1PR0802MB2511: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Onk6lNgwc+FTB6DFK4Br8b30UOLIHrzbt9cQsn+aE9jjyZDVfehR+Xh3vorFCnY38YMUt2KqjuJgLhXhpUmYVtvtIrk9/epzTo/cJ77aJfbqSOKS+JNh9x9TNdQNTmxuA+2WgeFUY7FKfDxvIeK4RKJQeNq2duRM5r1akafZ8ka0HvsA+xNvBy0gkKAmFVODI0f/dFiKBrk4Mj+WMR5+lUx9R4Soi/pJ1Gf+ycZxWCHYbHYnFJAcW7XoPGhAs5yrjONKiWUXEpscydYIq3Z0Kcf+gcl/TEc0blgofhShGRF6X/clG/9etxQ/iLWD+1Rxw1rkJShiVM5Q8k9+zNj9tEhKCkmJuthUW97/W6g3vs4pUvhSQxktJNa/O3KkQP9SEuSaCgxQg9QVZGviVpAKQ5IdM1xpUe2Pc+prLOneO1wfJd0lRAfPtp8QwfNo+6qlrvSn0k+80uxx5ADw99FogczkXzB1Rf04wq+904aN4uWIXZBNDs6CCKztxb5Pk3GBttGOFKA2XNDkrb2H0CavbMG/QfyHzCXVb/Hk/uyh+XfU/Dl5ypy/iKQ+DSXQ+Y4w+tVgOC9fsI/dxS3nLoiA9tT6l6459+5sHbTI6lBmfY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0802MB2254.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(396003)(136003)(346002)(39840400004)(366004)(16526019)(66556008)(15650500001)(86362001)(6486002)(2616005)(8936002)(66476007)(5660300002)(478600001)(956004)(4326008)(316002)(26005)(83380400001)(66946007)(4744005)(2906002)(31696002)(8676002)(186003)(31686004)(54906003)(16576012)(36756003)(52116002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?iHC/Yz/P5ucY2XugfjOkwnGPPaDSnQ?= =?utf-8?q?gHunz7P9cBaH2WdsMQxgR22GG5LmZp+4x1ik1q6l2WVvv1YfoVAstxirH6cxnjpNO?= =?utf-8?q?B//z20QQPr/bqyOswweag9uB+oJ4GwSbzWZdL1iRE8lFvMnd2ObxazWmbe0Pn01aR?= =?utf-8?q?Ad5XML2ggqu/KU/YLD1tbDmw0uke6zqhMCdi9ENYhp2GLL3fkoH7FO6gXzp7bgnmW?= =?utf-8?q?wKltuunc5IHwiJ5TEO/ZdO71kvZPrnTI6zXSrrjD4gfR5vemV5XUPF2bAnihFLWey?= =?utf-8?q?4A3QO8+f9htFJIhOnsIYfhDvBJrZRxyFJ97jTL20mwedxd81goC9TniuRePcOtDFf?= =?utf-8?q?e4vf1k2OaFWigXB7Scdap8LSwjSS473CjxmKn78YEX/3UGtyQqduO9uaplq1ex8Kh?= =?utf-8?q?A28+GmXPsgBGpbZzbOvJdTIYP8Gsjliiz7IxeBLJv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com X-MS-Exchange-CrossTenant-Network-Message-Id: e74f4325-0a42-4e07-a844-08d8e2d1d9cf X-MS-Exchange-CrossTenant-AuthSource: VI1PR0802MB2254.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2021 08:03:40.8939 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hOe2C0pZIBZykr2gPFjMTeluRulsvJ5NXg+62DXuVGuHzprVI/C7eXDM1LgBznpUxm4tfYx5MxOrt5OzwMDx8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2511 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: AB420E0011F8 X-Stat-Signature: p7e5dbhzbfhcr6gd6t135zogs9mmbwxg Received-SPF: none (virtuozzo.com>: No applicable sender policy available) receiver=imf21; identity=mailfrom; envelope-from=""; helo=EUR01-HE1-obe.outbound.protection.outlook.com; client-ip=40.107.13.105 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615277025-457849 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: OpenVZ many years accounted memory of few kernel objects, this helps us to prevent host memory abuse from inside memcg-limited container. Vasily Averin (9): memcg: accounting for allocations called with disabled BH memcg: accounting for fib6_nodes cache memcg: accounting for ip6_dst_cache memcg: accounting for fib_rules memcg: accounting for ip_fib caches memcg: accounting for fasync_cache memcg: accounting for mnt_cache entries memcg: accounting for tty_struct objects memcg: accounting for ldt_struct objects arch/x86/kernel/ldt.c | 7 ++++--- drivers/tty/tty_io.c | 4 ++-- fs/fcntl.c | 3 ++- fs/namespace.c | 5 +++-- mm/memcontrol.c | 2 +- net/core/fib_rules.c | 4 ++-- net/ipv4/fib_trie.c | 4 ++-- net/ipv6/ip6_fib.c | 2 +- net/ipv6/route.c | 2 +- 9 files changed, 18 insertions(+), 15 deletions(-) Acked-by: David Ahern Acked-by: David Ahern Acked-by: David Ahern Acked-by: David Ahern