On 01-Jun-2023, at 2:30 PM, Ajay Kaher akaher@vmware.com wrote:
Events Tracing infrastructure contains lot of files, directories (internally in terms of inodes, dentries). And ends up by consuming memory in MBs. We can have multiple events of Events Tracing, which further requires more memory.
Instead of creating inodes/dentries, eventfs could keep meta-data and skip the creation of inodes/dentries. As and when require, eventfs will create the inodes/dentries only for required files/directories. Also eventfs would delete the inodes/dentries once no more requires but preserve the meta data.
Tracing events took ~9MB, with this approach it took ~4.5MB for ~10K files/dir.
Steve, I have used nested rw-semaphore for eventfs locking (same as in cifs). As per Amit Nadav, this has to be revisited/reviewed. Please have a look and share your thoughts.
-Ajay