From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58D8BD3A69D for ; Tue, 29 Oct 2024 20:38:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D482A6B0089; Tue, 29 Oct 2024 16:38:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF75B6B008A; Tue, 29 Oct 2024 16:38:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B97786B0092; Tue, 29 Oct 2024 16:38:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9A9DC6B0089 for ; Tue, 29 Oct 2024 16:38:42 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 46EE3160612 for ; Tue, 29 Oct 2024 20:38:42 +0000 (UTC) X-FDA: 82727802024.01.9A82788 Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by imf16.hostedemail.com (Postfix) with ESMTP id 86109180015 for ; Tue, 29 Oct 2024 20:38:15 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=E26CabEo; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf16.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.219.51 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730234203; a=rsa-sha256; cv=none; b=BxaqY1mvQvoym3Ck9DA/amIc1CpObtToP94FChhPDRV6ySM7W8bN2zk+uFW9zlvyoJaA+q qzwxaRA0iJmNewWfz4FfCtRuDa0LXLhtCSoZ7gIjXPyl17aqZ3YodHGG3QimSbunZaGBQU 1aCm06gVUB4qMaQYny+iL+WxdSMpGDA= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=E26CabEo; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf16.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.219.51 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730234203; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UHhE7+FsFDchxD8LtVUn2ccYddeUr5QRSaFaIZpCbLM=; b=gTZHFU+W3v3XJ3DxbDCFtsDzU5MO7K9EIedE+FXrEfw6grYcfG0A+PXguQ5V3uINmB5DSk XE3Ywxo63G4TRBUrYIZY1Br+NobVPedIW40EN39XMSeq64vuZa3MUKOZ/wGeLxea1GEM7B AeBioG+MjIuCOL9wb9bit5Q25YQteAU= Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-6cbf340fccaso2159406d6.1 for ; Tue, 29 Oct 2024 13:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1730234319; x=1730839119; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UHhE7+FsFDchxD8LtVUn2ccYddeUr5QRSaFaIZpCbLM=; b=E26CabEozrzJb4deXSr+apEyPPFLR2nmNoPqbtNWwbS4N3B5tPisM8T4o/UB4UK4my nzxC7Z3sH0cTHLwX/MlaAeqQk7GkBpK/+ugzvdePxiZPjET8XjCr0SsJ06wecnRFo+kx VNQEJw8uRyAtz67Tyu9NLHBz25YAOCf1X1FEmMo9lvA+ZOc761Ln0EKw/Eu1wRJzx7Wc gW3otim6RS4MfsBV5g2fdyeCP1qMzU3okZaF78eVzWrDwyCYK6JRysCXqTk6sDK9s1J7 lCD8b6QwN5mMKGalrB0a9ueYqmIJtLpeAdUpgU49nkO8kp4dE0rIqUCmjkCB5KjpnqwX SlGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730234319; x=1730839119; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UHhE7+FsFDchxD8LtVUn2ccYddeUr5QRSaFaIZpCbLM=; b=ikVfqdQiKBeqVr0oL0ROL5EAtdnoKEq3N3Ls0cSscB6qpjBhVmYFb5hWgoS05uklm/ 5cUk/56+tfs2sIAPB7p/C6C+2cgGigjojQjb0XQvaQcUsuEIYFh1puybePhIEmUTPxpT ciCqhwJsbO4fc/1XZkDukI7fm0/lDs0NcmqLzvwuqZeSkhQuCGqhj7Vq7onhGPS4Whqj OZZxE6fep7qCKbNxED9DvwBf0HWjgpSzmtMJeHzLGXdIfZ5jdx0V3ZGgt02g1H31p7+X jhEayDH4OqeXHNPZ5J9ydgys/sOU/79BCzRKBzEDO4VOzIaDH5AY6tTE1YgIJ8c2nT72 PNoQ== X-Forwarded-Encrypted: i=1; AJvYcCVGjwd8zLOmr9+6uuB6xgyQDWWqBTmVrHjGY6jl4VwWIKOMOQ15L7gVhdLEdnjfrmAv7S5x4wvPww==@kvack.org X-Gm-Message-State: AOJu0Yyt7S0T6eFvjCtOUwbT1WorjnftCncCE9UrTsy+lBKIv7xtfZjL D7tJPx48FcPoSLQ6x+B+iYfJGFb5sNSulUCwIJiwj5nR34aNOWKnk/6IXQSsM9E= X-Google-Smtp-Source: AGHT+IGIGf+fLyqvRxEZUSRr0al4OL6PJFH2Lr2FvVUL+VpF7BsP3nR5JjnLPEDC4jbvktWXK39Ngg== X-Received: by 2002:a05:6214:5d8f:b0:6d1:7455:9b0d with SMTP id 6a1803df08f44-6d2e7225ddcmr51294016d6.16.1730234319248; Tue, 29 Oct 2024 13:38:39 -0700 (PDT) Received: from localhost ([2603:7000:c01:2716:da5e:d3ff:fee7:26e7]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d1798a838fsm45773516d6.30.2024.10.29.13.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 13:38:38 -0700 (PDT) Date: Tue, 29 Oct 2024 16:38:34 -0400 From: Johannes Weiner To: Maxime Ripard Cc: Tejun Heo , Maarten Lankhorst , intel-xe@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Zefan Li , Andrew Morton , Friedrich Vock , cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 0/7] kernel/cgroups: Add "dev" memory accounting cgroup. Message-ID: <20241029203834.GA636494@cmpxchg.org> References: <20241023075302.27194-1-maarten.lankhorst@linux.intel.com> <20241024-beautiful-spaniel-of-youth-f75b61@houat> <20241028-meaty-mega-nuthatch-3d74b1@houat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241028-meaty-mega-nuthatch-3d74b1@houat> X-Rspamd-Queue-Id: 86109180015 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: wrskhknsfs316jw4dnjoxtoagdfdrhrx X-HE-Tag: 1730234295-695699 X-HE-Meta: U2FsdGVkX1/sihtVb1HqwkW2p5mgTFiBhx1DkSXa6oVBIV3dU/GDcR0jbusS7M9J1c4IgwjxW3KKWShaBTVJtZkNhKGgyfYbmENKtfg5Yz61LhVRK6tBknZP+nbwUkotRJqO9m6lLgTjenm3zL78h7n+Y5b9H1iQ71dOmxRTo24dES241RwevUYxjnBP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Q28snJo61xzeidetw1a9f4dCmnxyskT1eUNPJnN3kM8McukfVzrxhKGe0eIum1t2hpG0pkYmgcYlkexUIEs85aPYZCv3V07WtrJC14rD5Jq4k9ACl+B6KW0NBzAFZoGy5LnNXRjh/40342uJcDAWzuD0P2zd9TTK8WjTKaA8peK1umZvEa02SpQpAS0M= 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: List-Subscribe: List-Unsubscribe: On Mon, Oct 28, 2024 at 11:05:48AM +0100, Maxime Ripard wrote: > On Thu, Oct 24, 2024 at 07:06:36AM -1000, Tejun Heo wrote: > > Hello, > > > > On Thu, Oct 24, 2024 at 09:20:43AM +0200, Maxime Ripard wrote: > > ... > > > > Yeah, let's not use "dev" name for this. As Waiman pointed out, it conflicts > > > > with the devices controller from cgroup1. While cgroup1 is mostly > > > > deprecated, the same features are provided through BPF in systemd using the > > > > same terminologies, so this is going to be really confusing. > > > > > > Yeah, I agree. We switched to dev because we want to support more than > > > just DRM, but all DMA-able memory. We have patches to support for v4l2 > > > and dma-buf heaps, so using the name DRM didn't feel great either. > > > > > > Do you have a better name in mind? "device memory"? "dma memory"? > > > > Maybe just dma (I think the term isn't used heavily anymore, so the word is > > kinda open)? But, hopefully, others have better ideas. > > > > > > What happened with Tvrtko's weighted implementation? I've seen many proposed > > > > patchsets in this area but as far as I could see none could establish > > > > consensus among GPU crowd and that's one of the reasons why nothing ever > > > > landed. Is the aim of this patchset establishing such consensus? > > > > > > Yeah, we have a consensus by now I think. Valve, Intel, Google, and Red > > > Hat have been involved in that series and we all agree on the implementation. > > > > That's great to hear. > > > > > Tvrtko aims at a different feature set though: this one is about memory > > > allocation limits, Tvrtko's about scheduling. > > > > > > Scheduling doesn't make much sense for things outside of DRM (and even > > > for a fraction of all DRM devices), and it's pretty much orthogonal. So > > > i guess you can expect another series from Tvrtko, but I don't think > > > they should be considered equivalent or dependent on each other. > > > > Yeah, I get that this is about memory and that is about processing capacity, > > so the plan is going for separate controllers for each? Or would it be > > better to present both under the same controller interface? Even if they're > > going to be separate controllers, we at least want to be aligned on how > > devices and their configurations are presented in the two controllers. > > It's still up in the air, I think. > > My personal opinion is that there's only DRM (and accel) devices that > really care about scheduling constraints anyway, so it wouldn't (have > to) be as generic as this one. If they represent different resources that aren't always controlled in conjunction, it makes sense to me to have separate controllers as well. Especially if a merged version would have separate control files for each resource anyway (dev.region.*, dev.weight etc.) > And if we would call it dma, then the naming becomes a bit weird since > DMA doesn't have much to do with scheduling. > > But I guess it's just another instance of the "naming is hard" problem :) Yes it would be good to have something catchy, easy on the eyes, and vaguely familiar. devcomp(ute), devproc, devcpu, devcycles all kind of suck. drm and gpu seem too specific for a set that includes npus and potentially other accelerators in the future. I don't think we want to go full devspace & devtime, either, though. How about dmem for this one, and dpu for the other one. For device memory and device processing unit, respectively.