From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBAA98287E for ; Thu, 9 Jul 2026 13:31:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783603891; cv=none; b=NlYQ6DM7H3YInYQo6zHRSlu/cL/oovrVogNdZk+emA3JoTPA1pF7vK8y7Djy98y7/+suQsMaBEUTc1a8fHqdfzJJyKOGjFhpRZnTk5HKgs3SVWS0UMFtdy1gA1RxR1DaH3im8wkgkYtC+dZ+4CZbQjWN833KPXEIyS5m3k+liqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783603891; c=relaxed/simple; bh=Ut8bhtlffnJ9/ELCph4aBFL8HoBapcjMEL1zurQQoj0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KSBeieifbMirWCNr5jxLXLmYQRJtdwuOGYCQaE9WiGQknVbjVuV7FBZVDi0yvMD4t/phX5GMPy7ZoZ6RmQNejLAm+jpWkHVSXwFkoaSfz5ly+48f0yNSXFcxPmv6Bb6RKcZutBMmnS4hyp3EeSS2flgfJADPs8kKRWAssKCuQt8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GgYnx/i+; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=TpKdJo+M; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GgYnx/i+"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="TpKdJo+M" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783603888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kzK7Wx/CjJVGVlD6RLMcxNO3zdlDorGZi/W+knFvfoc=; b=GgYnx/i+AkfeM8u634cQadMWCggoONgXo3rllTSGmkP5yu2pbJXwerl6qPbGH/wWmu7i0V f3B35GD1tAx9GQ44GLxlBAFvItKdQazzHaLaMOo0BALccRWjtZqQG5/IOl+uFzHvQg4m1a Bm9xvRCRUEaQwcGmI4FxcmCUcZrQy00= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-tKkmbb5DP2StO_SaIG8Nfw-1; Thu, 09 Jul 2026 09:31:27 -0400 X-MC-Unique: tKkmbb5DP2StO_SaIG8Nfw-1 X-Mimecast-MFC-AGG-ID: tKkmbb5DP2StO_SaIG8Nfw_1783603887 Received: by mail-vk1-f200.google.com with SMTP id 71dfb90a1353d-5a83b662fb8so1936174e0c.0 for ; Thu, 09 Jul 2026 06:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1783603887; x=1784208687; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=kzK7Wx/CjJVGVlD6RLMcxNO3zdlDorGZi/W+knFvfoc=; b=TpKdJo+Mww8TckRkloqDYI0lVVO6rZGh5+gjJbBvLYnZpTc7D+5r6mUeTsNouOMJ3j rVOiM3k3cpvMMIMo3VzTjQX1mRJ36YGHDBmsPypI7pesrafqhdlVJ6/ukwgL6APk5hKY frQqXkfuj9ate41NrMElUAv3kuAoDDnK0IEfTzS/5m0EpZYn8JIacsCG72ADYaDePgPw 2sndtj0E6XpiGU0nFxFrP4GqKL9lg9JV8RcRRZw0r2bhmpN4VnkIPsJfxxJN5P9d40Qj gsmaopQ3uXLgiv20eu8vwSbdTCyybDw0FK8sZ2d88RnSQ6Mf1IaZiHgp00unTadh+BHx dr0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783603887; x=1784208687; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=kzK7Wx/CjJVGVlD6RLMcxNO3zdlDorGZi/W+knFvfoc=; b=rmJGwlUeLVy7WCvqIoBP6zPn75JMEYBz6d278uSNb41ZJcv9z4toaCWQnVgPiz7W+v x2anu1SZXNLWolYp8VbTMhGJhFMKJln4kGwYrEZ7KHl+3sDoGSG1nRERPFQovXErSMhh It03n74BDsqgafuTqHFXAT+SiQKO62JyVQVkBUjsdgC17WFAgZvb+8jt3G24UxwY9oHi 17zkL99rLrOgUM8PHBMCBQ6dJqdP6/ManB3cGjD6XYkq0bWP6LjqHoYA26CQAc54UmHi SdIqcDJAH7gg3BqEWj0JHdj30XgXKhUC1uswRwZQ/HhZ5+814A1eCDN6rFDI+2+EktUU MEmw== X-Forwarded-Encrypted: i=1; AHgh+RrptOjdup4IMVISoOt9Y/xVvYz/w9a4BBQVr1HyVi3SbwJetMVGJZp8DIarfTDETwJ5wFkldrfQffkTofQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yw35wN6Mxp1BUsDzO5qM9os4Vc4Kcbtp9tmjWUzk2cTAGYs06zz P11jg2z3uyFDsLBu//nKUXR0V3mym1Ez5W9mKXowqYLY6A74iosOpGbHnBEREOYCdJ1Kbgzxw81 eX+ZKV82nRQROPhfyAlA4AXwfOPjNCqj/bzu5xV2DqVVVgE29QlEQs6HMDY4mWP6XfA== X-Gm-Gg: AfdE7clPNZVitqUPBKC2z9q7FDNn9d/mC/9i++Z+Oiot3IwfwNzIOex1eScj5z0yE7I x2KQYitf7emffGdTgaOBvqMFOh/pyu8nfgMb7Hqid0n0iifw1B/qYf4oqxqQaG3YtQTq1df6pgM /Vu2Z/f3QzAvME3mlcWX6Yn3VFmmbLL6lLOFv+vGCSmZu5rNPMoAwU7okgRhjt6Kes3z7uqjPJs RjyR/MaerbLLUsMnw3aDHW3C+jJQkTvXohBTBNPZMlUTTfIkI0ROHXyjaoefsggWeNeYKSIYAzc jQ367fCs8bpadap877hFtBNwbrI6QgQbPAGWdpiUqOdp2Eq3T1f77c5c7nvgG/vbYKUCqh3mgfr ORZd1/kO4PNqkvCxhSkyaFE4MSYpy4I2+41lAaD2TKznCK4bPB72x5Js= X-Received: by 2002:a05:6102:688b:b0:631:ff40:22b5 with SMTP id ada2fe7eead31-744e0333f94mr4210916137.21.1783603886753; Thu, 09 Jul 2026 06:31:26 -0700 (PDT) X-Received: by 2002:a05:6102:688b:b0:631:ff40:22b5 with SMTP id ada2fe7eead31-744e0333f94mr4210626137.21.1783603884528; Thu, 09 Jul 2026 06:31:24 -0700 (PDT) Received: from localhost (pool-100-17-17-231.bstnma.fios.verizon.net. [100.17.17.231]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-744d6a3eb8esm3409363137.3.2026.07.09.06.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 06:31:23 -0700 (PDT) Date: Thu, 9 Jul 2026 09:31:22 -0400 From: Eric Chanudet To: Albert Esteve Cc: Tejun Heo , Johannes Weiner , Michal =?utf-8?Q?Koutn=C3=BD?= , Shuah Khan , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v5 2/4] selftests: cgroup: Add dmem selftest coverage Message-ID: References: <20260706-kunit_cgroups-v5-0-6c42c8753468@redhat.com> <20260706-kunit_cgroups-v5-2-6c42c8753468@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260706-kunit_cgroups-v5-2-6c42c8753468@redhat.com> On Mon, Jul 06, 2026 at 02:06:41PM +0200, Albert Esteve wrote: > Currently, tools/testing/selftests/cgroup/ does not include > a dmem-specific test binary. This leaves dmem charge and > limit behavior largely unvalidated in kselftest coverage. > > Add test_dmem and wire it into the cgroup selftests Makefile. > The new test exercises dmem controller behavior through the > dmem_selftest debugfs interface for the dmem_selftest region. > > The test adds three complementary checks: > - test_dmem_max creates a nested hierarchy with per-leaf > dmem.max values and verifies that over-limit charges > fail while in-limit charges succeed in dmem.current. > - test_dmem_min and test_dmem_low verify that charging > from a cgroup with the corresponding protection knob > set updates dmem.current as expected. > - test_dmem_charge_byte_granularity validates accounting > bounds for non-page-aligned charge sizes and > uncharge-to-zero behavior. > > This provides deterministic userspace coverage for dmem > accounting and hard-limit enforcement using a test helper > module, without requiring subsystem-specific production > drivers. > > Signed-off-by: Albert Esteve Reviewed-by: Eric Chanudet -- Eric Chanudet