From nobody Tue May 17 12:11:41 2022 X-Original-To: dev-commits-src-main@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 03A8E1AEE8EB; Tue, 17 May 2022 12:11:43 +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 4L2ZjT5M9sz3Pwx; Tue, 17 May 2022 12:11:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652789502; 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=WBnUx7MEUfCzuy8S7zq8y0/RC5pRqy+dInRVFgowTds=; b=GA0Olwl1I974SWLtRNDhCerD/PbB6YnkLfYlnT8oYEseNHZI8k5y6GEx36KWK5SbCn+S6G aXqNMC2Cjm15mkU01E21kdHC1hFY86dABIMIOobxn9nEilkQyv6XHP2PtroCjWXl8oK65b BWjubDbpkc2S4lEMXqFMKfEIN+dPqfmN89Mec2swkgl5pC+wsael0cYishhrqdsA7rUNp4 d6QFtFMaG1/ISBfEp0JsJq/FPuYgk0zcboKi+zI2AHtuCTkjVdQIMsURbDoUFJ2yY3isNk TWS4N6dB0joODGgBdzHBQQxciOw2hXFaYmPonzd0DVDDfrQ1CbNYL5Ee5lGziw== 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 5524114A40; Tue, 17 May 2022 12:11:41 +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 24HCBfBt093277; Tue, 17 May 2022 12:11:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24HCBf3u093276; Tue, 17 May 2022 12:11:41 GMT (envelope-from git) Date: Tue, 17 May 2022 12:11:41 GMT Message-Id: <202205171211.24HCBf3u093276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 71fe907dfb03 - main - LinuxKPI: Switch irq_work implementation back to standard taskqueue List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 71fe907dfb03c4d89a6370ce3d161603d0f40e5e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652789502; 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=WBnUx7MEUfCzuy8S7zq8y0/RC5pRqy+dInRVFgowTds=; b=wh212V6xrKSaG1RwnL9E27fUPOHXmYAYb9YfVaafNnT5mLWd1PSlieStgnOvoVoOdW9KfK KOjhIgFag+fS9dffUU4Sw+xde4AvwLU7BH+xdoxqI/HpqnBUPMsFAC2gcexhthbp2jiqgq 8TgdPyO0xzAuWufG4lj1mp8M0IdcNSX42Sv9IPM+wv+7uxexNq5gVjaFfPrz+axs4bb61E 8qhxAzS51vf7WxD1kuQ4NasiGjvvMbWVUAqghVKOoVNXoX6ORZXdIL+cw61+Yt1wnDWb9v /X7g0IdHHRINvTWFHwFEPC+p70vJ/O9jr0spxyG0J6tLNcSOi/19Fe98vDcG1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652789502; a=rsa-sha256; cv=none; b=AAi1lS85ian5RaBMyfsRPeqqyIb1UIJBceH7Z9Jk2m5OVldpfj5rg99YsJcmF+bsfqjzQQ XbikMTkTsc2WcTLasvcV3hxf3pmih15SU4TDDsuhHH8C0umm3lydlnZLqMaNzQU06m5v1Y OL58ukFHe9AylhmlJC4J+H+6nJT6lE+rM5HWN/b4PIDbUbaaaMcISBgbN2RreHPxJMZB1E Tt4/WWkPmn7engV2mMWzDVlPDnEznDoUTsus9NjjK5t45SJ9OGaUcDvbIsp3WoVrzqVhc7 mZjwORK8GckIuL41LicvWpw7fSHY0KDIO4jK7PNnZ+lewuRdOLgd/LjB1ryajg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=71fe907dfb03c4d89a6370ce3d161603d0f40e5e commit 71fe907dfb03c4d89a6370ce3d161603d0f40e5e Author: Vladimir Kondratyev AuthorDate: 2022-05-17 12:10:20 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-05-17 12:10:20 +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 --- 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 c2cdc6011c98..ec71a7ee094f 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_ */