rusage and ihklib: Fix out-of-memory reporting and cleanup
1. Fix OOM: Count memory usage only when allocation succeeded 2. Fix OOM: Make user allocation fail when memory is running out 3. Fix OOM: Move rusage_init() before numa_init() 4. Cleanup: Rename ihkconfig/ihkosctl functions 5. Cleanup: Pass event type to eventfd() 6. Cleanup: arch/.../rusage.h --> arch/.../arch_rusage.h
This commit is contained in:
@ -4,13 +4,15 @@
|
||||
#include <ihk/monitor.h>
|
||||
|
||||
extern struct cpu_local_var *clv;
|
||||
extern void eventfd(int type);
|
||||
|
||||
void panic(const char *msg)
|
||||
{
|
||||
if (clv) {
|
||||
struct ihk_os_cpu_monitor *monitor = cpu_local_var(monitor);
|
||||
|
||||
//kprintf("%s: calling eventfd\n", __FUNCTION__);
|
||||
monitor->status = IHK_OS_MONITOR_PANIC;
|
||||
eventfd(IHK_OS_EVENTFD_TYPE_STATUS);
|
||||
}
|
||||
cpu_disable_interrupt();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user