Minutes from the 02/23/05 LCLS SLC IOC Design Review: Cluster Status and Test Service Attendees: S. Allison, R. Chestnut, D. Fairley, A. Gromme, K. Luchini, R. MacKenzie, D. Rogind, N. Spencer, K. Underwood, ------------------------------------------- INTRODUCTION TO NOTES: ---------------------- The design review first covered the Async Utilities and then the Cluster Status and Test service. The web pages were used for presentational material in the review. We went through the two associated web pages from the top to bottom. These notes follow that order of presentation. ----------------------- 1) Stephanie noted that CPUM (presumably Cycle Frequency) is set to a large number (360?) for the SLC Micros and said it could be set lower for slc ioc's. KKU said there is no need to make it lower. 2) Stephanie noted that CHK1 might never be called from cstrAsync because it will be called often as a result of being called from the handler function after VMS messages are received. No change to the doc. indicated. 3) It was asked if there is a SCP interface for sending TEST_ECHO. It was noted that there there is such an interface to send test messages. 4) Steph noted that we could use ECHO_MWORD as a test of large messages from VMS as suggested by Diane. Nobody objected. UTILITIES DOCUMENT ------------------ 5) Steph said slcAsyncCycleInit and slcAsyncInitMicrStatus logic should be part of slcAsyncInit (not seperate functions). This will result in a doc. change. to section 2.1 6) Steph said that the General sketch in section 3.0 should also call slcAsyncMeterDbsend and slcAsyncSetFcnStats. This will result in a doc. change. to section 3.0 7) CYCL and other values in global (like metering parameters) will be changeable from iocShell. The code will read values from the global table every time through it's loop. This will result in a doc. change. 8) Steph asked if we're going to have both a mutex and an event flag. Steph points out that slcAsyncSleep will wait for a long time until event flag is set. This wait also goes into all Async Utilities. Anyone calling a utility and table is not ready has to wait. ??? Conclusion? This might result in a change to the document. 9) Steph asked to move logic out of slcAsyncInit and into cstrAsync which sets NTIM, TSA, and MTIM. It was indicated that there are other logic that should be moved too but I missed what they are. I think it was indicated to move all the dblist calls out of slcAyncInit and into cstrAsync. ??? This will result in a change to the document. 10) In slcAsyncInit, The following index and counter go into slcJobs_ts, not in slcThread_ts: "first cycle function enum" and "number of functions". This will result in a change to the document. 11) The input parameter to slcAsyncSleep should be JOB ENUM. The utility goes to the job table and figures out what the functions are to be done for this job and returns the one to be done. This will result in a change to the document. 12) The HSTA processing marked at TBD in slcAsyncSleep is in the requirements document. Make the doc. consistent. 13) Steph points out that async functions will run more on-time (at the time indicated by the CSTR cycling parameters) than they do on the slc micros because of the way we've separated the message handling from the Async functions in the slc ioc. 14) Nancy says that the VMS code is pretty forgiving as far as the timing of when async threads run but adds that we should look at a couple of places in the code. She thinks there is some code that checks to see if the data in the database is up to date before it uses it. If not, would need to send out a message to cause it to become up to date. Action??? 15) We could keep statistics on the BPM job (maybe). But not in this job. 16) Force update on meterDbsend needs discussion. This might result in a change to the doc. 17) slcAsyncMeterDbsend also increments database and meter counters in global. This will result in a change to the doc. 18) The following utilities should be static because they are only called by other functions in the same .c file: slcAsyncLockStats, slcAsyncUnLockStats, and slcAsyncSetFcnStats. This will result in a change to the doc. 20) Steph says will need both job and function as input parameters to slcAsyncSetFcnStats. Put this in the doc. 21) KKU points out that timestamp Elapsed timestamp calculation is not in the doc. Get timestamp before call. Pass it to async utility. Async does db call and gets next timestamp. Exclude all overhead. This will be put in the doc. 22) RonC asked about number of functions and lines of code. How much is new? All is new. Steph says they are small utilities. 23) Steph points out that all time stamps are Epics Time stamps. Use epicsTimeDiff (or something). Convert only to VMS right before storing into DB. Put this in the document. 24) AMSK and JMSK processing should all be in cstrAsync. Not in the utilities since general async utilities don't care about them. ProcMicrSts should be a thread static function, not in async. Ron Thinks it might be called by other utilities. This needs investigation. This will result in a change to the doc. 25) There was discussion as to what the time server is for LCLS. This has no effect on the doc. CLUSTER STATUS AND TEST SERVICE DESIGN DOC. ------------------------------------------ 26) Steph recommends moving the call to microDbSend to the end (end of init phase) and instead call dbupdate. This will result in MTIM, CAMAC and all other stuff that has been initialized being sent to vms. This is section 3.2.1.1 (Initialization). This will result in a change to the doc. 27) TEG says the 25 minute time comparison (VTIM) is related to booting SLC micros over ethernet. Not needed because we don't have fast feedback loops. 28) After call to meterDbSend, call setFcnStats. This will result in a change to the doc. 29) TEG points out that TSA secondary should be changed to TSTA. This will result in a change to the doc. 30) All tasks will be run on all slc ioc's. cstrAsync will know it should be terminated by JMSK and looking at what is active. KKU said a message should be sent. Noted that a CUD display is affected. Steph sent email about all this. See that email for the conclusion. This will result in a change to the doc. 31) Move calls to slcAsyncSetFcnStats out of the check functions and into the main routine loop. The parameter will be job id. This will result in a change to the doc. 32) All logic between asyncLock to AsnycUnlock, etc should all be in an async utility This will result in a change to the doc. 33) Call epics dbget to get epics data (Steph). This will result in a change to the doc. 34) Only do dblput if values change because it alters hi/low water marks. This will result in a change to the doc. 35) Same for NRUN, FAIL, etc This will result in a change to the doc. 36) Unsolicited message to paranoia Diane is doing now in msgHdlr will be moved to cstrHdlr This will result in a change to the doc. 37) Log informational message "in service" in Hdlr that is currently described in cstrAsync. This will result in a change to the doc. 38) When a task goes down (exited) unexpectedly. The conclusion is to just log an annoying msg that there is a dead thread (log from cstrAsync). KKU will check the code for what is done in MSTA. One of the bits means there is a dead job. This will result in an addition to the doc.