Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1546492rdb; Mon, 8 Jan 2024 02:46:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IElqGgQfM70b1BI/XBddqXbwlFJnSjBCBtq83FRLU6vGG4I4K1AxZsK/fCirkWN0mwreU+c X-Received: by 2002:a50:f603:0:b0:557:87b3:e0f with SMTP id c3-20020a50f603000000b0055787b30e0fmr1233096edn.64.1704710805707; Mon, 08 Jan 2024 02:46:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704710805; cv=none; d=google.com; s=arc-20160816; b=hzBeaxxXhT2q5oWkfCFNOE2JKp68PMFzpluEEbtl3boTHJDRIo9DXmkHVYQC/CnuiO 29yJPGUaPXK21vshjc8D5V1lYYtsJo7cipUo/hhLi48GOf+j0Qbdni9oWid43vW+YR04 9vIGvniXQeQxsCtY7Ctx1mTls2z61v9EZ8fMxjBZ4oqV9ndOo26pDBGjaXGQIfCprEGi NzAdYGfEl4NxmqfD3eVbytFNnhPB8KATQ8opeMv86PY8AI8HMowCTOPNYG0bqltuIB0a KOIW1JBqBFsCrAShEKQtUFxcQwgZZoDy2H7WgGa/onCm2YkteFk6UzmXOvG5D0ymvulh j4jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/8w4vROXmW0/3v/ZTMz/G2a/IUmTbhMJq4VGl/To7Ag=; fh=Tg+iK/mtBMU5WI6r3+3lxZk/Qs91S9FQJyDwmQJPOUs=; b=E0mohNz0c1QQuGbt2dIFFY2QZSb8x1vL45bImjcuKF0LZhfd8ftnlemESoctpP7Ucy 9pEXGSBT1iDnktk2CuMaA16rlPfx1Sw+5AonM8exanyvQvxkFd/MCQBnrkP9y6WbnBnV TDsdKkX7hj/22Uy1J+dAntNebTKLGvj/oEBk7pFJOeyy52/rN//5sz+zC2qKAgtaxlTF 8Io98u0yDIEqHYWU6IqtEidZxbhBqJA1WjqCEFZLv2PolDGu4/mFO0nX2UARYpa9yXVA HuE4cb9H76f0/pXn3L52f0jHFDZRluSEXmNVtGkL7QyB5ALy/oEpFKbe9JZXnvVNjxQ0 rNNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lUcKlsH/"; spf=pass (google.com: domain of linux-kernel+bounces-19351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19351-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w4-20020a05640234c400b005571feabd60si3014805edc.667.2024.01.08.02.46.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 02:46:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lUcKlsH/"; spf=pass (google.com: domain of linux-kernel+bounces-19351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19351-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6DD3A1F22464 for ; Mon, 8 Jan 2024 10:46:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A09F22EF7; Mon, 8 Jan 2024 10:45:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lUcKlsH/" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D0B2B21A06 for ; Mon, 8 Jan 2024 10:45:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12AFDC433C8; Mon, 8 Jan 2024 10:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704710755; bh=/8w4vROXmW0/3v/ZTMz/G2a/IUmTbhMJq4VGl/To7Ag=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lUcKlsH/SdHBtzI4vy0A2Qqm35XwzGuihd4efUl5q23f+fmPWhTqPUxAsFT9sFh2L qY9e6sgVaivOOC6OP5miQTTk7CjX3y+/Rc3CM7M5Ot5kaY468yaK5bl2qIYA1KkRlv U2ZrRCBzKjNg3uCHRhg9XfP54Q7NnBMgEWEHu1TOsTevWQ/uRZdmF57jUr0dMxtRid jdsWFOHAetoZXEM035kJhLQdv7L1UzaUTMEAGsJ3MiRYkrirWLpY7PXuCQQxEPpxHi lYau/fwzX/vG+VkN+wImDsU3lJ3JBQBF610qbJ4QCThDc+3I9gOIbHoTMNMrO3/vZA P8MOEjhgdiqJQ== Date: Mon, 8 Jan 2024 11:45:52 +0100 From: Maxime Ripard To: =?utf-8?Q?Micha=C5=82?= Winiarski Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Rodrigo Vivi , Michal Wajdeczko , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Javier Martinez Canillas , =?utf-8?B?TWHDrXJh?= Canal Subject: Re: [PATCH v4 3/6] drm/tests: managed: Remove the waitqueue usage Message-ID: References: <20240105101324.26811-1-michal.winiarski@intel.com> <20240105101324.26811-4-michal.winiarski@intel.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="iu3intlqu5kvvetm" Content-Disposition: inline In-Reply-To: <20240105101324.26811-4-michal.winiarski@intel.com> --iu3intlqu5kvvetm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 05, 2024 at 11:13:21AM +0100, Micha=C5=82 Winiarski wrote: > DRM managed release (drm_managed_release) is called as part of devres > release (devres_release_all), which is not async. > The release action should have already been executed once > drm_kunit_helper_free_device exits, meaning that there's no need to use > a waitqueue - we can just inspect the "action_done" state directly. >=20 > Signed-off-by: Micha=C5=82 Winiarski I disagree, nothing guarantees in the API that it will be executed right away. Since it might be asynchronous (if something else holds a reference for example), we need the workqueue. Fortunately, it turns out that it's actually done right away, which also means we'll never hit the timeout and thus never stall the test run. Maxime --iu3intlqu5kvvetm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHQEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZZvSXwAKCRDj7w1vZxhR xUy9AP9z4a9PtD1LHH9YlF2EJRnFrx0g0iY1U0rxHWhnZXFVPgD4iX4Hm1zoLjXz 0BccGN772xsxXdWGatm/UjMXqVaxBQ== =mn+1 -----END PGP SIGNATURE----- --iu3intlqu5kvvetm--