From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 55C7F32B108; Tue, 14 Jul 2026 22:09:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784066968; cv=none; b=iX5Vd7KMRo8cj+/ODAE9jR++E2Fbk71k/s+DBPx0cITQ6ttKSLrorZE+JpaR3qiR+3qN0n7qj4kcP48SOvKD+Z/xqRn+afauLi5lgvPmJWBB2sEoFqlMWymcsODo64S0qriR0UZutX58t1D6KaOOWrYmMoXzdsWxoRqQ1wqztSA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784066968; c=relaxed/simple; bh=WFnyeTa3mJh1SlKnasalPxh3NphMILx9MnorwnAMzW4=; h=Date:Message-ID:To:Cc:From:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=SZHrfRxFedbOoH6O2JZ/wpzSgkF9Y1S/5z6IXzXZW3rZWlC3hFiXo14fB3DorgswzomQULpWNA9Umff/Kru5PD59dMfyxIuuDzMOqzj0CMRFTjNyY6rae9D3rhEB3b18tHWXVpYn6qgQROhYmMe44g5R8TShmFLZWRm2X5iT4Aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DqaY2kZl; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DqaY2kZl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D74161F000E9; Tue, 14 Jul 2026 22:09:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784066967; bh=Zxgrol/rhLCcz5WkQn7r9aXEdOI37ZHRmg+Zpz3syog=; h=Date:To:Cc:From:Subject:In-Reply-To:References; b=DqaY2kZlX5oAx64LWOZgEdRs5Dq2aiuVTR6WQzzOG/yKKWVp8QcAWgrP7iQBObT0C 9h1dCZeqbK6q/BS9oc/+8wbuUIBkusAHWQ9Ti7abKAATR/H6RO4Phjh29T9dTDl+ab dFslzRnWKlNKtHntSdTSwvp28Znc+b66oOubrJsnPGbX3qSOkMPsZdo8dQ+Nx2glM9 DL8sD6apqZeteG5j6/wQ0hN/yItTa28D+DvrNg7nnAtNTpQMa9K81YUHFAtis2JZZw UdACJXvz33+WTeCahoDsSt00czQCt3UiSInwJ+avqYUjsnqj0FU4ol3BI7G/LoP7ps bLDgv+1ryLMew== Date: Tue, 14 Jul 2026 12:09:26 -1000 Message-ID: <4ae04b8055b7145e182380a46f92c26e@kernel.org> To: Waiman Long Cc: Johannes Weiner , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Shuah Khan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org From: Tejun Heo Subject: Re: [PATCH] selftests/cgroup: Fix intermittent test_cgfreezer_ptrace test failures In-Reply-To: <20260714183125.521650-1-longman@redhat.com> References: <20260714183125.521650-1-longman@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 Hello, Waiman. > + usleep(1000); > if (cg_check_frozen(cgroup, true)) > goto cleanup; A fixed 1ms sleep only hides the race. On a loaded machine or a slow arch (you mention ppc64) the refreeze can take longer than 1ms, and the test reads the unfrozen state and fails anyway. The freezer test already has a way to wait for this properly. cg_prepare_for_wait() sets up an inotify watch on cgroup.events and cg_wait_for() blocks until it changes. cg_enter_and_wait_for_frozen() shows the pattern: loop cg_wait_for() then cg_check_frozen(). The cgroup always ends up frozen, so looping until cg_check_frozen() reports frozen is reliable and doesn't depend on timing. Can you respin using that instead of usleep()? Also, temporaily -> temporarily, in both the changelog and the comment. Thanks. -- tejun