LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   MemFree depleted in /proc/meminfo when writing to flash memory (https://www.linuxquestions.org/questions/linux-kernel-70/memfree-depleted-in-proc-meminfo-when-writing-to-flash-memory-4175588495/)

srivatsa231181 09-01-2016 11:04 AM

MemFree depleted in /proc/meminfo when writing to flash memory
 
Hi,

I have a problem where I am writing a 14 MB file into the flash memory. This will be a partition on the ext4 filesystem. However, when I do this, I see that MemFree in /proc/meminfo is decreasing by ~28MB. Could you please let me know why writing into flash reduces memory in RAM? What interactions do flash and RAM have here? I expected none.

If I delete the file, I regain "most" of the memory back. Why does this happen?

One more info that I need here. The "Active:" in /proc/meminfo increases with the write file action, and does not clear up with the file delete. It is "held up". Could you please let me know why does this happen?

Regards,
Srivatsa

custangro 09-01-2016 01:17 PM

What kind of flash memory is it? If it's acting like a 'disk' then what's probably happening is that the file gets written into memory first before the fsync happens.


All times are GMT -5. The time now is 04:53 PM.