Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp959876pxv; Thu, 15 Jul 2021 21:12:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz65zi1PifkOUb8Jy1Z6u09AAGHIBMZjNDCpCtDFLBOGzdR2wAzgqnqm1UuT0M9nk31Tgdm X-Received: by 2002:a05:6402:1118:: with SMTP id u24mr11758356edv.229.1626408774283; Thu, 15 Jul 2021 21:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626408774; cv=none; d=google.com; s=arc-20160816; b=hpZ695dU5hKWBUTl9wj+uDiLs3EKXTSLL38nffzlzk03xFC3PBWBbwabL8yXWgew/A 1QNmdCUt30YEkOe72730H2mLeaQKdfUU+Z+7B6lagLHERImzDCgYH4roSRxt18xyZCJm kDA0Gqs3cStXgRXBiuBMDW3n7M7k+CuwJsBQoFpdXo3U9l8n0ub0Jz7Y6lilRnZOxuwa p5g6ZDCovaToia+3NRpot+7LL1MlqLJNfLAGgs+skkLLHmxwnvl6QWIcN4UIswso/Y42 MkVViCnDWUGlcM2yOfnF56SpkOwKkPANDyKHf/9nWx8bmoY4TJMrfExP2FPwE7F/6aku bK3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=4tMOph3Bxi9udxmJFQ6rB4I9o9MwgEFr9xoM3JkuMMM=; b=o+nrjpjp8UmUfYGaEk8nhu3PhnEvQbH4Wn5L+Sj6odAdbXq/6AGVuYcL0S4KYZdkyS EZJZzhRfLkVNUGZAUvZTo+vbPb/UJR4rxSpSfqoTr8u3SA3n/OmbQhiXXFif8wRxbM+b dlCAN5ix12x6Zi0KZXqWBhEsORlDAYGMUcQ695Ki2cYAPp3d5lCMf6yb5DNMTHJqs2++ AsckjSs/lwpnRP5sEAAu9CX8rmYOuCQORh8ZovFi2WS/SVLs1XcmyhcT2NN3iWiRMtU5 7JKyuREmob2R7iq8L4AACRfxFTEURsfX+ePEAHaY5EUnPDn88FjAkYUpYHR+9vq5sJdn yXxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=TclMo+FG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si10962911ejm.280.2021.07.15.21.12.31; Thu, 15 Jul 2021 21:12:54 -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=@virtuozzo.com header.s=relay header.b=TclMo+FG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbhGPEOb (ORCPT + 99 others); Fri, 16 Jul 2021 00:14:31 -0400 Received: from relay.sw.ru ([185.231.240.75]:46390 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhGPEOb (ORCPT ); Fri, 16 Jul 2021 00:14:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:From: Subject; bh=4tMOph3Bxi9udxmJFQ6rB4I9o9MwgEFr9xoM3JkuMMM=; b=TclMo+FG6IiTHW3iI y5XkPGcOAnwG+6vGIm6EGYu9ih1eM9I0n9G/1OsVuux+y8i10E3hFVuscHyTdep+EYezfPiZ+AzUM 7bsrhJgLX1ur3g64SlF6TGv2TMdJLGkf9fJcEkutEb9x90KQ5VOTUfrsbmErTen9awR2BAPACEzCc =; Received: from [10.93.0.56] by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1m4FC9-0049Gz-Gs; Fri, 16 Jul 2021 07:11:25 +0300 Subject: Re: [PATCH v4 00/16] memcg accounting from OpenVZ To: Shakeel Butt , Tejun Heo 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 References: <8664122a-99d3-7199-869a-781b21b7e712@virtuozzo.com> <919bd022-075e-98a7-cefb-89b5dee80ae8@virtuozzo.com> From: Vasily Averin Message-ID: <3a60b936-b618-6cef-532a-97bbdb957fb1@virtuozzo.com> Date: Fri, 16 Jul 2021 07:11:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/15/21 8:11 PM, Shakeel Butt wrote: > 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? Technically my patches does not have any NAKs. Practically they are still them merged. I've expected Michal will push it, but he advised me to push subsystem maintainers. I've asked Tejun to pick up the whole patch set and I'm waiting for his feedback right now. I can resend patch set once again, with collected approval and with rebase to v5.14-rc1. However I do not understand how it helps to push them if patches should be processed through subsystem maintainers. As far as I understand I'll need to split this patch set into per-subsystem pieces and sent them to corresponded maintainers. Thank you, Vasily Averin.