<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>BT GATT DM Workqueue Stack Size</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127502/bt-gatt-dm-workqueue-stack-size</link><description>Hello, 
 I had a question about the BT GATT DM Workqueue used in gatt_dm.c. 
 In NCS 2.8.0, the BT GATT DM Workqueue was introduced as an alternative to the System Workqueue to allow for scheduling non-blocking callbacks from the GATT Discovery Manager</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Mar 2026 14:34:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127502/bt-gatt-dm-workqueue-stack-size" /><item><title>RE: BT GATT DM Workqueue Stack Size</title><link>https://devzone.nordicsemi.com/thread/563695?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2026 14:34:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d69e67df-1f6c-445a-998d-c13cdb619243</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I cannot see that there is a good reason for not having the GATT DM workqueue size user configurable. I have reported this internally. For now, you can make it configurable by doing a small change in&amp;nbsp;nrf/subsys/bluetooth/Kconfig.discovery so that &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/4c3fc0d44534f387a2d623eb1c85cbd2ffc8bcb6/subsys/bluetooth/Kconfig.discovery#L35-L40"&gt;BT_GATT_DM_WORKQ_STACK_SIZE&lt;/a&gt;&amp;nbsp;looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;config BT_GATT_DM_WORKQ_STACK_SIZE
	int  &amp;quot;GATT Discovery Manager workqueue stack size.&amp;quot;
	default 1300 if BT_GATT_CACHING
	default 1024&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Edit: to avoid modifying SDK code you can also override by&amp;nbsp;using an application specific Kconfig file containing the following (adjust as needed):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;config BT_GATT_DM_WORKQ_STACK_SIZE
	default 2048

source &amp;quot;Kconfig.zephyr&amp;quot;
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BT GATT DM Workqueue Stack Size</title><link>https://devzone.nordicsemi.com/thread/563616?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2026 20:38:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0545a0fe-0330-427f-82a0-852344784e73</guid><dc:creator>variant</dc:creator><description>&lt;p&gt;An additional question:&amp;nbsp; Why was&amp;nbsp;&lt;span&gt;CONFIG_BT_GATT_DM_WORKQ_STACK_SIZE deliberately made a hidden option?&lt;br /&gt;&lt;br /&gt;The comment for that CONFIG says &amp;quot;&lt;code data-application="com.atlassian.bitbucket-server" data-language="plain text"&gt;Hidden option for workqueue stack size. Should be derived from system requirements.&amp;quot;&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;The problem is that that workqueue includes callbacks to our application code, which to me is part of the system. Even though we want to limit the amount of work done in that context as part of the callback, why do we have to limit our stack use too, as constrained by the hidden&amp;nbsp;&lt;span&gt;CONFIG_BT_GATT_DM_WORKQ_STACK_SIZE&lt;/span&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>