Dominique Martinet
ed7f5abc28
schedule: fix null pointer dereferences
...
Change-Id: I1d4b0a2fabb5810a89cca4c6a0a837db3a9813ee
2018-07-26 03:50:44 +00:00
Tomoki Shirasawa
eae5c40f60
init_process_stack: Support "ulimit -s unlimited"
...
Refs: #1109
Change-Id: I395f012fd747cb6a2f93be71e34c7f6f3666ed67
2018-07-26 02:40:27 +00:00
Tomoki Shirasawa
67ebcca74d
Fix to VMAP virtual address leak
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_51
Refs: #1024
Change-Id: I1692ee4f004cb4d1f725baf47a8ed31fce1bf42a
2018-07-26 02:17:55 +00:00
Ken Sato
4ce4c9f264
init_process: Inherit parent cpu_set
...
Fujitsu: POSTK_DEBUG_TEMP_FIX_69
Refs: #1028
Change-Id: I1628bb5bf35fa670bb0019e1f3ae295277b1566e
2018-07-26 00:44:41 +00:00
Tomoki Shirasawa
5f4dbb2c71
mprotect: Fix early exit condition on page table attribute
2018-06-06 01:39:44 +09:00
Dominique MARTINET
81699345cc
mprotect: do not set page table writable for cow pages
...
Change-Id: If8b0bb56e7dae59aa9dc3d745a4cc4e43bf4bf9a
2018-05-30 13:29:55 +09:00
Masamichi Takagi
8d5f95de04
schedule: Add comment on #1029
...
refs #1029
2018-03-12 17:11:20 +09:00
Ken Sato
c107d1fdf9
fix: Bug for measuring rss in fork()
...
refs: #1032
2018-03-15 14:29:16 +09:00
Ken Sato
bc89a51e00
fix: getrusage's u|stime race-condition caused by release_thread() and getrusage()
2018-03-15 14:26:39 +09:00
Masamichi Takagi
fe42481d6f
Add allow_oversubscribe kernel argument
...
It's not allowed in the default setting.
Execute mcreboot.sh with -O option to allow it.
refs #1072
2018-03-10 13:08:38 +09:00
Masamichi Takagi
65667709a8
Fix thread status race-condition caused by hold_thread() in do_kill() and terminate()
...
Conflicts:
arch/x86_64/kernel/syscall.c
kernel/syscall.c
2018-03-09 17:53:17 +09:00
Masamichi Takagi
06b1b4f8ab
Fix deadlock on thread->times_update in getrusage()
...
Set thread->in_kernel properly on exiting interrupt handler when entering
it from kernel mode.
Conflicts:
arch/x86_64/kernel/cpu.c
kernel/mem.c
2018-03-09 17:26:31 +09:00
Ken Sato
a224bf648a
fix: Bug for getrusage return incorrect ru_maxrss
...
refs #1032
2018-03-07 13:09:24 +09:00
Ken Sato
c260b5c6f3
xpmem: support for fork()
...
refs #925
2018-02-22 09:37:48 +09:00
Balazs Gerofi
f56e087208
init_process_stack(): fix stack alignment (align to 64 bytes)
2018-01-26 13:43:23 +09:00
Ken Sato
1b25379c02
small fix: reset switch_ctx flag in schedule() for redo
2018-01-14 14:50:31 +09:00
Ken Sato
cc7be46b7d
make sure to context-switch to idle thread when therad's status is PS_EXITED
...
refs #1029
2017-12-25 13:32:42 +09:00
Balazs Gerofi
589504dc33
mcreboot: -h to indicate halting CPU in idle threads (e.g., in futex_wait())
2017-12-18 11:22:15 +09:00
Katsuya Horigome
d649d6fc2d
Include mbind support (this is a rebase commit to merge into development)
2017-11-27 11:16:53 +09:00
Ken Sato
90c0355d90
add setting process of pgshift to remap_process_memory_range
...
refs #955
2017-11-20 14:17:03 +09:00
Balazs Gerofi
3c93958c48
extend_process_region(): fix align_shift (POSTK_DEBUG_TEMP_FIX_68)
2017-10-17 15:07:57 +09:00
Dominique Martinet
4d4279121b
process/vm; replace vm_range list by a rbtree
...
This replaces the chained list used to keep track of all memory ranges
of a process by a standard rbtree (no need of interval tree here
because there is no overlap)
Accesses that were done directly through vm_range_list before were
replaced by lookup_process_memory_range, even full list scan (e.g.
coredump).
The full scans will thus be less efficient because calls to rb_next()
will not be inlined, but these are rarer calls that can probably afford
this compared to code simplicity.
The only reference to the actual backing structure left outside of
process.c is a call to rb_erase in xpmem_free_process_memory_range.
v2: fix lookup_process_memory_range with small start address
v3: make vm_range_insert error out properly
Panic does not lead to easy debug, all error paths
are handled to just return someting on error
v4: fix lookup_process_memory_range (again)
That optimistically going left was a more serious bug than just
last iteration, we could just pass by a match and continue down
the tree if the match was not a leaf.
v5: some users actually needed leftmost match, so restore behavior
without the breakage (hopefully)
2017-10-13 10:00:27 +09:00
Ken Sato
a1a2900606
ptrace: Fix the timing of save_fp_regs, and Add copy fp_regs to child in clone_thread
...
refs #702
2017-09-27 17:02:30 +09:00
Masamichi Takagi
be4d84c0c1
mcexec: Add --stack-premap=<premap_size>[,<max>]
...
<premap_size> of stack is pre-mapped on creating a process.
And its max size of stack is set to <max>.
This replaces MCKERNEL_RLIMIT_STACK=<premap_size>,<max>.
2017-09-26 17:04:10 +09:00
Masamichi Takagi
daa7526127
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
2017-09-20 15:11:57 +09:00
Masamichi Takagi
aa7cb970c4
ihk_os_getrusage(): Compile LWK-specific results in mcctrl
...
1. User asks mcctrl for the result via ihk_os_getrusage() with passing void *
2. mcctrl compiles the results and passes them to the user
3. User interprets it by using the type defined in the LWK-specific header
2017-09-20 15:03:45 +09:00
Balazs Gerofi
99a45f20c2
eliminate POSTK_DEBUG_TEMP_FIX_55: fixes preemption bug
2017-09-12 18:21:56 +09:00
Takayuki Okamoto
9989f41fd3
add arm64 support
...
- add arm64 dependent codes with GICv3 and SVE support
- fix bugs based on architecture separation requests
2017-09-05 15:06:27 +09:00
Masamichi Takagi
74f15783d2
ihk_os_getrusage(): Add per-page-size memory usage accounting
2017-08-17 12:49:34 +09:00
Balazs Gerofi
992a292c08
profile: better time breakdown and exclusion of idle cycles
2017-07-20 17:36:34 +09:00
Tomoki Shirasawa
2d7890731e
add_process_memory_range: do not initialize page when did not present phys page
2017-07-18 00:45:18 +09:00
Tomoki Shirasawa
d7b8e7f4f4
fix to count user pages
...
refs #864
2017-07-14 09:51:39 +09:00
Balazs Gerofi
4c6c66555e
memset_smp(): parallel memset
2017-07-08 18:36:05 +09:00
Tomoki Shirasawa
67843151d3
fix how to count rss and num of threads
...
refs #864
refs #865
2017-07-03 16:27:46 +09:00
Masamichi Takagi
72b8f99d3b
Correct comment for do_page_fault_process_vm()
2017-07-03 10:43:36 +09:00
Tomoki Shirasawa
07efb3ab9a
support to utility thread offloading
2017-06-27 13:27:09 +09:00
Tomoki Shirasawa
7773c4aef6
add log print for existing processes/threads
...
usage: ihkosctl 0 ioctl 40000000 [1-4]
1: print for existing processes
2: print for existing threads
3: print for existing processes without process lock
4: print for existing threads without thread lock
2017-06-11 15:19:24 +09:00
Balazs Gerofi
4d0e0728f4
destroy_thread(): disable IRQ while holding update lock
2017-06-08 17:40:35 +09:00
Balazs Gerofi
5758dba7cf
use spinlocks in MCS rwlock
2017-06-08 14:16:29 +09:00
Balazs Gerofi
fedba28a93
extend_process_region(): fix alignment
2017-06-07 17:21:55 +09:00
Masamichi Takagi
6bdafbd33b
Fix rusage
2017-06-07 09:30:42 +09:00
Balazs Gerofi
a669fc5125
extend_process_region(): align to heap extension
2017-05-26 15:45:57 +09:00
Balazs Gerofi
0c3b705f98
brk(): make aggressive heap extension optional
2017-05-24 01:41:54 +09:00
Balazs Gerofi
e901d42fb6
mcexec: --extend-heap-by: argument to specify heap extension size
2017-05-23 19:58:49 +09:00
Balazs Gerofi
105d373765
PROFILE_page_fault_XXX: more detailed page PF profiling
2017-05-23 19:57:08 +09:00
Balazs Gerofi
0dd2fad33b
brk(): more forceful heap extension
2017-05-23 19:57:08 +09:00
Balazs Gerofi
e3e0f6a174
mcexec: introduction of --profile
2017-05-23 02:42:06 +09:00
Balazs Gerofi
dd6f721e03
profile: job level event accumulation
2017-05-23 02:42:06 +09:00
Balazs Gerofi
e2f424846c
profile: rewrite syscall tracker for generic profiling code
2017-05-23 02:42:05 +09:00
Balazs Gerofi
989af7e045
mcexec: RLIMIT_STACK handling
2017-05-23 02:39:42 +09:00