From nobody Wed Jun 01 21:51:55 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C88001B5CF79; Wed, 1 Jun 2022 21:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LD2t40Qlyz4rN0; Wed, 1 Jun 2022 21:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654120316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lGYPMCd2vGm1OdjOaITFRPDNHEa0dzEesFC0mLDoFHY=; b=oOTjkQlb6Q7faWksJjx1Fv2pU5iSFaF3Z0eb7Zrac+6ZuXkQI/VX4cy1vVIoeDc5DQe3aZ XtkkwyOyIktMhH/vLdQnP62qNtHnwstdIzpivWWJ9utGPQ1FKV4cg9zAeHQgQjDuoutAFO jQlNC01Kxu6FDDxBtfn/kOY3fiotocHiVP8xDUfAvvUKb1ET/U93V6IwTaPnAenllet5Gk kbkbW2GWi4SKf6EnduEEtrKScH++7DOb9XmZTsseyVoEjZIHYd1UqcWzfA+P5+fQfXD8R6 f9e6wU+X1ZQ5bnSjH7OtSb7E2fNMyWAQ5O5Ss1DEAN0ntL7L6rNuh6OW3fTUgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AAE8F296; Wed, 1 Jun 2022 21:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 251Lpt3r042960; Wed, 1 Jun 2022 21:51:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 251Lpto6042959; Wed, 1 Jun 2022 21:51:55 GMT (envelope-from git) Date: Wed, 1 Jun 2022 21:51:55 GMT Message-Id: <202206012151.251Lpto6042959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 185159f77c9c - stable/13 - LinuxKPI: Switch irq_work implementation back to standard taskqueue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 185159f77c9cfaf2cbd5a6cb80b2c7ac0b6a3a9a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654120316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lGYPMCd2vGm1OdjOaITFRPDNHEa0dzEesFC0mLDoFHY=; b=HYigzEaMTuAfSXAud/knjlfW9N3aeAWaTVkrRtGZfcE23Q5pWhwqQOYN1YH9Jqf7jiIFpt bweHDPScxMU33il5JeT+hhhy+bNQpQaibcBmqnO+uMstFV3Xdmr8DA2G6IrG54J3n2x6sp g8j3hGL5EbLV0ExDSQk0wM+Bd0/RYDPORep9YUAhJixW7bBoDdlhbT/ktAJknnuQ3IR1wC m6OWrqqWgLdNh7mo+i+AjNflvQTvxCnM0QPbMH2ad8QKyOvLf+S3bLtu7T59yx5rQjjHkO bge0406UtUcazbBL+xHt+Htp76sLsagAOH2Y86iWu5rPTHOpyVNUsSMpUJ04wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654120316; a=rsa-sha256; cv=none; b=hSW3EcH8D6C6gnTvQNgtkJtKmU+sXzQKG7dyUghM+85nn+Rq2oOm5p6zMK9corqP+VvUY5 g8Eo3vS0oO5PLteaJ5jsrz7q5df7kXvYEVhGJSF41Z4y9ov/1ouHTcTZzlc1Sypi9wlwx+ WvJvTZp5EOaqi1zsEBL1FB43T8/VhGRH5OVqYgs27mR7jDFhcFWXiMOt6hZdG3rZ1hDFFG 5idgUSq/Mbb/LkZKXkJWjHzicWEkR0AzfCHNQ6TRHWGnXc3GC1/Czxh0nvI1Y5wI81dMCj p0vGjXFpuMA9horvWujLN7vr6d0sXQU4OE56qaSu9g90xnLV4b0zLLnlpqeYuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=185159f77c9cfaf2cbd5a6cb80b2c7ac0b6a3a9a commit 185159f77c9cfaf2cbd5a6cb80b2c7ac0b6a3a9a Author: Vladimir Kondratyev AuthorDate: 2022-05-17 12:10:20 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-06-01 21:50:14 +0000 LinuxKPI: Switch irq_work implementation back to standard taskqueue from fast one as dmabuf does not run callbacks from critical sections since drm-kmod 5.7. Consumers which requires fair irq_work like drm-kmod 5.4 must #define LKPI_IRQ_WORK_USE_FAST_TQ somewhere in source file before linux/irq_work.h inclusion to enable old behavior. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35052 (cherry picked from commit 71fe907dfb03c4d89a6370ce3d161603d0f40e5e) --- sys/compat/linuxkpi/common/include/linux/irq_work.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/irq_work.h b/sys/compat/linuxkpi/common/include/linux/irq_work.h index d9cf36111854..9e2bd31ddb71 100644 --- a/sys/compat/linuxkpi/common/include/linux/irq_work.h +++ b/sys/compat/linuxkpi/common/include/linux/irq_work.h @@ -35,6 +35,16 @@ #include #include +#include + +#define LKPI_IRQ_WORK_STD_TQ system_wq->taskqueue +#define LKPI_IRQ_WORK_FAST_TQ linux_irq_work_tq + +#ifdef LKPI_IRQ_WORK_USE_FAST_TQ +#define LKPI_IRQ_WORK_TQ LKPI_IRQ_WORK_FAST_TQ +#else +#define LKPI_IRQ_WORK_TQ LKPI_IRQ_WORK_STD_TQ +#endif struct irq_work; typedef void (*irq_work_func_t)(struct irq_work *); @@ -64,14 +74,14 @@ init_irq_work(struct irq_work *irqw, irq_work_func_t func) static inline bool irq_work_queue(struct irq_work *irqw) { - return (taskqueue_enqueue_flags(linux_irq_work_tq, &irqw->irq_task, + return (taskqueue_enqueue_flags(LKPI_IRQ_WORK_TQ, &irqw->irq_task, TASKQUEUE_FAIL_IF_PENDING) == 0); } static inline void irq_work_sync(struct irq_work *irqw) { - taskqueue_drain(linux_irq_work_tq, &irqw->irq_task); + taskqueue_drain(LKPI_IRQ_WORK_TQ, &irqw->irq_task); } #endif /* _LINUXKPI_LINUX_IRQ_WORK_H_ */