From patchwork Tue Mar 9 08:03:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 12124309 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=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 6A89FC433E0 for ; Tue, 9 Mar 2021 08:04:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6C2B65272 for ; Tue, 9 Mar 2021 08:04:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6C2B65272 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 5701B8D00BD; Tue, 9 Mar 2021 03:04:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5464F8D007F; Tue, 9 Mar 2021 03:04:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C0048D00BD; Tue, 9 Mar 2021 03:04:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id 1F00F8D007F for ; Tue, 9 Mar 2021 03:04:02 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D44FD173084F for ; Tue, 9 Mar 2021 08:04:01 +0000 (UTC) X-FDA: 77899597482.22.AE4E28B Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140138.outbound.protection.outlook.com [40.107.14.138]) by imf30.hostedemail.com (Postfix) with ESMTP id A8559E0011C0 for ; Tue, 9 Mar 2021 08:03:55 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IaYUwQXsDJ40La1ZKDyRUpO9ur7Ge+cnsG8FJdA6/PDf/mRHYGk9MTELmLnVZAU/+H/FPDHMPvvyaPqckCluUfvWaPxryZZFrIAB4MyPokCXlmYHzV6pyAcvXqujL8nBKTMjT1gPII5O3BJTLuODfy8mgUwV64tvCjp/+E8ZeSQiWBZodLXHsY3+bJy3AC5hwwOwvjG2N0qI4PqDopVFq5HWNbZ9toKbynf/z7dmgiBdc/pFW/tMR9ypeGoGbwXzaOnAGQVl7QaL1K4g7+Z3FJ7uIPZnFCM6aEgvzuquh1bH8fiTghD9TRYjXt/w9+sbT6GXdr2+4ULD3c/ko+n70Q== 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=Kv57v9wwkEkRFk3quNioC72lkLY1VHt10WJve0iQRuY=; b=igHhA65iVcKq88wXiKF6R4/hMAlJK+I/LCz4whRKMWPkYSrOgiT272+11rQs/BlB0ZqxIZbDSkVxT9/PhgX6CIrOQ+lXCohvM1HGE1d1KeAwtJifXfB71u+SSKRPzmoOmQIaohXJfbpqIOpD+lNyPcXMqsFwaET/IJjeFafOqTuZmPp2u6Oqhum2Kn3ldPIen8u+5Eo8jfC6pjLHZR0YoI43PVx6xOkgfR++sIOkeIMcstzqTD9u4/Gue9h6Ir7yMftHGoy8E9du9EgASnUV6lLsj36c8qu1RimVhDUTZUpv5d0mH//a+yBQDC5cg69EpwO2uGdx5PdOa91rmfS7Iw== 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=Kv57v9wwkEkRFk3quNioC72lkLY1VHt10WJve0iQRuY=; b=SUj6B/84e5vnSMKxM46a+k4e2HS1OaDa7AZBrUPRiMnFuiuDCwCKYkMXItyH5uYi9rK/NO6XGWrZTJDpabXJ2f57QRrA0erJzRTXDFHW5DeF+31LZordwKwnWysSxfA/KWd3ePSIGU9BHqtHU5s1IJ3W8vxTDAIvZ16R4g7amuw= 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:58 +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:58 +0000 From: Vasily Averin Subject: [PATCH 2/9] memcg: accounting for fib6_nodes cache To: cgroups@vger.kernel.org, linux-mm@kvack.org Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov Message-ID: Date: Tue, 9 Mar 2021 11:03:56 +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:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3116cd4-d334-4e04-576f-08d8e2d1e49e X-MS-TrafficTypeDiagnostic: VI1PR0802MB2511: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1201; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qQpclr4eVqmBpkYhv0Hkht6TGNjjCUQvOmqO9ms6cGRVmpl5PvQ9fK8cknZLY0S/TMS6l97H0p4O6mnvfNKcz2EiVR/iH7Gdt89ZpcA7XXHRto39dWBPji4SJlwLBBN312A5SUQyXBTMaSkjfaE7kZjkkTtjI/0neOrYtw/Ggg6yvBkj3h08Ut7XP/4D/V8b9+TTfgpzCi7uLXgGybvpJUiGlDQzrPIo7GPWapKwUSAHTED9tqmYidVk9grh65JTe49YgH4spCSdBjeXqSLUpJfK/FSklrsKvzffAzlJvy82Hnc7qmFVq4s07RwNRC5DG+r+nrRecKlSlXsE2c9cLS7ATsuCgjC+R6rgYcTVwep8ak6hfwQq76l9Fy4DPHgzq0bh5WGNcUV3ZPCbqIb/NPzEVMjbaxJizYsICegFuZyGVl/gWAdDgdYLIaSDcjWL9WPANMtQ4ZM2UThuBpBIX7z1lzNXuJVkg5duI4A34wDw01mfBF3rmBtA/4kKQlUl0TX4oVi2Ea3e429MkSj8tj70WtPmHVd5KRmiSVF1QAVGjuISXOyc6Lr0Dm9oh2dDMpx50yFpe7D11dR+yzJAAwH/b+uOfK53ny5ckj7ZAoI= 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)(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?WlRcXfkJiegt3gwXz07ZMV4ofiQHBo?= =?utf-8?q?VOY7dQvIGLvIo99Y0Gr+lo1Rn4BCPXd93ZXbq1rAAtzIaKC39ArkUuZ4GSDX2kaeK?= =?utf-8?q?kTh48dMAUS0dk/axPj3wcWyT1o06WKuL8TQAgzEWOST/4T9d3OekONtj4m6IPblkP?= =?utf-8?q?2CkIwkLWk3jDSf7vBLdpriUIOcStW5w3u67DcJPB1GMOBZzOOZ1y6jc7+NUBqaZ6W?= =?utf-8?q?Fgg1NSxJGjeKkO30d9UeW7ZgIoLBqzYGlArZ/OJN6MCJjKf4pTje19rDv/CTUsAvV?= =?utf-8?q?JBHBtv1cofiKu1KfTcKQhWDufI0w0vAYih8MUkFk2FU4CXuMmhA2840J3UPMf+z7I?= =?utf-8?q?Y3vbAmePooBL5Ji/juuJlb9BtpVBooCS2TxPAW7W2E8PHiaimZHWXJWbG251uWsU0?= =?utf-8?q?7GvdRi+eWa0q6F4fiOd9bjwFb9XLX5fKQnk7x8bw95V3IQyrmwTDn2YNjCVEe7u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-Message-Id: a3116cd4-d334-4e04-576f-08d8e2d1e49e 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:58.7158 (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: Y5LbmpPtdY09VbgDWswd+CcEFuQZIsK+XyXNMqHuo8Eu6o0t1C+Hh7cbtzURCxaYQZGOG2XgDFZdvwK3oqf8Uw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2511 X-Stat-Signature: hazc6sakbptcd6oz3x5bghtkz48o4bse X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A8559E0011C0 Received-SPF: none (virtuozzo.com>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=EUR01-VE1-obe.outbound.protection.outlook.com; client-ip=40.107.14.138 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615277035-22772 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: Objects can be created from memcg-limited tasks but its misuse may lead to host OOM. Signed-off-by: Vasily Averin --- net/ipv6/ip6_fib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index ef9d022..fa92ed1 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -2445,7 +2445,7 @@ int __init fib6_init(void) fib6_node_kmem = kmem_cache_create("fib6_nodes", sizeof(struct fib6_node), - 0, SLAB_HWCACHE_ALIGN, + 0, SLAB_HWCACHE_ALIGN|SLAB_ACCOUNT, NULL); if (!fib6_node_kmem) goto out;