Pre-allocate memory for 16K signals
On busy systems, the memory allocation can take long duration and
increase calls to hsa_signal_create/hsa_amd_signal_create. This
mitigates this issue.
Change-Id: Ib7640273262ebc3dbf1f07049ce5da10b1d6b158
[ROCm/ROCR-Runtime commit: 9a127193a8]
Этот коммит содержится в:
@@ -157,10 +157,13 @@ static_assert((offsetof(SharedSignal, sdma_end_ts) % 32) == 0,
|
||||
static_assert(sizeof(SharedSignal) == 128,
|
||||
"Bad SharedSignal size.");
|
||||
|
||||
|
||||
#define SIGNAL_PREALLOC_BLOCKS 512 //16K Signals
|
||||
|
||||
/// @brief Pool class for SharedSignal suitable for use with Shared.
|
||||
class SharedSignalPool_t : private BaseShared {
|
||||
public:
|
||||
SharedSignalPool_t() : block_size_(minblock_) {}
|
||||
SharedSignalPool_t() : block_size_(SIGNAL_PREALLOC_BLOCKS * minblock_) {}
|
||||
~SharedSignalPool_t() { clear(); }
|
||||
|
||||
SharedSignal* alloc();
|
||||
|
||||
Ссылка в новой задаче
Block a user