2020-05-09 23:54:19 +00:00
|
|
|
{
|
|
|
|
global:
|
|
|
|
|
|
|
|
# public functions in spdk/thread.h
|
|
|
|
spdk_thread_lib_init;
|
|
|
|
spdk_thread_lib_init_ext;
|
|
|
|
spdk_thread_lib_fini;
|
|
|
|
spdk_thread_create;
|
2022-11-17 02:22:44 +00:00
|
|
|
spdk_thread_get_app_thread;
|
2020-05-09 23:54:19 +00:00
|
|
|
spdk_set_thread;
|
|
|
|
spdk_thread_exit;
|
2022-11-17 06:10:53 +00:00
|
|
|
spdk_thread_is_running;
|
2020-05-09 23:54:19 +00:00
|
|
|
spdk_thread_is_exited;
|
|
|
|
spdk_thread_destroy;
|
|
|
|
spdk_thread_get_ctx;
|
|
|
|
spdk_thread_get_cpumask;
|
|
|
|
spdk_thread_set_cpumask;
|
|
|
|
spdk_thread_get_from_ctx;
|
|
|
|
spdk_thread_poll;
|
|
|
|
spdk_thread_next_poller_expiration;
|
|
|
|
spdk_thread_has_active_pollers;
|
|
|
|
spdk_thread_has_pollers;
|
|
|
|
spdk_thread_is_idle;
|
|
|
|
spdk_thread_get_count;
|
|
|
|
spdk_get_thread;
|
|
|
|
spdk_thread_get_name;
|
|
|
|
spdk_thread_get_id;
|
|
|
|
spdk_thread_get_by_id;
|
|
|
|
spdk_thread_get_stats;
|
|
|
|
spdk_thread_get_last_tsc;
|
|
|
|
spdk_thread_send_msg;
|
|
|
|
spdk_thread_send_critical_msg;
|
|
|
|
spdk_for_each_thread;
|
2021-02-26 13:23:00 +00:00
|
|
|
spdk_thread_set_interrupt_mode;
|
2020-05-09 23:54:19 +00:00
|
|
|
spdk_poller_register;
|
|
|
|
spdk_poller_register_named;
|
|
|
|
spdk_poller_unregister;
|
|
|
|
spdk_poller_pause;
|
|
|
|
spdk_poller_resume;
|
2020-12-30 11:48:29 +00:00
|
|
|
spdk_poller_register_interrupt;
|
2020-05-09 23:54:19 +00:00
|
|
|
spdk_io_device_register;
|
|
|
|
spdk_io_device_unregister;
|
|
|
|
spdk_get_io_channel;
|
|
|
|
spdk_put_io_channel;
|
|
|
|
spdk_io_channel_get_ctx;
|
|
|
|
spdk_io_channel_from_ctx;
|
|
|
|
spdk_io_channel_get_thread;
|
2021-04-05 08:00:18 +00:00
|
|
|
spdk_io_channel_get_io_device;
|
2020-05-09 23:54:19 +00:00
|
|
|
spdk_for_each_channel;
|
|
|
|
spdk_io_channel_iter_get_io_device;
|
|
|
|
spdk_io_channel_iter_get_channel;
|
|
|
|
spdk_io_channel_iter_get_ctx;
|
|
|
|
spdk_for_each_channel_continue;
|
2020-09-16 20:03:56 +00:00
|
|
|
spdk_interrupt_register;
|
|
|
|
spdk_interrupt_unregister;
|
|
|
|
spdk_interrupt_set_event_types;
|
|
|
|
spdk_thread_get_interrupt_fd;
|
|
|
|
spdk_interrupt_mode_enable;
|
|
|
|
spdk_interrupt_mode_is_enabled;
|
2022-10-24 21:32:53 +00:00
|
|
|
spdk_spin_init;
|
|
|
|
spdk_spin_destroy;
|
|
|
|
spdk_spin_lock;
|
|
|
|
spdk_spin_unlock;
|
|
|
|
spdk_spin_held;
|
thread: introduce iobuf buffer pools
The idea behind "iobuf" is to have a single place for allocating data
buffers across different libraries. That way, each library won't need
to allocate its own mempools, therefore decreasing the memory footprint
of the whole application.
There are two reasons for putting these kind of functions in the thread
library. Firstly, the code is pretty small, so it doesn't make sense to
create a new library. Secondly, it relies on the IO channel abstraction,
so users will need to pull in the thread library anyway.
It's very much inspired by the way bdev layer handles data buffers (much
of the code was directly copied over). There are two global mempools,
one for small and one for large buffers, and per-thread queues that hold
requests waiting for a buffer. The main difference is that we also need
to track which module requested a buffer in order to allow users to
iterate over its pending requests.
The usage is fairly simple:
```
/* Embed spdk_iobuf_channel into an existing IO channel */
struct foo_channel {
...
struct spdk_iobuf_channel iobuf;
};
/* Embed spdk_iobuf_entry into objects that will request buffers */
struct foo_object {
...
struct spdk_iobuf_entry entry;
};
/* Register the module as iobuf user */
spdk_iobuf_register_module("foo");
/* Initialize iobuf channel in foo_channel's create cb */
spdk_iobuf_channel_init(&foo_channel->iobuf, "foo", 0, 0);
/* Finally, request a buffer... */
buf = spdk_iobuf_get(&foo_channel->iobuf, length,
&foo_objet.entry, buf_get_cb);
...
/* ...and release it */
spdk_iobuf_put(&foo_channel->iobuf, buf, length);
```
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ifaa6934c03ed6587ddba972198e606921bd85008
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15326
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-10-26 15:21:03 +00:00
|
|
|
spdk_iobuf_initialize;
|
|
|
|
spdk_iobuf_finish;
|
|
|
|
spdk_iobuf_set_opts;
|
|
|
|
spdk_iobuf_get_opts;
|
|
|
|
spdk_iobuf_channel_init;
|
|
|
|
spdk_iobuf_channel_fini;
|
|
|
|
spdk_iobuf_register_module;
|
|
|
|
spdk_iobuf_for_each_entry;
|
|
|
|
spdk_iobuf_entry_abort;
|
2020-05-09 23:54:19 +00:00
|
|
|
|
|
|
|
# internal functions in spdk_internal/thread.h
|
2021-05-06 23:02:30 +00:00
|
|
|
spdk_poller_get_name;
|
2020-12-17 01:25:53 +00:00
|
|
|
spdk_poller_get_id;
|
2021-05-06 23:02:30 +00:00
|
|
|
spdk_poller_get_state_str;
|
|
|
|
spdk_poller_get_period_ticks;
|
|
|
|
spdk_poller_get_stats;
|
2021-06-05 12:50:15 +00:00
|
|
|
spdk_io_channel_get_io_device_name;
|
2021-05-07 00:25:33 +00:00
|
|
|
spdk_io_channel_get_ref_count;
|
2020-05-09 23:54:19 +00:00
|
|
|
spdk_io_device_get_name;
|
2021-04-30 14:25:15 +00:00
|
|
|
spdk_thread_get_first_active_poller;
|
|
|
|
spdk_thread_get_next_active_poller;
|
|
|
|
spdk_thread_get_first_timed_poller;
|
|
|
|
spdk_thread_get_next_timed_poller;
|
|
|
|
spdk_thread_get_first_paused_poller;
|
|
|
|
spdk_thread_get_next_paused_poller;
|
2021-05-07 00:25:33 +00:00
|
|
|
spdk_thread_get_first_io_channel;
|
|
|
|
spdk_thread_get_next_io_channel;
|
2020-05-09 23:54:19 +00:00
|
|
|
|
|
|
|
local: *;
|
|
|
|
};
|