Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp571987pxv; Thu, 15 Jul 2021 10:29:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEd5lp6CTCr4WfxlFIufQEvn/WXmqOR7YXTmeli/16KdO8JJZ/EnuwzmJWygBFuWmp8COb X-Received: by 2002:a92:1e08:: with SMTP id e8mr3552210ile.10.1626370169089; Thu, 15 Jul 2021 10:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626370169; cv=none; d=google.com; s=arc-20160816; b=Prf8wAKYZEugLs5Pj8w5hvVDTeXdY1TILUHm2jrrEkehYczmjYu7Y/QPgzdwWVIbuW OANAaMt+dmlWJ4m3PK/y14M3bV6CZUunXDpnZd1WqMZukhioCvJcxrui/bM3746kK/tL CkaiBXSOlX/Xcc8txHLjjlJP219qpdWyOFWfNrUu/iCW/45jqOMb/PAmlV+kxFo3oaBh aRQC/Tj+9JJFc046V8wEXe8leemgjBLfiJVLZs5oUf8wmFLv021pHmvuSIs5tn+QHslx +6VzRlTLfn+TgV0E33/VAZfAKTw9ugtaQvoWJ/AUDCmvhB/cQWAqcCXItA2BUQjudwNY pb3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7bC7OSAi9agetXXpK35QVSGmKS8AgVugfnrXcpn3Dns=; b=WXZRIwPzcln9ACk0iRTaowRmjymzypUmZQLBz8EMKa75UXf8uTmn6Y5CuI97XFjv3h jOXw2suQK/oFWos5dPvaJwmDcwVa+Xlbw2Kwu4i9sQsd7awN/BwPDnGGgqyDYlZIyNIe rHz77wG1t/BGNA17SQAoth9CXKZzjYJ9g30FMGz4oFLjkruGxurDFrLACnqY5ko1fqQ9 1QaxLdd9IT+SK9O0XJ1HHAWzs64q18V7fgheybVVBAA6yJbwR/64bRGp2GXJMy/vcI2P YKpjvKpuxQ4w4LaISKVAy81jdxayicHydP2tj/OGGqwb7A2+Hw69an9KRk6MMFTK2fjZ Ryuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oV8bWJnO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si9768375jau.121.2021.07.15.10.29.17; Thu, 15 Jul 2021 10:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oV8bWJnO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbhGOROS (ORCPT + 99 others); Thu, 15 Jul 2021 13:14:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbhGOROR (ORCPT ); Thu, 15 Jul 2021 13:14:17 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B612BC061760 for ; Thu, 15 Jul 2021 10:11:22 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id f30so4579113lfv.10 for ; Thu, 15 Jul 2021 10:11:22 -0700 (PDT) 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=7bC7OSAi9agetXXpK35QVSGmKS8AgVugfnrXcpn3Dns=; b=oV8bWJnOMcqDiyr0EEcrUCFtr4BMdFOqgv31ZoDSoO3gbciYC2/GnL9d3E8g3kFyoR TuNYJwrY8HJTIT3oVRzFGI5hPlaBY8cEGhLJ1LnpN1rLT8iqJJY6F3Tr/mTCG+p4ja70 6dPMHVY6v+3XAdY7+6CHPbWFEA0+hsuvyLSQLImPXVhoV5i2sZ9Ey1Fl6QmGQgHWmLBR wYE0wzjsd9Lxip18YoD2mr/S/TGsszZWQ8QBWI8oz24cP1EBHhPmaV4eT09MB2QUrCrN Q+elf9KtHyTyifjirK5MT978iFGeTPvl9KPDAa94CLE52eDIMo4mw7ouMF7B5b+qelwv UJqA== 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=7bC7OSAi9agetXXpK35QVSGmKS8AgVugfnrXcpn3Dns=; b=sjgQEVmPUqTF2x25viamhl10vpcMu2WEzzUvFTqzVrqyMqf7fbkGqTD5dy8NVymmsg lb+9YpzmyCWM7VOR8gz9q5yFw6XcLDz9KbKbuDPmEdawjmu7EbdWY+r8A2Q7ogmC5MNx oSkRGlCNCZ2aASkYRxOk+YRW6hnULQUjO1Z+qYw7Swp/WOjqwS/DCrPWXUKbLQn1LT+v W2Vfx8jsDoJrzfF01uvHAHpJFQm+/c5s5uvKzS+fp4tdkQNBkFzhcDn7PaiLiNKndrme GKzZXvnN5qAWlMRJVL7z5yJugr0ueSWhDmROXJAq9IsH8CNSZ3ATw1jMZPagcfTxkxbJ 3V0w== X-Gm-Message-State: AOAM531vfZjtAjTGSKprRuopFFIqFjJcQD/V5gyVGF5rIpuYqGNewuBS 47vfXG9CJ6HvQeXERTS2yt6hvnZzqt2872bApDIQiw== X-Received: by 2002:a19:ad4d:: with SMTP id s13mr4200989lfd.432.1626369080651; Thu, 15 Jul 2021 10:11:20 -0700 (PDT) MIME-Version: 1.0 References: <8664122a-99d3-7199-869a-781b21b7e712@virtuozzo.com> <919bd022-075e-98a7-cefb-89b5dee80ae8@virtuozzo.com> In-Reply-To: <919bd022-075e-98a7-cefb-89b5dee80ae8@virtuozzo.com> From: Shakeel Butt Date: Thu, 15 Jul 2021 10:11:09 -0700 Message-ID: Subject: Re: [PATCH v4 00/16] memcg accounting from OpenVZ To: Vasily Averin Cc: Cgroups , Michal Hocko , Johannes Weiner , Vladimir Davydov , Roman Gushchin , Alexander Viro , Alexey Dobriyan , Andrei Vagin , Andrew Morton , Borislav Petkov , Christian Brauner , David Ahern , "David S. Miller" , Dmitry Safonov <0x7f454c46@gmail.com>, Eric Dumazet , "Eric W. Biederman" , Greg Kroah-Hartman , Hideaki YOSHIFUJI , "H. Peter Anvin" , Ingo Molnar , Jakub Kicinski , "J. Bruce Fields" , Jeff Layton , Jens Axboe , Jiri Slaby , Kirill Tkhai , Oleg Nesterov , Serge Hallyn , Tejun Heo , Thomas Gleixner , Zefan Li , netdev , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 27, 2021 at 11:51 PM Vasily Averin wrote: > > OpenVZ uses memory accounting 20+ years since v2.2.x linux kernels. > Initially we used our own accounting subsystem, then partially committed > it to upstream, and a few years ago switched to cgroups v1. > Now we're rebasing again, revising our old patches and trying to push > them upstream. > > We try to protect the host system from any misuse of kernel memory > allocation triggered by untrusted users inside the containers. > > Patch-set is addressed mostly to cgroups maintainers and cgroups@ mailing > list, though I would be very grateful for any comments from maintainersi > of affected subsystems or other people added in cc: > > Compared to the upstream, we additionally account the following kernel objects: > - network devices and its Tx/Rx queues > - ipv4/v6 addresses and routing-related objects > - inet_bind_bucket cache objects > - VLAN group arrays > - ipv6/sit: ip_tunnel_prl > - scm_fp_list objects used by SCM_RIGHTS messages of Unix sockets > - nsproxy and namespace objects itself > - IPC objects: semaphores, message queues and share memory segments > - mounts > - pollfd and select bits arrays > - signals and posix timers > - file lock > - fasync_struct used by the file lease code and driver's fasync queues > - tty objects > - per-mm LDT > > We have an incorrect/incomplete/obsoleted accounting for few other kernel > objects: sk_filter, af_packets, netlink and xt_counters for iptables. > They require rework and probably will be dropped at all. > > Also we're going to add an accounting for nft, however it is not ready yet. > > We have not tested performance on upstream, however, our performance team > compares our current RHEL7-based production kernel and reports that > they are at least not worse as the according original RHEL7 kernel. > Hi Vasily, What's the status of this series? I see a couple patches did get acked/reviewed. Can you please re-send the series with updated ack tags? thanks, Shakeel