about summary refs log tree commit homepage
path: root/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev.c')
-rw-r--r--dev.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/dev.c b/dev.c
index 75b12c5..64deec4 100644
--- a/dev.c
+++ b/dev.c
@@ -245,3 +245,18 @@ void mog_dev_free(void *ptr)
         mog_ioq_destroy(&dev->ioq);
         free(dev);
 }
+
+/*
+ * Only called by the main/notify thread as a hash iterator function
+ * This increases or decreases the capacity of a given device if a
+ * a sidechannel user changes the worker thread pool size.
+ */
+bool mog_dev_user_rescale_i(void *devp, void *svcp)
+{
+        struct mog_dev *dev = devp;
+        struct mog_svc *svc = svcp;
+
+        mog_ioq_adjust(&dev->ioq, svc->thr_per_dev);
+
+        return true; /* continue iteration */
+}