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
Masamichi Takagi
dd08a3151e
mcreboot: Fix version check for mcoverlayfs
2017-10-04 00:37:01 +09:00
Masamichi Takagi
86f297ddc4
mcreboot: Fix change umask for /proc and /sys files
2017-10-03 15:21:44 +09:00
Masamichi Takagi
823b222af9
mcreboot: Change umask for /proc and /sys files
2017-10-03 06:03:44 +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
79b977ac06
Check xgetbv availability before use for machines without it (i.e. KVM)
2017-09-26 19:31:34 +09:00
Tomoki Shirasawa
df3f388e09
syscall: set -ENOSYS to syscall_return before calling ptrace_syscall_enter
...
refs #943
2017-09-26 14:25:49 +09:00
Tomoki Shirasawa
a2fbe99b60
madvise: support MADV_DONTDUMP/DODUMP
...
refs #661
2017-09-26 14:21:40 +09:00
Masamichi Takagi
5b51eb80a3
Redirect kmsg to /dev/log and detect hungup
...
1. ihkmond retrieves kmsg when the amount of kmsg exceeds the threashold and
/dev/mcosX is deleted
2. ihkmond periodically monitors OS status change to detect hungup
2017-09-20 15:25:19 +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
a1af7edd6e
ihk_os_create_pseudofs(): Add a function to prepare /proc and /sys
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
Dominique Martinet
230272438f
init_fpu: only call xgetbv if we have XSAVE cpuid
...
xgetbv crashes on cpu without avx, the XSAVE bit seems to indicate
that it is ok to call xgetbv
2017-09-12 18:27:28 +09:00
Katsuya Horigome
a05b6e1ba8
Expand dump-functions for excluding user/unused memory (This is rebase commit for merging to development)
2017-09-11 15:49:04 +09:00
Takayuki Okamoto
325082a571
adapt "out of tree build" for arm64
2017-09-11 15:29:53 +09:00
Takayuki Okamoto
0278a876db
disable POSTK_DEBUG_* on x86_64
2017-09-07 22:20:22 +09:00
Takayuki Okamoto
9a550b310c
Add hwcap.h for x86
2017-09-06 11:10:32 +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
Balazs Gerofi
90fbfd6f7d
clear_range_l3(): remove debug message
2017-09-04 08:33:42 +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
Masamichi Takagi
74f15783d2
ihk_os_getrusage(): Add per-page-size memory usage accounting
2017-08-17 12:49:34 +09:00
Masamichi Takagi
86dedc32fa
Eliminate Japanese comments
2017-07-15 20:04:16 +09:00
Balazs Gerofi
bf5ac7afc8
remote_flush_tlb_array_cpumask(): bundle remote TLB invalidations
2017-07-21 15:34:48 +09:00
Tomoki Shirasawa
64c2e437c6
open: check filename address (re-commit)
2017-07-19 11:37:55 +09:00
Balazs Gerofi
dd9675d65e
NUMA: only print a short summary at boot time
2017-07-19 09:11:44 +09:00
Tomoki Shirasawa
d7b8e7f4f4
fix to count user pages
...
refs #864
2017-07-14 09:51:39 +09:00
Masamichi Takagi
6415dcfdcc
mcexec: Disable address space layout randomization
...
Move the code from mcreboot.sh to mcexec.c.
2017-07-12 14:17:38 +09:00
Masamichi Takagi
8d57ad9bc4
pmc_start, pmc_stop: Error check on counter number
2017-07-11 19:05:45 +09:00
Balazs Gerofi
4c0f401424
move_pages(): parallel implementation v1
2017-07-08 18:36:05 +09:00
Balazs Gerofi
06f824c829
pte_update_phys(): update physical address of a PTE
2017-07-08 18:36:05 +09:00
Balazs Gerofi
209748d913
visit_pte_range(): visit L1 PTEs but don't free for MF_PREMAP files
2017-07-08 18:36:04 +09:00
Balazs Gerofi
2189c55d99
x86: ASM fast memset()
2017-07-08 18:26:51 +09:00
Masamichi Takagi
e64bd49d9e
Add comment for x86_sregs
2017-07-03 10:43:36 +09:00
Tomoki Shirasawa
07efb3ab9a
support to utility thread offloading
2017-06-27 13:27:09 +09:00
Masamichi Takagi
fa6f20a3c4
Correct comments in gencore.c
2017-06-16 21:47:23 +09:00
Ken Sato
58e531eb58
mcreboot: add taskset -c 0 to insmod. refs #848
2017-06-09 17:18:45 +09:00
Balazs Gerofi
5758dba7cf
use spinlocks in MCS rwlock
2017-06-08 14:16:29 +09:00
Balazs Gerofi
dd2ef89997
SMP: generic function call facility for CPU sets
2017-05-28 07:41:48 +09:00
Balazs Gerofi
ba7edf1981
move out local IRQ vector definitions to shared header
2017-05-28 07:36:21 +09:00
Balazs Gerofi
9b5ccb5a33
Pre-map file mappings from /dev/shm (--mpol-shm-premap mcexec argument)
2017-05-23 20:00:06 +09:00
Balazs Gerofi
e3e0f6a174
mcexec: introduction of --profile
2017-05-23 02:42:06 +09:00
Balazs Gerofi
32c8f6192d
unhandled_page_fault(): print registers for kernel mode PF
2017-05-23 02:42:05 +09:00
Balazs Gerofi
bf036f19f7
mcreboot: offline/re-online RAM before IHK reserve
2017-05-23 02:39:42 +09:00
Balazs Gerofi
21373338cc
mcctrl: IHK CPU register manipulation implementation
2017-05-20 12:38:14 +09:00
Katsukura
ba58054c9d
create rusage branch.
2017-05-19 10:30:36 +09:00
Ken Sato
d66af42f7b
Revert "IKC: separate IRQ between Master-channel and Regular-channel"
...
This reverts commit 3c98b9410966ceebe187ebae1038317b628fbb03.
2017-05-19 10:26:30 +09:00
Ken Sato
65dc3440cb
IKC: separate IRQ between Master-channel and Regular-channel
2017-05-19 10:26:30 +09:00
Ken Sato
fbd9086ce5
IKC: delete recieve channel list
2017-05-19 10:26:29 +09:00
Ken Sato
c2b1d8e3ef
IKC: delete the comments for review
2017-05-19 10:26:29 +09:00