From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1915347DD56 for ; Wed, 6 May 2026 15:09:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778080170; cv=none; b=UXkcagET8s5U3Ucn99nmLP4YgO+yz/x/D1eeXpxpdF79AYFBeKCsEMcKtoCWtDBm378ei6lY3hqfM5HE0U87WQCBvc4dzqBX3VSPKpMxDd7quEOl1GFw2kwjooVlxtyZbHpylVyRTbFDBwBzEtB+QlBxnQ4jGIP9UkT9lpMtgYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778080170; c=relaxed/simple; bh=PtBGz2x9WQ+HNP+qaMuedUIcyx8fnxzRJan7d8nhIVw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QptENxP+Nlz53BMuWYOwlms+nqcEriQIav09k5UB5M3vS1/tD3XcmCnkmixIPv3iK/M/TcyHis+V2SRz37/6K6FI9f2Qxr5KiJMnkUdc9zB6WgI3dFcJE0lkozDDlXNRCvRrFsf1bT1WMTjE7WZy5+KhSu3PR4YzYKTTIIyZFFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Xnatgcey; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Xnatgcey" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-488e1a8ac40so64618955e9.2 for ; Wed, 06 May 2026 08:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778080167; x=1778684967; darn=vger.kernel.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=PtBGz2x9WQ+HNP+qaMuedUIcyx8fnxzRJan7d8nhIVw=; b=Xnatgcey/IP8Zx9HfCzEL2xBhxJhqTmhJP7ZDQbdZ/U5aY0kDaLlcsqYS2QdU/Toz8 ElqL+dXp1pju7n6WGfAGfxXJTIqJFM0TKRlZV5sQv0E4tYMw05DGASELN6KYy/ithcL6 2mYoR+7mcFzTvZMhteC2QqzrY1NIRW18G9TtIxQa3RaxbTiCx0CJg4wVKLHYu4vBU3Ez XbIfZFucdni8K7jEuTxqYWAlp8NVYOqbU/Dhn7nDXVAjb4Lno7hO6zkkmmrTmVLp1yyu V3yuaBDo1TkXp4CfgzDgBmT8P0O8aJ1DcEDB6aEwJsEVJzJu87yz+QUoEdov7fafNjXn XUwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778080167; x=1778684967; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PtBGz2x9WQ+HNP+qaMuedUIcyx8fnxzRJan7d8nhIVw=; b=SYKZI+/Y9yKh+Fa2i9tbbGXLNORsGwDMzeKXVyqVMAQJEkeBgLNq82QnJkJ9xsqOB2 bS/yEi7HNfAroauhQDtWGp0iA7XtCppPOMOOySe5vtnotCKdcrQBqwDCFa80v+PHP/Ta jwe7KGM780ms17Cr/7Nfp94BLp06RBjq+yRozqzhi4dh3Mecm/vA/PZbq4I1EQkbapmk Y2e1t6ir7fXuEn4FWx2nHaaPo1HdPUDQamukVC/pyfGuNP8JflKVwj4XBFILqJ/wywy0 ZRjuwAP3SVmYoOKjaEm83VXmrDTq5XKdNNZnQoiIzmbaCJSpewPgPQjHxrvPof/qYM19 sRYA== X-Forwarded-Encrypted: i=1; AFNElJ/uYXYQ15XwRFkSU6t2hk0Vfjnp2cFpzYllhgBiRv2v5GyVrOeOljuXsgsH4+xfOH9gU/o0yO9Nc8Ik5GM=@vger.kernel.org X-Gm-Message-State: AOJu0Yw66utG3dpoT66LyUDH8Hl3iBXZsn1+71quyBxauzSYSHmBKrsq +gAXw3aF7OKHmEEaydy9cyZYfFtSn9o6ZP2HYqnJQSM8OMsslW+xSAEGVdITo073N4s= X-Gm-Gg: AeBDietkkXnlM2kW9U8EkUn7EGiTq2dxuI8yz+gSaU4CpjQMYrEqOb4lzbkVpfx3IYZ AyDIUyayJy+Tp7ZUkSIcmMQJ6C4YvSAJV/iecn7YgvQMoIfqlZ5oNFZrWDB199gRzzlnztY7p4t NL5OSiRGuLlSBh0/6jI1m5M0n0Y4A7kfivDJ8xIE4id3yGP2qDsr3vM+1Lfo6iUkxdWDza6VdDb tsfgNQOiGz7YRK2Qh6486TYqQ0HWNHiHo/jtULlZVUoPDr9Kwl4AWkmZy8xDFGyc9f+3YNRPa4V 4yWZ5zllQnt5D8xoZxInA4FkrGTCB6z+QgSD8uqEu1HTE/k1+ZumALR4wbl5Pnc0aXApNeALbBm j8niSez+1MIvRwIF2TYqw4j5AwiHvS5KPmbYD0zPQebvAdTTmWt2CKoMAuuUiYF/L9gj/KDkZOl HBFZ9mad4xau1NLQV9z+uS28txqX6HtEuBbrU14W0GWZZ4Kk9ATmWhgDgMzvQ= X-Received: by 2002:a05:600c:8906:b0:488:ffad:6728 with SMTP id 5b1f17b1804b1-48e51f46d7bmr49899505e9.19.1778080167469; Wed, 06 May 2026 08:09:27 -0700 (PDT) Received: from localhost.localdomain (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e5312df8dsm18475835e9.18.2026.05.06.08.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 08:09:27 -0700 (PDT) Date: Wed, 6 May 2026 17:09:24 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Thadeu Lima de Souza Cascardo Cc: Tejun Heo , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Jonathan Corbet , Shuah Khan , Maarten Lankhorst , Maxime Ripard , Natalie Vock , Tvrtko Ursulin , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel-dev@igalia.com Subject: Re: [PATCH 0/2] cgroup/dmem: introduce a peak file Message-ID: References: <20260506-dmem_peak-v1-0-8d803eb3449c@igalia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pjfnm2wcpgmp3gca" Content-Disposition: inline In-Reply-To: --pjfnm2wcpgmp3gca Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 0/2] cgroup/dmem: introduce a peak file MIME-Version: 1.0 On Wed, May 06, 2026 at 11:18:26AM -0300, Thadeu Lima de Souza Cascardo wrote: > I used void *, at first, but as the only current use is for the pool and = as > mixing different uses may lead to misuse, I thought it would be safer to > use the type directly. This has been pointed out before for other members > of cgroup_file_ctx. See [1]. That mail reacts to union overlaps and pointer vs embedded struct allocations. Correct me if I missed your part. I agree that having properly typed pointer is safer. cgroup_file_ctx sub-structs are for generic cgroup files. But here somehow a specific controller needs propagated to the generic member. What about storing also the `list_head *watchers` inside `struct cgroup_of_peak` and each subsys would manage it as needed? (ofp->watchers =3D=3D NULL could also substitute ofp->value =3D=3D OFP_PEAK_UNSET) > I started with a non-resettable peak file, but as memory.peak can be rese= t, > I added that feature too.=20 At the same time pids.peak has survived without reset option till today. > If we want to merge a non-resettable support ealier and need to take > longer to discuss how to work on the resettable support given the > above, I can resubmit. But I guess we can see if we can reach an > agreement sonner rather than later. What kind of users do you envision (i.e. would they need resets at all)? Anyway, the behavior should be explained in cgroup-v2.rst since that's where they'll look for it. HTH, Michal --pjfnm2wcpgmp3gca Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQRCE24Fn/AcRjnLivR+PQLnlNv4CAUCaftZoBsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQfj0C55Tb+Agf3gEAnS3SQwtU72d+vybPMvLs abYBuiDKjsiW+4zy1RFNTAwA/36oWRqQ1pjGEuPTFgTxHnl4+5Ls3E65Byjp41wO W6cN =obKI -----END PGP SIGNATURE----- --pjfnm2wcpgmp3gca--