From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 20EF462ACA for ; Tue, 24 Nov 2020 12:09:37 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0FB51AF34 for ; Tue, 24 Nov 2020 12:09:07 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 0135BAF2A for ; Tue, 24 Nov 2020 12:09:06 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id B7941404FF; Tue, 24 Nov 2020 12:09:05 +0100 (CET) Date: Tue, 24 Nov 2020 12:09:04 +0100 From: Wolfgang Bumiller To: Alexandre Derumier Cc: pve-devel@lists.proxmox.com Message-ID: <20201124110904.wz4unalnywyecfho@wobu-vie.proxmox.com> References: <20201030094236.53483-1-aderumier@odiso.com> <20201030094236.53483-2-aderumier@odiso.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201030094236.53483-2-aderumier@odiso.com> User-Agent: NeoMutt/20180716 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.023 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [drive.pm, pci.pm, monitor.pm, cpuconfig.pm, cgroup.pm, machine.pm] Subject: Re: [pve-devel] [PATCH qemu-server 1/3] add PVE::QemuServer::Cgroup X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 11:09:37 -0000 qemu doesn't actually have a limiting namespace subdirectory, so I'll just replace this with: sub get_subdir { my ($self, $controller, $limiting) = @_; my $vmid = $self->{vmid}; return "qemu.slice/$vmid.scope/"; } On Fri, Oct 30, 2020 at 10:42:34AM +0100, Alexandre Derumier wrote: > --- > PVE/QemuServer/CGroup.pm | 25 +++++++++++++++++++++++++ > PVE/QemuServer/Makefile | 1 + > 2 files changed, 26 insertions(+) > create mode 100644 PVE/QemuServer/CGroup.pm > > diff --git a/PVE/QemuServer/CGroup.pm b/PVE/QemuServer/CGroup.pm > new file mode 100644 > index 0000000..7ca0826 > --- /dev/null > +++ b/PVE/QemuServer/CGroup.pm > @@ -0,0 +1,25 @@ > +package PVE::QemuServer::CGroup; > + > +use strict; > +use warnings; > +use PVE::CGroup; > +use base('PVE::CGroup'); > + > +sub get_subdir { > + my ($self, $controller, $limiting) = @_; > + > + my $entry_name = $controller || 'unified'; > + my $entry = ($self->{controllers}->{$entry_name} //= {}); > + > + my $kind = $limiting ? 'limit' : 'ns'; > + my $path = $entry->{$kind}; > + > + return $path if defined $path; > + > + my $vmid = $self->{vmid}; > + $path = "qemu.slice/$vmid.scope/"; > + > + return $path; > +} > + > +1; > diff --git a/PVE/QemuServer/Makefile b/PVE/QemuServer/Makefile > index fd8cfbb..e4ed184 100644 > --- a/PVE/QemuServer/Makefile > +++ b/PVE/QemuServer/Makefile > @@ -9,6 +9,7 @@ SOURCES=PCI.pm \ > Monitor.pm \ > Machine.pm \ > CPUConfig.pm \ > + CGroup.pm \ > Drive.pm \ > > .PHONY: install > -- > 2.20.1