uweseimet / scsi2pi

Advanced performant SCSI/SASI emulation and tools for the PiSCSI/RaSCSI board
https://www.scsi2pi.net
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

s2p: Evaluate/Implement LRU cache with configurable size #68

Open uweseimet opened 6 months ago

uweseimet commented 6 months ago

It shall be evaluated whether an LRU cache results in a performance gain. If it does, it shall be implemented with a configurable size. In case it turns out that such a cache outperforms the PiSCSI legacy cache, the latter shall be removed.

bog-dan-ro commented 3 weeks ago

Isn't better/easier to use mmap and let the kernel worry about caching which is quite good at?

uweseimet commented 3 weeks ago

If you want to let the kernel do the work just use one of the non-legacy caching modes, which are filesystem based.

bog-dan-ro commented 3 weeks ago

Is not the same thing, each read/write operations requires context switches which are quite expensive... I forgot to mention that mmap will NOT work for 32bit systems as it won't be able to map files over 2GB, so it's probably a bad idea anyway ...