lib/thread: Cleanup thread structure

Remove unused io_device_delete_count field
Reorganize the fields so that ones used in the data path are
located in the beggining of the structure and occupy 2 cache lines

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I98e22dacb84153e6a10a6ff6d77c1c9dfb14e02b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1803
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Alexey Marchuk 2020-04-09 07:52:39 +03:00 committed by Tomasz Zawadzki
parent 237ef4c600
commit b96186aed8

View File

@ -1,8 +1,8 @@
/*-
* BSD LICENSE
*
* Copyright (c) Intel Corporation.
* All rights reserved.
* Copyright (c) Intel Corporation. All rights reserved.
* Copyright (c) 2020 Mellanox Technologies LTD. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -92,12 +92,6 @@ enum spdk_thread_state {
};
struct spdk_thread {
TAILQ_HEAD(, spdk_io_channel) io_channels;
TAILQ_ENTRY(spdk_thread) tailq;
char name[SPDK_MAX_THREAD_NAME_LEN + 1];
uint64_t id;
enum spdk_thread_state state;
struct spdk_cpuset cpumask;
uint64_t tsc_last;
struct spdk_thread_stats stats;
/*
@ -117,11 +111,18 @@ struct spdk_thread {
* queues) or unregistered.
*/
TAILQ_HEAD(paused_pollers_head, spdk_poller) paused_pollers;
uint32_t io_device_delete_count;
struct spdk_ring *messages;
SLIST_HEAD(, spdk_msg) msg_cache;
size_t msg_cache_count;
spdk_msg_fn critical_msg;
uint64_t id;
enum spdk_thread_state state;
TAILQ_HEAD(, spdk_io_channel) io_channels;
TAILQ_ENTRY(spdk_thread) tailq;
char name[SPDK_MAX_THREAD_NAME_LEN + 1];
struct spdk_cpuset cpumask;
uint64_t exit_timeout_tsc;
/* User context allocated at the end */