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 A9596E77182 for ; Fri, 13 Dec 2024 15:21:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F66B6B0089; Fri, 13 Dec 2024 10:21:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 180096B008C; Fri, 13 Dec 2024 10:21:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 021126B0093; Fri, 13 Dec 2024 10:21:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D805B6B0089 for ; Fri, 13 Dec 2024 10:21:07 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 8E6EFAE7B5 for ; Fri, 13 Dec 2024 15:21:07 +0000 (UTC) X-FDA: 82890298260.12.AE509C4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id E9B04C0014 for ; Fri, 13 Dec 2024 15:20:35 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=g62pCwlp; spf=pass (imf28.hostedemail.com: domain of mripard@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mripard@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734103252; 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=0hoRjfL3xptg7GxzD5smNV+qtlkX4Gko2t2HIfAlxWM=; b=O6UMtkxDvtUZPA4sQiQXcuTTlTvwnMvNolqxh6iCF87U66Xwnwh23otr7GQgNkxnMANvm1 Isamfr5OvM1uuJ5g66YSPlJn68TAyn+pzsunqFWVajdFLQG5Fmxb3iZH61TE/iEeCI4JLD MajTGH36IIPnc2afhXI9fL4wsISqH54= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734103252; a=rsa-sha256; cv=none; b=JSpjY4cr1KFUxj9Kc9yLs6/M3ClSAm+zh6YOofCOugVaEksrYQXGKuDA8//YxidKrGnLIj d51aNq7h6nJeurBX48GhW9+Toa6275SvcfC+hjRu4XO8K53wdksGCxX/QZPSMivSTDwPgq HyiLpttwHccqBNP+ES3gE16wf/QJxMI= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=g62pCwlp; spf=pass (imf28.hostedemail.com: domain of mripard@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=mripard@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 814335C5D6A; Fri, 13 Dec 2024 15:20:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2396C4CED0; Fri, 13 Dec 2024 15:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734103263; bh=0hoRjfL3xptg7GxzD5smNV+qtlkX4Gko2t2HIfAlxWM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g62pCwlpvV+LNFMOCzHr2eJF0fLkwLy2Fw3sSp52fkuS8lN2EWsfdq44qB4w6AuVm nptCb8gDstnjiqEpdYf7u+UDwgbM7vb86JS3/hcfwbpOCwg0LeCgPf8LmEDporlrxM tZqedGi1OoNgmDXzSOOiHtUJRcKhRlow0CX9IwaOLy848Er4Hj2W77y52N4pGXQVLF cM8X87F2HadKQ05fnAiSzsetccLLwG86hhhbixmOjtCOSLOQM6Kg9ij0rsuvxlHXrP bjDKV9wBXOibh2PJdhzyyKdK16ahWSbpA//QEWgNTtXZODMVNu7bCuf5kqT3dmDWCb Ae7KLUZXTei2w== Date: Fri, 13 Dec 2024 16:21:00 +0100 From: Maxime Ripard To: Maarten Lankhorst Cc: linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Tejun Heo , Zefan Li , Johannes Weiner , Andrew Morton , Friedrich Vock , cgroups@vger.kernel.org, linux-mm@kvack.org, Maarten Lankhorst Subject: Re: [PATCH v2 0/7] kernel/cgroups: Add "dmem" memory accounting cgroup. Message-ID: <20241213-gentle-glittering-salamander-22addf@houat> References: <20241204134410.1161769-1-dev@lankhorst.se> <20241213-proud-kind-uakari-df3a70@houat> <80c49a80-d49c-4ca5-9568-9f7950618275@lankhorst.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="xzucrplgko37cdkx" Content-Disposition: inline In-Reply-To: <80c49a80-d49c-4ca5-9568-9f7950618275@lankhorst.se> X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E9B04C0014 X-Stat-Signature: q1ibmrgogztkj3xmiadgyxf9rdthkyjj X-Rspam-User: X-HE-Tag: 1734103235-489805 X-HE-Meta: U2FsdGVkX1+STv4M9vGcKaiO3gHCwNDjdisk+GbchBGmMO/bphOVXo4jRO+Dua/AzOOiDF6eKVZqXK5JD/0B95nRtCUxY7NjmYUbm7dDzL+WYL7XOxkBtaHCHB+oShGQDjlmYmSKDJHV6WxOnBu0feI1/gR+un58GTJPWhSwe+Nq9OA3eVI7LerrakQoXixTzU3YlMmaZd6ZRYYloJwczAsOoNlZL/vnxwEtNlX2Z5nrTzMnKRzBed/3Dnod9laAP0zS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XJopg44xyMCBO 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: --xzucrplgko37cdkx Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2 0/7] kernel/cgroups: Add "dmem" memory accounting cgroup. MIME-Version: 1.0 On Fri, Dec 13, 2024 at 03:53:13PM +0100, Maarten Lankhorst wrote: >=20 >=20 > Den 2024-12-13 kl. 14:03, skrev Maxime Ripard: > > Hi, > >=20 > > Thanks for the new update! > >=20 > > On Wed, Dec 04, 2024 at 02:44:00PM +0100, Maarten Lankhorst wrote: > > > New update. Instead of calling it the 'dev' cgroup, it's now the > > > 'dmem' cgroup. > > >=20 > > > Because it only deals with memory regions, the UAPI has been updated > > > to use dmem.min/low/max/current, and to make the API cleaner, the > > > names are changed too. > >=20 > > The API is much nicer, and fits much better into other frameworks too. > >=20 > > > dmem.current could contain a line like: > > > "drm/0000:03:00.0/vram0 1073741824" > > >=20 > > > But I think using "drm/card0/vram0" instead of PCIID would perhaps be > > > good too. I'm open to changing it to that based on feedback. > >=20 > > Do we have any sort of guarantee over the name card0 being stable across > > reboots? > >=20 > > I also wonder if we should have a "total" device that limits the amount > > of memory we can allocate from any region? > > I don't think it is useful. Say your app can use 1 GB of main memory or 2= GB > of VRAM, it wouldn't make sense to limit the total of those. In a lot of > cases there is only 1 region, so the total of that would still be the sam= e. >=20 > On top, we just separated the management of each region, adding a 'total' > would require unseparating it again. :-) I didn't mean the total for a device, but for the system. It would definitely not make sense for a VRAM, but for CMA for example, you have a single, limited, allocator that will be accessible from heaps, v4l2 and DRM devices. If an application has to allocate both from v4l2 and DRM buffers, we should be able to limit its total usage of CMA, not just on a single device. Maxime --xzucrplgko37cdkx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZ1xQ2AAKCRAnX84Zoj2+ dvY9AYDvYFVqP1m9MO2HUFdjzbDjD9xHT641MNrCjJEZcEFydB/kdB43puOgWw4s j5W0CqkBf2xtEgx6P3tIKULsVQRjMzYFENFOiTHzJJhIdhdUtLEgPzr+uh7+GqPW 13KbApiKCQ== =xBfv -----END PGP SIGNATURE----- --xzucrplgko37cdkx--