Ignore:
Timestamp:
Apr 10, 2019, 10:09:39 AM (5 years ago)
Author:
alain
Message:

Fix a bug in the vmm_remove_vseg() function: the physical pages
associated to an user DATA vseg were released to the kernel when
the target process descriptor was in the reference cluster.
This physical pages release should be done only when the page
forks counter value is zero.
All other modifications are cosmetic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_get_config.c

    r624 r625  
    22 * sys_get_config.c - get hardware platform parameters.
    33 *
    4  * Author    Alain Greiner (2016,2017,2018)
     4 * Author    Alain Greiner (2016,2017,2018,2019)
    55 * 
    66 * Copyright (c) UPMC Sorbonne Universites
     
    2424#include <hal_kernel_types.h>
    2525#include <hal_uspace.h>
     26#include <hal_vmm.h>
    2627#include <hal_special.h>
    2728#include <errno.h>
     
    4849    process_t * process = this->process;
    4950
     51#if (DEBUG_SYS_GET_CONFIG || CONFIG_INSTRUMENTATION_SYSCALLS)
     52uint64_t     tm_start = hal_get_cycles();
     53#endif
     54
    5055#if DEBUG_SYS_GET_CONFIG
    51 uint64_t     tm_start;
    52 uint64_t     tm_end;
    5356tm_start = hal_get_cycles();
    5457if( DEBUG_SYS_GET_CONFIG < tm_start )
     
    114117    hal_fence();
    115118
     119#if (DEBUG_SYS_GET_CONFIG || CONFIG_INSTRUMENTATION_SYSCALLS)
     120uint64_t     tm_end = hal_get_cycles();
     121#endif
     122
    116123#if DEBUG_SYS_GET_CONFIG
    117 tm_end = hal_get_cycles();
    118124if( DEBUG_SYS_GET_CONFIG < tm_end )
    119125printk("\n[DBG] %s : thread %x exit / process %x / cost %d / cycle %d\n",
     
    121127#endif
    122128
     129#if CONFIG_INSTRUMENTATION_SYSCALLS
     130hal_atomic_add( &syscalls_cumul_cost[SYS_GET_CONFIG] , tm_end - tm_start );
     131hal_atomic_add( &syscalls_occurences[SYS_GET_CONFIG] , 1 );
     132#endif
     133
    123134        return 0;
    124135
Note: See TracChangeset for help on using the changeset viewer.