Changes committed to git://oss.sgi.com/pcp/pcp.git gfs2
qa/654 | 91 -------
qa/655 | 65 ++++-
qa/GNUmakefile | 2
qa/common.gfs2 | 120 ++++++++-
qa/group | 1
src/pmdas/gfs2/GNUmakefile | 5
src/pmdas/gfs2/Install | 7
src/pmdas/gfs2/control.c | 121 +++++++--
src/pmdas/gfs2/control.h | 31 ++
src/pmdas/gfs2/glocks.c | 1
src/pmdas/gfs2/glstats.c | 18 -
src/pmdas/gfs2/help | 160 ++++++------
src/pmdas/gfs2/lock_time.c | 582 +++++++++++++++++++--------------------------
src/pmdas/gfs2/lock_time.h | 53 ++--
src/pmdas/gfs2/pmda.c | 123 +++++++--
src/pmdas/gfs2/pmdagfs2.h | 13 -
src/pmdas/gfs2/pmns | 5
src/pmdas/gfs2/sbstats.c | 5
src/pmdas/gfs2/sbstats.h | 2
19 files changed, 813 insertions(+), 592 deletions(-)
commit e7311d3443e3e5c4c5bf50751c4dfe950bb56f40
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Sat May 25 11:28:34 2013 +1000
Minor qa test tidying - update comments, dup localconfig use
commit 9b97f90e2431607f0115b98e7920ac6c4ce35b2d
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Fri May 24 17:12:49 2013 +1000
Bug fixes and refactoring in gfs2_refresh_lock_time
The cache cull call on the lock_time_indom was being
done inside the loop which accumulates glock stats;
therefore whenever it takes multiple reads to consume
the available glock stats, those from the previous
reads would have been accidentally culled.
One reason this was not immediately obvious, perhaps,
was that the code to extract a single glock stat was
interwoven within gfs2_refresh_lock_time - I've moved
this out into its own function which clarifies things
(to my eyes at least).
It then also became clear that the "hash==NULL" check
here can never fail, since hash is an on-stack buffer,
so I simply removed that (dead) error-checking branch.
Finally, this refactoring also makes the last buglet a
bit clearer - we fopen a file (allocates and returns a
FILE*), then extract the fd via fileno(3), but when we
are cleaning up at the end we call close on the fd and
not fclose on the fp - which leaks the FILE* structure.
commit b031f3488296305c55ab1f1090f7408541a1b9c7
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Fri May 24 17:01:33 2013 +1000
Simplify pmdagfs2 gfs.control metric implementation a bit
Removes an unreachable return case from gfs2_control_fetch,
and makes the code a little more generalised (no switch).
Simpligies gfs_control_check_value in two ways - removes a
branch which (re)sets local "value" variable to zero, which
it already was guaranteed to be (dead code removal). Also,
make the onstack char array ("buffer") word aligned to make
life easier for the compiler.
commit 1c32e9cb98100bcfffd434826be1f31545aea7ae
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Fri May 24 16:56:25 2013 +1000
Fix shell syntax error in qa/654 - misspelt function name
Resolves "654: line 54: _filler_pminfo: command not found".
commit bf8928be2f1bdd5dbc359ab320321ffbb9d8ffe1
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Fri May 24 16:52:27 2013 +1000
Small code consistency cleanups in pmdagfs2 code
Resolve a handful of remaining funciton open-brace code
style differences in qa scripts and C code.
Annotated a couple of lock_time.c routines as static.
Major/minor device number handling code is consistently
making use of unsigned integers now, and when we sscanf
'em from a string, add a check to make doubly sure that
values were returned.
Removed a no-longer-used struct declaration in a header
file (lock_time.h - struct node / linkedList_t).
Fixed some gsf2 -> gfs2 typos in comments.
commit 6354c3540e8ac8b81d77abd2fad50a674c15a01a
Author: Paul Evans <pevans@xxxxxxxxxx>
Date: Thu May 23 16:51:30 2013 +0100
pmdagfs2: changes based on review feedback on pcp mailing list
Made general improvements with code for the pmda over last time whilst
taking on suggestions made by Nathan Scott. Have improved collection
code for the glock_lock_time trace-point metrics as well as switching
to the provided pmdaCache(3) data structure instead of a home made
linked-list datastructure.
Introduced a new gfs2.control.glock_lock_time metric which can be used
to enable/disable the glock_lock_time statistic collection based on
its value, this can be set using pmStore(3)on this metric. On installs
without the support for trace-point based statistics, the metrics are
disabled by default because the necessary config files will not be found.
Cleaned up the collection loop for the trace-point data, have moved to a
single loop that removes the dependency on allocation of dynamic memory
to achieve collection of the data. These changes will reduce the memory
requirements of the pmda and speeds up the pmda with less iteration of
the data.
Changed the data structure to hold our collected data, we have gone
from home made linked-list to the available pmdaCache(3) this reduces
the amount of code, simplifies reading and reduces again the amount
of iteration of the locks we have (no more remove duplicate and easier
addition through a well defined hash).
Changed the collection rate by changing the calling
gfs2_refresh_lock_time() from once-per each file-system to once for
all file-systems, this reduces the complexity of data storage. Reducing
potential of lost lock data in-between refreshes. Changed the number of
calls to gfs2_refresh_lock_time() from once per each filesystem to now
being called once for all file-systems also removed forgotten testing
code that was left within the gfs2_fetch_refresh function.
Separated instance refresh so that the collection of dev_id is handled
within another function in order to increase code readability. Introduced
the necessary pmStore(3) hooks so that we can use the control based
metrics to handle whether we are collecting statistics from the
trace-point based metrics borrowing from the techniques used in the
linux pmda.
Split the QA files into two halves, the first 654 handles testing of
the base part of the pmda (glstats, sbstats, glocks metrics). 655 then
handles testing for the trace-point based metrics with not_run escapes
in an event that trace-point based metrics are not available for the
install (i.e. Debian unstable?). A new common.gfs2 script handles common
functions used in both of the tests.
|