library: eliminate distorted history 1st time switches
Upon reflection, at the point where the 'priming read' was introduced, any possibility of history distortions was also eliminated. This was true because all of the 'old' (zeroed) data will have been replaced with 'new' data whenever a user finally calls get, select & reap. Thus, any DELTA values will automatically reflect that interval between 'new' and subsequent retrieval calls. [ diskstats didn't actually employ a 1st time switch ] [ like the others so we have changed a comment only. ] [ but that module will retain something similar used ] [ inside node_update whenever a new node is created. ] Reference(s): . priming read added to slabinfo commit5d5a52a380
. priming read added to diskstats commitecd64f4445
. priming read added to meminfo, stat, vmstat commit1a2b62c779
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@ -769,7 +769,8 @@ PROCPS_EXPORT int procps_diskstats_new (
|
||||
|
||||
/* do a priming read here for the following potential benefits: |
|
||||
1) ensure there will be no problems with subsequent access |
|
||||
2) make delta results potentially useful, even if 1st time | */
|
||||
2) make delta results potentially useful, even if 1st time |
|
||||
3) elimnate need for history distortions 1st time 'switch' | */
|
||||
if ((rc = diskstats_read_failed(p))) {
|
||||
procps_diskstats_unref(&p);
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user