Commit Graph

166 Commits

Author SHA1 Message Date
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
Tomoki Shirasawa
99da5b6484 ptrace: unify flags PT_TRACE_SYSCALL_ENTER and PT_TRACE_SYSCALL_EXIT to PT_TRACE_SYSCALL
refs #961
2017-10-11 15:43:57 +09:00
Tomoki Shirasawa
a2fbe99b60 madvise: support MADV_DONTDUMP/DODUMP
refs #661
2017-09-26 14:21:40 +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
Yutaka Ishikawa
236a072311 Add qlmpi and swap to mckernel (This is rebase commit for merging to development) 2017-08-29 15:04:58 +09:00
Balazs Gerofi
992a292c08 profile: better time breakdown and exclusion of idle cycles 2017-07-20 17:36:34 +09:00
Tomoki Shirasawa
07efb3ab9a support to utility thread offloading 2017-06-27 13:27:09 +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
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
9c25d47d9b mcexec: transfer job information to LWK 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
610463ff39 sched_setaffinity(): respect process cpu_set 2017-05-23 02:39:42 +09:00
Balazs Gerofi
26b9484bae mcexec: --mpol-threshold to control MPOL_BIND/MPOL_PREFERRED 2017-05-23 02:39:42 +09:00
Balazs Gerofi
182202523e mcexec/mm: user memory policy control for heap, stack, etc. 2017-05-23 02:39:42 +09:00
Balazs Gerofi
fdbdcbd0ee VR_AP_USER: memory range flag to respect user mempolicy (e.g., in PF handler) 2017-05-23 02:39:41 +09:00
Ken Sato
e6c4d7731d Merge remote-tracking branch 'origin/rusage'
Conflicts:
	configure
	kernel/process.c
2017-04-27 15:10:38 +09:00
Yoichi Umezawa
c38d536aaa xpmem: porting xpmem v2.6.3
implement xpmem_get, xpmem_release, xpmem_attach, xpmem_detach
2017-03-29 18:20:53 +09:00
Katsukura
3fe2257929 create rusage branch. 2017-03-15 23:22:51 +09:00
Balazs Gerofi
addbe91e59 do_migrate(): signal migrated thread before releasing runq lock 2017-01-30 07:24:09 +09:00
Balazs Gerofi
5cc420a6c3 syscall/offload tracker: clean-up and support process-wise aggregation 2017-01-30 07:24:09 +09:00
Balazs Gerofi
bd47b909bf futex(): spin wait when CPU not oversubscribed and fix lost wake-up bug 2017-01-13 08:43:25 +09:00
Balazs Gerofi
ec75095073 add_process_memory_range(): optionally return range object 2016-12-30 15:51:17 +09:00
Balazs Gerofi
f81927b85b Revert "brk(): larger allocation units internally"
This reverts commit c58ab0f648.
2016-12-20 11:11:09 +09:00
Balazs Gerofi
c58ab0f648 brk(): larger allocation units internally 2016-12-18 21:12:37 +09:00
Balazs Gerofi
fdcf766337 prepare_process(): pass cpu_set in program_load_desc 2016-12-09 16:32:20 +09:00
Balazs Gerofi
7d13bfb14e set_mempolicy(): limit maxnode to PROCESS_NUMA_MASK_BITS 2016-12-08 21:05:10 +09:00
Balazs Gerofi
a8c4ab221b use MCS locks in signal handling code 2016-12-05 18:10:20 +09:00
Balazs Gerofi
f78d031e64 syscall and offload tracking (disabled by default) 2016-12-05 18:10:20 +09:00
Ken Sato
1130cafe41 ptrace: fixed for threads. 2016-11-28 11:19:30 +09:00
Balazs Gerofi
64607152ee VM: introduction of range lookup cache 2016-11-23 08:48:44 +09:00
Balazs Gerofi
0f826290d0 NUMA: get_mempolicy(), set_mempolicy() and mbind() implementation 2016-11-05 13:32:02 +09:00
Balazs Gerofi
9705a80c82 get/set_mempolicy(): support for query/set process level policy 2016-10-16 14:01:14 +09:00
Balazs Gerofi
99a02e2941 get_mempolicy(): store policy in per-process VM structure 2016-10-16 09:10:36 +09:00
Balazs Gerofi
faa929e717 NUMA: add NUMA mask to process VM structure 2016-10-14 21:34:31 +09:00
Tomoki Shirasawa
e03f377326 interrupt_syscall: interrupt valid thread 2016-10-03 00:49:56 +09:00
Ken Sato
02536b7724 Merge remote-tracking branch 'remotes/origin/ikc2'
Conflicts:
	executer/kernel/mcctrl/syscall.c
It is resolved.
2016-09-27 11:48:12 +09:00
Tomoki Shirasawa
7c562d0539 support madvise(MADV_DONTFORK) 2016-09-01 11:22:53 +09:00
Balazs Gerofi
f584e2ec25 increase kernel stack size and eliminate unused waitq declaration in do_syscall() 2016-08-16 09:20:55 +09:00
Balazs Gerofi
3aa06444f4 do_syscall(): allow descheduling threads in offloaded syscalls if CPU core oversubscribed 2016-08-16 08:58:22 +09:00
Balazs Gerofi
6aae35cb3d process: transfer TIDs in bulk and reuse them locally 2016-08-02 16:59:04 +09:00
Balazs Gerofi
c484f766fa schedule(): schedule a sleeping processes if it has pending signals 2016-07-28 11:42:00 +09:00
Ken Sato
dd37443fc7 PAPI support: performance counter's overflow.
and support mckfd fcntl.
2016-06-24 13:50:12 +09:00
Ken Sato
130b1f4327 update PAPI support. other process and child process monitoring. 2016-04-26 19:01:47 +09:00
NAKAMURA Gou
41bb2ab5e6 support vdso which borrows clocksource from linux 2016-03-28 22:57:44 +09:00
NAKAMURA Gou
0c53a5ca35 add NOPHYS which means no physical memory 2016-03-28 22:57:44 +09:00
NAKAMURA Gou
798f69bceb add has_cap_ipc_lock() 2016-03-23 19:14:27 +09:00
NAKAMURA Gou
b214fc278a add has_cap_sys_admin() 2016-03-23 19:14:27 +09:00
NAKAMURA Gou
261bddb999 add a member pgshift into struct vm_range
pgshift indicates a page size in the range.
2016-03-23 19:04:32 +09:00
Ken Sato
d192e6c0fe modify PAPI support 2016-03-22 15:52:59 +09:00