Project

General

Profile

Feature #734

taskq_dispatch_prealloc() desired

Added by Garrett D'Amore over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
kernel
Start date:
2011-02-16
Due date:
% Done:

100%

Estimated time:
20.00 h
Difficulty:
Medium
Tags:

Description

We would like an in-kernel interface for non-dynamic taskq's where the caller supplies the storage for the taskq_ent_t.

The reason for this is to avoid hitting the kmem_alloc()/kmem_free() calls on very hot code paths. The other motivation (perhaps bigger) is that if we can avoid the allocation, we can avoid having to deal with scheduling failures on hot code paths, or in situations where it might not be easy to recover (e.g. interrupt context) -- by providing the storage before hand, the taskq_dispatch_prealloc() can degenerate to mutex_enter, twiddle list pointers, cv_broadcast/signal, mutex_exit. Easy peasey.


Related issues

Related to illumos gate - Bug #943: zio_interrupt ends up calling taskq_dispatch with TQ_SLEEPResolved2011-04-22

Actions

History

#1

Updated by Garrett D'Amore over 8 years ago

  • % Done changed from 0 to 70
  • Difficulty set to Medium
  • Tags set to needs-triage
#2

Updated by Garrett D'Amore about 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 70 to 100
  • Estimated time set to 20.00 h
  • Tags deleted (needs-triage)

Resolved in:

changeset: 13414:b42c1f0432b6
tag: tip
user: Garrett D'Amore <>
date: Wed Jul 27 07:13:44 2011 -0700
description:
734 taskq_dispatch_prealloc() desired
943 zio_interrupt ends up calling taskq_dispatch with TQ_SLEEP
Reviewed by: Albert Lee <>
Reviewed by: Richard Lowe <>
Reviewed by: Alexey Zaytsev <>
Reviewed by: Jason Brian King <>
Reviewed by: George Wilson <>
Reviewed by: Adam Leventhal <>
Approved by: Gordon Ross <>

Also available in: Atom PDF