Skip to content

Commit 1afc8a8

Browse files
Zainullin DamirZainullin Damir
authored andcommitted
++
1 parent 3b3cf34 commit 1afc8a8

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

include/ipfixprobe/outputPlugin/outputStorage/b2OutputStorage.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class B2OutputStorage : public BOutputStorage<ElementType> {
129129
__builtin_prefetch(
130130
&this->m_buckets[readerData.readPosition + this->m_expectedReadersCount],
131131
PrefetchMode::Write,
132-
Locality::Medium);
132+
Locality::High);
133133
if (overflowed) {
134134
if (!this->writersPresent()) {
135135
readerData.generation.fetch_add(1, std::memory_order_release);
@@ -173,7 +173,8 @@ class B2OutputStorage : public BOutputStorage<ElementType> {
173173
| std::views::transform(
174174
[](const CacheAlligned<typename BOutputStorage<ElementType>::ReaderData>&
175175
readerDataAlligned) {
176-
return readerDataAlligned->generation.load(std::memory_order_acquire);
176+
// TODO get back acquired
177+
return readerDataAlligned->generation.load(std::memory_order_relaxed);
177178
})
178179
| std::ranges::to<boost::container::static_vector<
179180
uint64_t,

include/ipfixprobe/outputPlugin/outputStorage/bOutputStorage.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class BOutputStorage : public OutputStorage<ElementType> {
219219
readerGenerations
220220
= m_readersData
221221
| std::views::transform([](const CacheAlligned<ReaderData>& readerDataAlligned) {
222-
return readerDataAlligned->generation.load(std::memory_order_acquire);
222+
// TODO changed to relaxed from acquire
223+
return readerDataAlligned->generation.load(std::memory_order_relaxed);
223224
})
224225
| std::ranges::to<boost::container::static_vector<
225226
uint64_t,
@@ -242,7 +243,7 @@ class BOutputStorage : public OutputStorage<ElementType> {
242243
return *std::ranges::max_element(writerGenerations);
243244
}
244245

245-
uint64_t getHighestReaderGeneration() const noexcept
246+
/*uint64_t getHighestReaderGeneration() const noexcept
246247
{
247248
boost::container::static_vector<uint64_t, OutputStorage<ElementType>::MAX_READERS_COUNT>
248249
readerGenerations
@@ -254,7 +255,8 @@ class BOutputStorage : public OutputStorage<ElementType> {
254255
uint64_t,
255256
OutputStorage<ElementType>::MAX_READERS_COUNT>>();
256257
return *std::ranges::max_element(readerGenerations);
257-
}
258+
}*/
259+
258260
struct ReaderData {
259261
BucketAllocation bucketAllocation {};
260262
uint16_t readPosition;

0 commit comments

Comments
 (0)