From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796108776; b=qIBtARZHFo6rsqO70aRq2rR3l2CE0Ul9jAqGHLEgWFzVwWwaVZVZAYmf2lxr75pyo8Ai Xy0P3vFG5ZTnvFK7MMfH+FUc6qVf8e/W3jP8XTglaxO7Q/4o+ANSHCHQIlpdgmvTPYlZj elArgdoXjyAtTOkmtPVAkuFmxh5ZiKJBLyDcaXsit2NWH3DTcA3i3+WbFCy2j6tgq0waw uWg9xrCHlo88tLAZyLfQXS2P08gkBRy+/Q3cXyFHcJmvwDhVkDflsCvbiO5mInUxsukcg gMxCZ2Dnlsf0DQLiLLTpCqAHD/DkMDoEU2PSxq9tGm4LdblHUgaVe3XRrU6q5pPTdZQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796108776; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Content-Type:MIME-Version:Content-Transfer-Encoding:From:To:Cc: Subject:Date:Message-ID:In-Reply-To:References; bh=XzQ0Z1yegShDpTN1iMa0GXN8c1oa/qO6dnNNa0UiiCM=; b=ohQJm7e6Lyl0+5XG7DWtydPJtZGoCS/JokVJwUUk8XxMhrAGFYfuVZbHEEHQMyPhWM74 L1DoOeHeE3XTj1+BRbINqONabtzj2+crTy7JkQS0tv7afaKfs2n+rvMs5G9ZgBEtRvxB7 zDg2wuxVX4QVdFkXNAMx3Tr5eYgVTf8fbFLvmadYPCRzhPcHPV+/OCNbBtuj7OnNApUAT 0Qj0tQFswX6S7WD5bS6TITy3RTvxTV3DlHrwWyPz1cDQ8mtzyzqxsTGJUKH1iUko3SSSc JRAZxkszRP/wnRoefYNCDMYxlUbqRuicTC5fBKNdBjhJQs9Kaff8Xcuv9u7ovd360Xw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lXaSHaa+; arc=none smtp.remote-ip=74.125.82.173 Received: from mail-dy1-f173.google.com (mail-dy1-f173.google.com [74.125.82.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0344B606A31A for ; Tue, 1 Dec 2026 07:06:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0344B606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lXaSHaa+ Received: by mail-dy1-f173.google.com with SMTP id 5a478bee46e88-38692f62b22so17134532eec.0 for ; Mon, 30 Nov 2026 23:06:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796108775; x=1796713575; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from :content-transfer-encoding:mime-version:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=XzQ0Z1yegShDpTN1iMa0GXN8c1oa/qO6dnNNa0UiiCM=; b=lXaSHaa+G2cLX2bDhcI71fn9onL2ofYQurmVqGqnzsmgdrd+ZMXYPBcD99ATlyreqH /AMohRpIf7LOjcQ6TODa5ctqH7Yx5m6Ga6C6dvRL7DfNNNEIH6o7JII0IhSqGjBqB9sb ZMvkYY6Sagu4JwVyUNc3WHNDH5lVZC8g5unB57RXa+6Vdw/xBCDroA0dxZZls+1UINRD 5zPj8SRoGvBd7gm6+B3O+XAD6dllXigj8yUMsDS5XuM5bXI/3Tzww+CGtCrc36zsH+Sk rIJkpEYp1OS6KTyEEkwjKKMGSmwlWcSLxCyNlqNT5xNycL8fOlKCZdwSwfbQK3E+hi8+ GoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796108775; x=1796713575; h=references:in-reply-to:message-id:date:subject:cc:to:from :content-transfer-encoding:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=XzQ0Z1yegShDpTN1iMa0GXN8c1oa/qO6dnNNa0UiiCM=; b=QYR8A5ZBBjJpCjeJiG+naMDmUvhRVMrwM+6xx2jDwNPRwQ3+eh2x/RmKda+6wQf24S sC+GivyC8DXbxfazWQYaFZwkz6bUZXKwpYH/2nK2pTrlnyVfpHr6g0ggNJ8l3g4TN8XF 11KMbMpiwPrsGskn/5YXJd6TLdFaJX/PSEqKbx9QlCr9Zl8aoe+O5o1e2C/TmMDAh5hj tlDMm9OyClSkgTi4vSWAh41LHfFP17VWVAYUeZN22vpmad+nJguyOgcDeTey8IJip4E0 bnmV0CO2NKdgqoA/jza+VUdKiUSaDoeBIixD8KFeulm5B2XGeSlpYxibPoZROpMWVc3A aS/A== X-Forwarded-Encrypted: i=1; AL+hErFaszSgXGiqHAV0PVRxcDS58mnsJgUhuONIDW0zJXyKUxjy+wmtO4RUvoVOrfjFB4HKa22olojbpqB7eQc=@vger.kernel.org X-Gm-Message-State: APuU4Z9D/SrfFGU8+uqWZrd311dqP4AKUh/ulH+uNr3ksHbW02WpvT3W v4xnE6QiI/29iSOpCSgQn1MVr86oGucYbo+GiUWPQOf3NfHRm0fDod7g X-Gm-Gg: AZFdTZc8SnmMeIfreQG/f7o2UZ4UtNRrCgO1XCspYzX1kPASh6sJIbP/XRoRQkb322W 2AqGl9ZqttWPqsvfuccqivM7jqKAVo9KuTf+6/jU+K1+TnuTDLqnEHPlgKaCvKbXaxKNaKvS9kA mBzxVz0WklpUAvYljW2AKYH3cEx/sqGg+/KeBif7xIkGZtmhlgMxed3lkMwRBQc3SJfK59h0ofy rj9ECE0XlDG7/sWDxUIFBZfjPk7LzsXAFk6Uj4N2VEkbx5Ki6pfE1d3f46ECzFKolKvmJop4b/o OIW+dpont40fCq9kR8ceHFU7SwdiEqHMYSQ9Zub8BUSH+XY1uBZjQHb4StG0sCfA33zYNeAMoHS aeGM364KhMykt8qhPTgEIlL+9gpNN2DeswaMMWO708gURsuyDwARSSmq94PuDe3xKCLhR27aFNS 8uOqj3Dt8DZEr2j3JENhPcvT4hL4wze7I9XX3EKoHJ+ws4DqyHI4aim1G6nHTUdFwu3DVxfhbG7 JnBlqJeMXzmHosUm5Zb8eIW2cWyRICAsDXqGc4rxtEwz7OTQIP42egS5vC7ExGb244ubR9lNLgJ pPaz8GvTONaSGuWN7xshWzXGS8I5ZswB8vtvQQHIjSLFXWB3bH1b1kXVxG5iIAI/8HdHildf9LL fMuF/2LOjEp44o1SiMY6zvs0= X-Received: by 2002:a05:693c:87cc:20b0:358:3426:d601 with SMTP id 5a478bee46e88-3856c0d0961mr35220032eec.2.1796108774789; Mon, 30 Nov 2026 23:06:14 -0800 (PST) Received: from [127.0.1.1] ([74.176.208.23]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38566fdce48sm113188490eec.14.2026.11.30.23.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 23:06:14 -0800 (PST) Content-Type: text/plain; charset="us-ascii" X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Yaohan Li To: Jeff Hugo , Oded Gabbay Cc: Carl Vanderlip , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jacek Lawrynowicz Subject: Re: [PATCH v2] accel/qaic: drain the control workqueue before the device is freed Date: Tue, 01 Dec 2026 15:06:09 +0800 Message-ID: <179610876957.3115730.6216059274582677194@gmail.com> In-Reply-To: <7c07a388-c58e-4d8e-8291-31b462d84d00@oss.qualcomm.com> References: <20261118072448.1259909-1-shunsheng1218@gmail.com> <20261119022919.1493567-1-shunsheng1218@gmail.com> <7c07a388-c58e-4d8e-8291-31b462d84d00@oss.qualcomm.com> Hi Jeff, Thanks for the review. I agree the MHI channel remove callback is a much better place to drain the control response work than the PCI remove path. Looking over the rest of the driver, I also missed two related workqueues in my original analysis: qts_wq and ssr_wq. Their MHI remove callbacks currently unprepare the channels without draining those workqueues, while the workers can still touch qdev and channel-related state, so those paths need to be checked as well. Rather than reworking workqueue ownership across the driver, I'd keep the existing DRM-managed allocation and synchronize the work at each channel's teardown. Before sending a revision, though, there is one ordering detail I need to sort out: qaic_dev_reset_clean_local_state() can run ahead of MHI channel removal and releases SSR-related state, so I want to make sure an SSR worker cannot race with that cleanup. I'll go through the producer shutdown and teardown ordering for all three queues and keep any follow-up narrowly scoped. I've only compile-tested the patch so far and don't have QAIC hardware, so I don't want to claim hardware validation. Thanks again for pointing this out, Yaohan