Closed Hotxuer closed 1 year ago
ipmctl is only reporting the fields from the PMem module here. I think you will have a better chance of response if you post at https://groups.google.com/g/pmem or similar.
However, if I were to guess, could the flush operation be doing a read afterwards to ensure it went correctly?
Thanks a lot for your time and advice!
Hi all,
I was using the commands "ipmctl show -dimm -performance" to measure the PM access amount of my program. But i found the results of MediaReads not as expected. It seems that performing a read and then a write to a 64-byte block in PM would result in a total of 2 XPLine (256 bytes) reads (i.e. the amount of change in MediaReads is 8, while I think it should be 4).
In my test program, I keep picking a random PM address, first perform a read on the 64-byte block at this address, then immediately perform a write to this block, and repeat the whole process, recording the total number of operations. At the beginning and end of the program, I also use "ipmctl show -dimm -performance" to record the amount of MediaReads, MediaWrites, ReadRequests, WriteRequests at that time, so that I can calculate the change of these data caused by each operation. I have disabled the hardware prefetcher of CPU when i run the program. The results are as follows:
How should this result be explained? Why ReadRequests is 1 but it generates 2 of XPLine reads to PM media? Shouldn't the change of MediaReads be the same as the change of MediaWrites in this process? After all, the changes of ReadRequests and WriteRequests are the same. Or do writes to PM media repeatedly cause an increase in MediaReads, even if the same XPLine has already been read a while ago?
I also did a read-only test on random 64-byte blocks, and the results were fine, just as expected:
Here are the core parts of my test program:
Best,