Commit Graph

362 Commits

Author SHA1 Message Date
Balazs Gerofi
6e289e8d9f HFI1: txreq cache and profiling 2018-06-13 00:31:32 +09:00
Balazs Gerofi
3b5363c533 HFI1: use original length calculation in sdma_send_pkts()
Conflicts:
	kernel/include/hfi1/sdma.h
2018-06-13 00:31:32 +09:00
Balazs Gerofi
39deff4e10 HFI1: working but a bit slow 2018-06-13 00:31:31 +09:00
Aram Santogidis
640dba627f Added debugging output. Bugfixes in user_sdma_send_pkts() and sdma_send_txreq(). 2018-06-13 00:31:31 +09:00
Aram Santogidis
ae368d97d4 Implemented a replacement for sdma_txadd_page()
Conflicts:
	kernel/user_sdma.c
2018-06-13 00:31:31 +09:00
Aram Santogidis
076e6b9b12 Enabled _sdma_txadd_daddr() 2018-06-13 00:31:30 +09:00
Aram Santogidis
fa6db686b4 Corrected spin_lock_irqsave() spin_unlock_irqrestore() definitions
Conflicts:
	kernel/include/hfi1/ihk_hfi1_common.h
2018-06-13 00:31:30 +09:00
Aram Santogidis
74a636a612 Updated structs to use completion{} and wait_queue_head_t{} and added struct size checkes in hfi1_aio_write() 2018-06-13 00:31:30 +09:00
Aram Santogidis
1c4a6568e6 Updated sdma.h (fixed struct sdma_engine size) 2018-06-13 00:31:30 +09:00
Aram Santogidis
7005110697 Updated and confirmed struct iowait{} and struct hfi1_user_sdma_pkt_q {}
Conflicts:
	kernel/include/hfi1/ihk_hfi1_common.h
2018-06-13 00:31:30 +09:00
Aram Santogidis
c4ca4ae3ab Updated struct hfi1_devdata and confirmed its size 2018-06-13 00:31:30 +09:00
Aram Santogidis
b024a486b9 Updated hfi1_filedata {} and confirmed its size against the original on Linux
Conflicts:
	kernel/include/hfi1/hfi.h
2018-06-13 00:31:30 +09:00
Aram Santogidis
fe4c461f2f Updated kcalloc/kmalloc calls and enabled sdma_select_user_engine dependencies
Conflicts:
	kernel/include/hfi1/ihk_hfi1_common.h
2018-06-13 00:31:29 +09:00
Aram Santogidis
5cf884ef41 Updated TODO tags and struct hfi1_user_sdma_pkt_q 2018-06-13 00:31:29 +09:00
Aram Santogidis
64e2639adc * The relevant files have been modified in order to compile with McKernel.
Conflicts:
	kernel/Makefile.build.in
2018-06-13 00:31:29 +09:00
Aram Santogidis
14b360e867 * Added the original files of the driver as a basis for comparison
Conflicts:
	kernel/include/hfi1/sdma.h
	kernel/sdma.c
	kernel/user_sdma.c
2018-06-13 00:31:29 +09:00
Balazs Gerofi
4a0e389953 HFI1: comments to keep in mind
Conflicts:
	kernel/include/hfi1/sdma.h
	kernel/sdma.c
	kernel/user_sdma.c
2018-06-13 00:31:28 +09:00
Aram Santogidis
8a1d756cb1 Added private_data structure in process
Conflicts:
	executer/user/mcexec.c
	kernel/include/process.h
	kernel/process.c
2018-06-13 00:31:28 +09:00
Balazs Gerofi
b2c8cc50dc open(): record private_data
Conflicts:
	kernel/syscall.c
2018-06-13 00:31:28 +09:00
Dominique Martinet
42bbf5f2a4 process/vm: implement access_ok() 2018-06-13 00:31:27 +09:00
Balazs Gerofi
e29a40331d partitioned execution: pass process rank to LWK
Cherry-pick of d2d134d5e6a4b16a34d55d31b14614a2a91ecf47

Conflicts:
	kernel/include/process.h
2018-06-13 00:31:27 +09:00
Balazs Gerofi
aed099fbcb kmalloc_header: use signed integer for target CPU id
Cherry-pick of bdb2d4d8fa94f9c0268cdfdb21af1a2a5c2bcae5
2018-06-13 00:31:27 +09:00
Balazs Gerofi
f3d18eb9de fileobj/devobj: record path name (originally by Takagi-san) 2018-05-14 17:46:52 +09:00
Dominique Martinet
c52f7a5b49 syscall wait4: add _WALL (POSTK_DEBUG_ARCH_DEP_44)
Needed by strace -f
2018-05-11 09:22:54 +09:00
Ken Sato
c107d1fdf9 fix: Bug for measuring rss in fork()
refs: #1032
2018-03-15 14:29:16 +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
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
Ken Sato
228f8f8533 Wait for LWK to run at shutdown.
refs #898
refs #928
2018-02-06 10:40:12 +09:00
Tomoki Shirasawa
4bb65494e9 signal: When the process receives a termination signal, it first terminates mcexec.
refs #863
refs #870
2018-01-23 14:40:38 +09:00
Tomoki Shirasawa
2f2b3cdc6f signal: interrupt_syscall is called by the core executing the thread that recieved the signal.
refs #999
2018-01-23 14:31:04 +09:00
Masamichi Takagi
9a5d5feb9c time(): Split into architecture dependent functions
This fixes the bug reported as POSTK_ARCH_DEP_13 and POSTK_DEBUG_ARCH_DEP_13.
2017-12-23 11:36:52 +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
2af6d5115a fix: depending arch futex_atomic_op_inuser() (a part of ARCH_DEP_8) 2017-11-20 16:42:47 +09:00
Hitoshi Iizuka
08a625cc0d modify:User space memory access
perf_event_open,futex,process_vm_readv,process_vm_writev,move_pages
2017-10-23 20:27:56 +09:00
Ken Sato
12840601e1 support PERF_TYPE_{HARDWARE|HW_CACHE} in perf_event_open
refs #829
2017-10-20 23:10:20 +09:00
Balazs Gerofi
d5629606c5 mcexec: -m: interpret as numactl -m (i.e., MPOL_BIND)
Conflicts:
	executer/include/uprotocol.h
	executer/user/mcexec.c
	kernel/include/syscall.h
2017-10-18 16:54:34 +09:00
Balazs Gerofi
43ecf06e83 arch: x86 -> x86_64 and build system changes 2017-10-18 09:20:52 +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
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
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
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
c5d71c325d Modify copyright of files related to XPMEM 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
2a46fd0b2d compiler.h: take in recent linux updates for newer gcc support
Had to remove from original compiler-gcc:
 - things that deal with types, e.g. READ_ONCE macro and friends;
 - #define barrier(). This one would be better there at some point.
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