Skip to content

Commit baa1a20

Browse files
authored
Update README in regards to configuration
Make sure it's clear that the library is always thread and multicore safe, and that the purpose of LFBB_CACHELINE_LENGTH is to avoid the false sharing phenomenom, which reduces performance.
1 parent e88f549 commit baa1a20

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ if (!write_started) {
5959
```
6060

6161
## Configuration
62-
By default the library is configured to be thread and multicore safe on most systems, however some
63-
configuration may be needed for space efficiency on embedded systems and on systems with nonstandard cacheline lengths.
62+
Some configuration may be needed for space efficiency on embedded systems and for performance on systems with nonstandard cacheline lengths.
6463

6564
The library offers two configuration defines ```LFBB_MULTICORE_HOSTED``` and ```LFBB_CACHELINE_LENGTH``` that can be passed by the build system or defined before including the library.
6665

6766
On embedded systems it is usually required to do manual cache synchronization, so ```LFBB_MULTICORE_HOSTED``` can be set to ```false``` to avoid wasting space on padding for cacheline alignment of indexes.
6867

69-
Some systems have a non-typical cacheline length (for instance the apple M1/M2 CPUs have a cacheline length of 128 bytes), and ```LFBB_CACHELINE_LENGTH``` should be set accordingly in those cases.
68+
Some systems have a non-typical cacheline length (for instance the apple M1/M2 CPUs have a cacheline length of 128 bytes), and ```LFBB_CACHELINE_LENGTH``` should be set accordingly in those cases to avoid the false sharing phenomenom and the performance drop that comes from it.
7069

7170
## Dealing with caches on embedded systems
7271
When using the library with DMA or multicore on embedded systems with cache it is necessary to perform manual cache synchronization in one of the following ways:

0 commit comments

Comments
 (0)