exit_group 時に空きページ数を表示する
This commit is contained in:
10
kernel/mem.c
10
kernel/mem.c
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user