-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Writing files result in thousands of mmap calls #169
Comments
what version of esp-idf are you using? I haven't seen this message before, but I also haven't tested/experimented with more recent esp-idf versions. |
I'm using esp-idf 5.1.1. I've disabled the flushing of the file to flash and the issue is still there. |
so I'm not actually sure if this is an issue, googling around doesn't surface much. I don't have knowledge of the inner workings of the esp-idf spi-flash drivers; this might just be business as usual. If you have any further insights, such as proof that the resulting operation is inefficient/bottlenecking, it would be much appreciated! |
The issue is that whenever ESP-IDF was configured to use encrypted read/writes, it needs to cache something, which is done through memory mapping, I guess Checkout line 46 |
It might be worth opening up an issue in the esp-idf repo, I'm not sure of the performance implications, but it certainly seems out of the control of this repo. |
According to @igrr we could try and optimize this common use case, so that I'll map just once and not for every read operation. |
I'm writing some files to the FS (about 200) and whenever I do so the console output gets flooded with
V (548824) mmap: actual_mapped_len is 0x10000
logs.I've traced this down to the
esp_mmu_map.c:s_do_mapping function@410
, but I assume that it's rather expensive to perform so many memory mappings.Am I doing something wrong, do I have the wrong settings enabled in menuconfig?
Config:
Log:
The text was updated successfully, but these errors were encountered: