Dominique Martinet
794684985f
mcctrl syscall: remove unused walk page debug function
...
This saves looking up one symbol for a debug function that is not
used anywhere
Change-Id: I6a3a480ce8067b4f6f0faf9aa837119ea46888ad
2018-08-08 05:57:46 +00:00
Dominique Martinet
625607e6db
mcctrl sysfs_files: cleanup vfs_readdir -> iterate_dir compat
...
Cleanup the fix suggested by Fujitsu a bit
Change-Id: I95165b834e32a01f43eb3b4fcaca039e4d04fe86
2018-08-08 05:41:04 +00:00
Dominique Martinet
05afa8b6dd
mcctrl sysfs_files: vfs_readdir -> iterate_dir compat
...
vfs_readdir got removed in recent kernels
Change-Id: Iac9a9954afefa0f6dbcdc2c94786cf747e21e1fe
Fujitsu: POSTK_DEBUG_TEMP_FIX_22
2018-08-08 05:39:07 +00:00
Dominique Martinet
6cf89076dc
mcctrl handle_mm_fault compat: add el7.5 support
...
Change-Id: I8c7738b70ca914e857be119b7720cdc22e61ae0e
2018-08-08 05:36:35 +00:00
Tomoki Shirasawa
14660a10c3
Fix to procfs read returns EIO
...
Refs: #1152
Change-Id: I48b330953fd7674ba1a3ac35744f9f50a5712730
2018-08-02 01:48:51 +00:00
Dominique Martinet
1543119139
mcctrl rus_vm_fault: tpe changed with kernel >= 4.11
...
vma is part of vmf and isn't needed, so type changed (see linux 11bac80
("mm, fs: reduce fault, [...] to take only vmf"))
Change-Id: I4c023e23c7e7416ad2df2dcc0698a0032e574e4c
2018-07-27 02:31:39 +00:00
Dominique Martinet
0a0a78ac2e
mcctrl: replace GFP_TEMPORARY by GFP_KERNEL
...
See linux's commit 0ee931c4 ("mm: treewide: remove GFP_TEMPORARY
allocation flag") for a long explanation, but basically that flag
"is just cargo cult" and should be removed
Change-Id: I2147cd65b6b9ec509a72e11cc3abf1fe1561c10b
2018-07-27 02:31:00 +00:00
Dominique Martinet
dc8d6b740c
pager_req_read: handle short read
...
Change-Id: Iff89046041e012a65c80a29b485ddbb636435dd0
2018-07-26 04:37:54 +00:00
Dominique Martinet
c2e1b8d694
mcctrl_ikc_send_wait: fix interrupt with do_frees == NULL
...
do_frees is allowed to be NULL only if free_addrs_count is 0, but that
is increased to account for the wakeup_desc itself before this failure
Change-Id: Iab33712c76ae452df7044558a12745a89adb47ac
2018-07-26 04:34:03 +00:00
Dominique Martinet
f6d8138e05
mcexec_wait_syscall: requeue potential request on interrupted wait
...
Change-Id: Id7a324f18ebb8c81f05bd8362e19d9314a445308
2018-07-26 04:31:34 +00:00
Masamichi Takagi
992705d465
pager_get_path: Append \0 to path
...
Change-Id: Iaabd89a649bb20b37b35cd345da0f468fd5dd0b5
2018-07-10 02:10:19 +00:00
Dominique Martinet
854bc85602
mcctrl: convert send_signal to mcctrl_ihk_send_wait
...
Change-Id: Ibd2fc834444d83341a96579f0c9c22080a53e8fa
2018-07-02 16:11:01 +09:00
Dominique Martinet
ab8fe0bbbf
mcctrl: convert perf ctrl ioctls to mcctrl_ihk_send_wait
...
While we are here, also optimize code a bit: perf_desc does not need
to be allocated for every cpu; and fix coding style.
Change-Id: Iad19fed08205d38594fd3f1b7ddf2b19a9cf0d9d
2018-07-02 16:11:01 +09:00
Dominique Martinet
b87c06cbcb
mcctrl_ikc_send_wait: give possibility to use pre-allocated desc
...
Change-Id: I1afbabe792648bbf2c5a9a38ebbfba8ea9060d06
2018-07-02 16:11:01 +09:00
Dominique Martinet
b939ca9370
mcctrl: refactor prepare_image into new generic ikc send&wait
...
Many ikc messages expecting a reply use wait_event_interruptible
incorrectly, freeing memory that could still be used on the other side.
This commit implements a generic ikc send and wait helper that helps
with memory management and ownership properly:
- if the message succeeds and a reply comes back normally, the memory
is freed by the caller as usual
- if the wait fails (signal before the reply comes or timeout) then the
memory is set as owner by ikc and will be free when the reply comes back
later
- if the reply never comes, the memory is freed at shutdown when
destroying ikc channels
Refs: #1076
Change-Id: I7f348d9029a6ad56ba9a50c836105ec39fa14943
2018-07-02 04:34:44 +00:00
Balazs Gerofi
f148863586
pager_req_map(): do not take mmap_sem if not needed
2018-06-07 07:17:41 +09:00
Balazs Gerofi
ec375da27a
pager_req_create(): prefetch libiomp, libpthread and libc
2018-06-07 07:17:31 +09:00
Balazs Gerofi
f3d18eb9de
fileobj/devobj: record path name (originally by Takagi-san)
2018-05-14 17:46:52 +09:00
Masamichi Takagi
bfb5080b71
pager_req_unmap: Put per-process data at exit
2018-04-10 11:35:03 +09:00
Dominique Martinet
4572e6be3f
fix mcctrl SMAP - everyone needs copy_to_user
2018-04-03 10:38:44 +09:00
Balazs Gerofi
e2dea4e9f8
mcexec_start_image(): handle IKC send timeout
2018-03-17 21:33:17 +09:00
Masamichi Takagi
b1ea6eb82a
procfs: Show Linux /proc/self/cgroup
...
Support the case where McKernel process retrieves its job-id when running under
the Fujitsu TCS suite.
2018-03-10 11:58:45 +09:00
Masamichi Takagi
51bc5fd61f
uti: Fix wrong argument passed to ihk_ikc_release_packet() in mcexec_terminate_thread()
...
Conflicts:
executer/kernel/mcctrl/control.c
2018-03-09 17:44:30 +09:00
Masamichi Takagi
3e4c9bdd90
Fix lock of struct wait_queue_head_list_node
2018-03-09 17:31:10 +09:00
Tomoki Shirasawa
642520f80c
rus_vm_fault: If page fault occurs in a thread that has not processed system call offloading, incorrectly return to normal.
...
refs #923
2018-03-07 10:22:47 +09:00
Tomoki Shirasawa
5cb75b00c7
mcexec_destroy_per_process_data: System calls delegation can not be terminated in error when the last process that closed /dev/mcos0 is a child process.
...
refs #882
2018-03-07 09:11:37 +09:00
Tomoki Shirasawa
7dd0d1137f
revert for fix git message
...
This reverts commit 840acd6021 .
2018-03-07 09:09:28 +09:00
Tomoki Shirasawa
840acd6021
mcexec_destroy_per_process_data: System calls delegation can not be terminated in error when the last process that closed /dev/mcos0 is a child process.
...
refs #822
2018-02-14 16:34:08 +09:00
Ken Sato
228f8f8533
Wait for LWK to run at shutdown.
...
refs #898
refs #928
2018-02-06 10:40:12 +09:00
Balazs Gerofi
a9dfcd9a89
translate_rva_to_rpa(): use 2MB blocks in 1GB pages on x86
2018-01-31 11:16:44 +09:00
Balazs Gerofi
35f908b75c
mcexec: protect against incorrect partitioned execution argument (-n) using timeouts
2017-11-20 17:06:01 +09:00
Ken Sato
ac25c5e1e7
fix: depending arch in Makefile (POSTK_DEBUG_ARCH_DEP_1)
2017-11-20 14:45:18 +09:00
Hannes Weisbach
1cb9b435a9
Fix (?) build system
...
- disable -mno-red-zone for ARM
- add missing INCLUDEDIR
- make gencore.c compile
2017-10-18 09:20:52 +09:00
Hannes Weisbach
51982de36b
Handle return value of mcctrl_ikc_send in mcexec_handle_prepare_image
2017-10-18 09:20:51 +09:00
Dominique Martinet
d213efac79
mcctrl/sysfs: add parenthesis around SYSFS_UNLINK_KEEP_ANCESTOR check
...
! has more priority than &, so !flags & SYSFS_UNLINK_KEEP_ANCESTOR is
not very likely. Change to !(flags & SYSFS_UNLINK_KEEP_ANCESTOR)
2017-10-13 10:02:11 +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
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
Tomoki Shirasawa
cdfa4015b7
load_elf: check mckernel execution
...
refs #758
2017-09-12 13:15:22 +09:00
Takayuki Okamoto
0278a876db
disable POSTK_DEBUG_* on x86_64
2017-09-07 22:20:22 +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
99ca46663b
mcctrl, mexec: fix a bunch of warnings
2017-09-04 08:53:32 +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
75e2bb7793
mcctrl: Fix debug messages
2017-08-17 12:49:34 +09:00
Tomoki Shirasawa
831a0637a1
delete debug print
2017-08-01 15:27:51 +09:00
Tomoki Shirasawa
ac432504a7
uti_attr: move kmalloc after error check
2017-07-28 10:31:59 +09:00
Tomoki Shirasawa
b39fec1104
uti: remove unused functions
2017-07-26 13:14:30 +09:00
Masamichi Takagi
86dedc32fa
Eliminate Japanese comments
2017-07-15 20:04:16 +09:00
Tomoki Shirasawa
effde241b9
support uti_attr for utility thread offloading
2017-07-25 13:03:48 +09:00