Received: by 2002:a05:6520:1682:b0:147:d1a0:b502 with SMTP id ck2csp5596526lkb; Mon, 11 Oct 2021 09:39:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFWNqpOAw+B7WggZKYlLe4VY8e2+tXdg6JceGkIEmpnCSvMnTmTGyBcampZghkx/8WDxUO X-Received: by 2002:a62:870f:0:b0:44d:24fe:ea82 with SMTP id i15-20020a62870f000000b0044d24feea82mr4737573pfe.75.1633970340138; Mon, 11 Oct 2021 09:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633970340; cv=none; d=google.com; s=arc-20160816; b=FffoKig6iHGyYwIJG/PUI/jePQiewHgVxFIwV7vDH/h3jy4tY5uW5Fd56qqfUFCTbw 4FU03mbK6K5zqlcbnO01oCFcv/9xiNikywjh9cxAYowUaS1uH4vx8C8LM7AfyRKTa21K 4mmtzLr5TqHghMRyEtoCCgWyRqQ4fVSgfx0NAWttxlyDng2FK6jh3uS8MMuKfUb/efh2 Wi+FREUdtpkt9SjxzqcU0iY42hONqMT8afJ62H4zILUgO9CtQZb3p2rPds01cn5hIloo GBAGxSpxGh2cXzR0PW3ffpc9uGkLIdvGSV+XB5MWgK7g4/+5ptPabARcf68hPOfgZpyI TcHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kDLAV9SFvv6vvtysZB9q0KJpBPqNcjMVD5EZZnKETRs=; b=eUTOdc20zsXs10rZNIuFbW5URs4hz4hCgv0iTWJ3MhWAKkq66Qy+v7plzdkJ9lZY1a bFvqYImTT6XxafKGANHABTKrv8t17g80cJdRoVqOjTOavLQ8RU+ybh+C7phc0z5+ysKp D+f/hp93torvAnr690ALTQMwtGWxnSx+Dc80ERAlDYi5p7G4N3v0zYFbHloV5sjYVWDe Fx2EgRH+EDPXS07gKw8WZOX2566Ff2SZeEEPeV5eY5pMOZ7uquVwXujMx5QEzwsPly7U WOIDukiGENTsjDp483vzkw2HXLw8xBX1jXUwwiglaXkzmfjRdS2+C2TQVp3BhdiwEY29 dmbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pRmZ6LUS; 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=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 84si11471798pgc.601.2021.10.11.09.38.46; Mon, 11 Oct 2021 09:39:00 -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=@suse.com header.s=susede1 header.b=pRmZ6LUS; 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=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243437AbhJKOVq (ORCPT + 99 others); Mon, 11 Oct 2021 10:21:46 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:50390 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245106AbhJKOTl (ORCPT ); Mon, 11 Oct 2021 10:19:41 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 61B69220B8; Mon, 11 Oct 2021 14:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1633961859; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kDLAV9SFvv6vvtysZB9q0KJpBPqNcjMVD5EZZnKETRs=; b=pRmZ6LUSpykrXlML92cDxnZ8PEAkK1C0LwRxg2CWpfUisB/+GnN7aBbb0rDkdjhwzWL1dZ z+AMaJzy8s/EzxpI/hZq9Fa+gnd03qTH0XVHintHLUI9p24dgjs4O881erPy+qWYiGkiKl Kp/0fvtZPRYL7/bt2hVfXi5fhaKtYi0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3367A13BC0; Mon, 11 Oct 2021 14:17:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id tXwKDINHZGGIMAAAMHmgww (envelope-from ); Mon, 11 Oct 2021 14:17:39 +0000 Date: Mon, 11 Oct 2021 16:17:37 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Christian Brauner Cc: "Pratik R. Sampat" , bristot@redhat.com, christian@brauner.io, ebiederm@xmission.com, lizefan.x@bytedance.com, tj@kernel.org, hannes@cmpxchg.org, mingo@kernel.org, juri.lelli@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, containers@lists.linux.dev, containers@lists.linux-foundation.org, pratik.r.sampat@gmail.com Subject: Re: [RFC 0/5] kernel: Introduce CPU Namespace Message-ID: <20211011141737.GA58758@blackbody.suse.cz> References: <20211009151243.8825-1-psampat@linux.ibm.com> <20211011101124.d5mm7skqfhe5g35h@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211011101124.d5mm7skqfhe5g35h@wittgenstein> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2021 at 12:11:24PM +0200, Christian Brauner wrote: > Fundamentally I think making this a new namespace is not the correct > approach. I tend to agree. Also, generally, this is not only problem of cpuset but some other controllers well (the original letter mentions CPU bandwidth limits, another thing are memory limits (and I wonder whether some apps already adjust their behavior to available IO characteristics)). The problem as I see it is the mapping from a real dedicated HW to a cgroup restricted environment ("container"), which can be shared. In this instance, the virtualized view would not be able to represent a situation when a CPU is assigned non-exclusively to multiple cpusets. (Although, one speciality of the CPU namespace approach here is the remapping/scrambling of the CPU topology. Not sure if good or bad.) > I think that either we need to come up with new non-syscall based > interfaces that allow to query virtualized cpu information and buy into > the process of teaching userspace about them. This is even independent > of containers. For the reason above, I also agree with this. And I think this interface (mostly) exists -- the userspace could query the cgroup files (cpuset.cpus.effective in this case), they would even have the liberty to decide between querying available resources in their "container" (root cgroup (cgroup NS)) or further subdivision of that (the immediately encompassing cgroup). On Sat, Oct 09, 2021 at 08:42:38PM +0530, "Pratik R. Sampat" wrote: > Existing solutions to the problem include userspace tools like LXCFS > which can fake the sysfs information by mounting onto the sysfs online > file to be in coherence with the limits set through cgroup cpuset. > However, LXCFS is an external solution and needs to be explicitly setup > for applications that require it. Another concern is also that tools > like LXCFS don't handle all the other display mechanism like procfs load > stats. > > Therefore, the need of a clean interface could be advocated for. I'd like to write something in support of your approach but I'm afraid that the problem of the mapping (dedicated vs shared) makes this most suitable for some external/separate entity such as the LCXFS already. My .02€, Michal