Commit Graph

18 Commits

Author SHA1 Message Date
Huamonarch
2c62f9c4a3 Add change documentation for 2026-05-12 eqpalg optimizations 2026-05-12 17:22:34 +08:00
Huamonarch
e21b2af2a6 Replace fixed 518MB array in TaskData with dynamic shared-memory vector
DataRecord used a fixed float[129600000] consuming 5GB disk even when
collecting only a few hundred data points. Replaced with shm_vector_f
that grows on demand via push_back. Removes the need for rm -rf on
process exit — vector destructor frees memory back to the segment.
Also drops now-unnecessary task_data_size member.
2026-05-12 17:19:44 +08:00
Huamonarch
1ca922a4ef Fix task thread lifecycle: self-destruct when idle, synchronized cleanup
HandlerExec in task mode now sets is_running_=false when rule_pointers_
and once_exec_queue_ are both empty. Manager cleanup uses two-phase
lock (shared_lock scan + unique_lock destroy/erase) synchronized with
exec_task via handles_mutex. exec_task checks is_running_ before submit
and destroys dead handlers to prevent task loss. Also fix logReset
self-assignment no-op.
2026-05-12 17:11:07 +08:00
Huamonarch
1e70af7a9d Remove rm -rf of shared memory file from EqpAlgICEI destructor
The workaround was needed because bipc::string items in shared memory would
segfault on restart when tag names exceeded SSO length. Now that display
data (items, etc.) lives in local-memory DisplayCache and only cold doubles
remain in shared memory, the dangling-allocator bug no longer exists.
Deleting the file also broke mon-cron IPC across restarts.
2026-05-12 16:17:09 +08:00
Huamonarch
973921fc4b Split RuleStat display from cold data paths to reduce lock contention
Display data (alarm_value, current_value, limit_up/down, items, unit) now
goes to a local-memory DisplayCache and is serialized to JSON without any
shared memory lock. Cold data (stat_values, running_time, shear_times, etc.)
stays in shared memory for mon-cron IPC, protected by a real interprocess
mutex (boost::interprocess::interprocess_mutex) instead of the broken
process-local std::mutex. AlgBase::rule_stat_ is now RuleStatLocal with
standard types — zero changes to algorithm subclass code.
2026-05-12 15:46:01 +08:00
Huamonarch
6a28112cd7 Final comment cleanup batch 2026-05-09 13:35:17 +08:00
Huamonarch
38bbdb5b34 Remove comment from roller3.cpp 2026-05-09 13:33:07 +08:00
Huamonarch
339074c1b4 Remove comment from manager.cc 2026-05-09 13:32:38 +08:00
Huamonarch
ecf02306b2 Remove final remaining comment from distribution.h 2026-05-09 13:32:24 +08:00
Huamonarch
c53b108500 Remove last remaining comments from eqpalg 2026-05-09 13:32:10 +08:00
Huamonarch
62a97cdf9d Remove remaining comments (exp_times, STA.h, gb_item_memory) 2026-05-09 13:31:22 +08:00
Huamonarch
48c9fe7f22 Remove remaining irrelevant comments from eqpalg (final batch) 2026-05-09 13:31:06 +08:00
Huamonarch
e3207fa593 Remove remaining irrelevant comments from eqpalg (glitch_detection, roller, STA) 2026-05-09 13:30:42 +08:00
Huamonarch
224c2c45c4 Remove irrelevant comments from eqpalg source files
Cleaned 66 files across all eqpalg subdirectories:
- Removed commented-out dead code
- Removed redundant Chinese inline comments that restate variable/function names
- Removed trailing ///< annotations on self-explanatory fields
- Removed namespace closing comments
- Preserved all file headers, Doxygen documentation, and logic explanations
- No code changes — only comment removal
2026-05-09 13:30:09 +08:00
Huamonarch
ef6612d2ea Add eqpalg optimization recommendations document
Covers 10 issues with root cause analysis, severity assessment,
and concrete solutions:
- P0: update_map_rule() global mutex bottleneck on shared memory map
- P0: Thread allocation imbalance (default taskSeq=0)
- P1: GetDataJson() full deep copy, event_handler lock hold time,
  cache_data() busy-loop, AlgBase::lm lock splitting
- P2-P3: tag index pre-resolution, cron batching, task thread cleanup
- Long-term: Memcached migration, thread pool, code path separation
2026-05-09 13:02:45 +08:00
Huamonarch
bd7e93ae68 Add READMEs for RICS, eqpm, dsm and update eqpalg README with corrections
- RICS_readme.md: Rule information centralized display service
- eqpm_readme.md: Equipment predictive maintenance & status monitoring
- dsm_readme.md: Data save manager for historical data archiving
- eqpalg_readme.md: Corrected architecture, data flow, variable system,
  thread model, and inter-process relationships
2026-05-09 11:46:17 +08:00
Huamonarch
92a23222f7 Add eqpalg_readme.md — detailed documentation of equipment algorithm process 2026-05-09 11:30:37 +08:00
Huamonarch
7e602c7bc1 Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00