exit_group 時に空きページ数を表示する

This commit is contained in:
NAKAMURA Gou
2013-07-09 19:28:21 +09:00
parent 9a1d535f5c
commit 219291f40f
2 changed files with 13 additions and 3 deletions

View File

@@ -149,15 +149,19 @@ static struct ihk_mc_pa_ops allocator = {
void sbox_write(int offset, unsigned int value);
static void query_free_mem_interrupt_handler(void *priv)
void query_free_mem_interrupt_handler(void *priv)
{
#ifdef ATTACHED_MIC
dkprintf("query free mem handler!\n");
int pages = ihk_pagealloc_query_free(pa_allocator);
static int first = -1;
dkprintf("free pages: %d\n", pages);
if (first < 0) {
first = pages;
}
kprintf("free pages: %d (%d)\n", pages, pages-first);
#ifdef ATTACHED_MIC
sbox_write(SBOX_SCRATCH0, pages);
sbox_write(SBOX_SCRATCH1, 1);
#endif

View File

@@ -510,6 +510,12 @@ SYSCALL_DECLARE(exit_group)
#if 0
struct process *proc = cpu_local_var(current);
if (1) {
extern void query_free_mem_interrupt_handler(void *);
query_free_mem_interrupt_handler(NULL);
}
#ifdef DCFA_KMOD
do_mod_exit((int)ihk_mc_syscall_arg0(ctx));
#endif