Commit Graph

311 Commits

Author SHA1 Message Date
8d6c97ea5c schedule(): disable auto thread migration 2015-08-07 16:07:31 +09:00
0a0e2c04a0 support for dynamically toggling time sharing when CPU is oversubscribed 2015-08-07 08:51:50 +09:00
aa191b87d3 schedule(): use XSAVE/XRSTOR and swap floating point registers in context switch 2015-08-07 08:41:00 +09:00
d5c243571f cpu_clear_and_set(): atomic CPU mask update in migration code 2015-08-06 10:49:55 +09:00
328e69a335 schedule(): do not preempt while holding spinlocks or while in offloaded syscall 2015-08-06 10:36:13 +09:00
b77755d0f7 obtain_clone_cpuid(): always start from CPU 0 and fill in cores linearily 2015-07-28 20:20:47 +09:00
d7bae14707 TEMPORARY: schedule(): move threads when core is explicitly oversubscribed 2015-07-28 20:12:58 +09:00
4e58d08f5c schedule_timeout(): give a chance to other process in spin sleep if CPU core is oversubscribed 2015-07-28 20:06:56 +09:00
9b1e691588 fix thread migration code (i.e., sched_setaffinity())
- moved migration code into idle() process and updated schedule() to detect
  when a thread has moved to another CPU in order to avoid doing housekeeping
  on behalf of the original one
- start CPU head from core 0
- keeps track of nested interrupts
2015-07-24 20:09:17 +09:00
3988b0fc61 keep track of IRQ context and don't do thread migration there 2015-07-23 16:56:58 +09:00
1bc84d3feb modify to copy credentials 2015-07-13 15:29:26 +09:00
7647c99cc2 do_migrate(): disable IRQ while holding migq_lock to avoid deadlocking with reschedule interrupts 2015-07-09 15:23:28 +09:00
4ebe778ede vm->exiting: deal with exit_group() and concurrent page faults 2015-06-25 16:04:04 +09:00
7d5a68be1b add PID and GID to /proc/pid/status
add /proc/pid/cmdline

refs #445
refs #447
2015-05-18 17:45:37 +09:00
4698bc40c2 implement System V shared memory for LTP syscalls 2015-03-19 16:21:18 +09:00
8934eb91a4 kill syscall check uid 2015-03-17 15:04:36 +09:00
8b24f60861 Combine range and memobj flags before arch_vrflag_to_ptattr() 2015-03-05 16:40:14 +09:00
bf12a5c45e Introduction of write-combined memory type mappings.
Introduction of VR_WRITE_COMBINED, PTATTR_WRITE_COMBINED and modification
to the memobj's get_page() interface so that Linux communicates back mapping
flags (such as write-combined).
2015-03-05 16:03:21 +09:00
e6011be1af create area for to save fp regs
refs #421
2015-03-05 12:18:46 +09:00
2eac58aab3 add patch_process_vm(). (in progress)
This function patches specified range of specified user space even if
the range is not writable.

refs #401
2015-03-04 12:00:51 +09:00
2239a6b09b modify page_fault_process()
- change its argument from 'struct process *'
                        to 'struct process_vm *'.
- change its name from 'page_fault_process()'
                    to 'page_fault_process_vm()'.
- allow to resolve a fault on the process_vm of another process.
2015-03-04 11:29:15 +09:00
8caeba7cba support PTRACE_GETSIGINFO and PTRACE_SETSIGINFO
refs #422
2015-03-03 09:54:57 +09:00
0307f6a6cc impementation of sched_{setparam, getparam, setscheduler, getscheduler, get_priority_min, get_priority_max, rr_get_interval} system calls 2015-02-19 11:46:03 -08:00
c0edb6fe6f add new cpu state CPU_STATUS_RESERVED 2015-02-18 13:46:08 +09:00
16af976a71 support msync() system call. refs #382
Msync(2) of this version writes only the pages which the calling process
modified. Modifications of the other processes are not written.
2015-02-18 11:52:15 +09:00
9574a28a5f The same CPU is assigned to a different process.
refs #423
2015-02-17 18:27:46 +09:00
fa15f6b106 support PTRACE_SYSCALL.
support PTRACE_O_TRACESYSGOOD.
ptrace_report_exec() calls ptrace_report_signal().

refs #265
2015-02-17 16:56:27 +09:00
5f5ab34559 support PTRACE_ATTACH.
fix PTRACE_TRACEME, PTRACE_DETACH.
2015-01-30 21:02:01 +09:00
c3ade864d9 fix PTRACE_PEEKUSER, PTRACE_POKEUSER, PTRACE_GETREGS.
support PTRACE_SETREGS.
  In struct process, add 'unsigned long *ptrace_debugreg', instead of 'struct user *userp'.
  debug registers are read/written from/to ptrace_debugreg, save/restore in schedule().
  most general registers are proc->uctx.
  fs_base is proc->thread.tlsblock_base.
  gs_base,ds,es,fs,gs and orig_rax are uncompleted.
  other members in 'struct user' are ignored, same as Linux implementation.

refs #257
refs #373
refs #263
2015-01-29 14:08:38 +09:00
08cc31f9bf support setrlimits/getrlimits, however this fix is these syscalls only.
checking resource process must implement it separately.

refs #330
2015-01-27 10:35:58 +09:00
765de119dc support PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, PTRACE_O_TRACEVFORKDONE.
to start with a SIGSTOP, do not set proc->ftn->status to PS_RUNNING in __runq_add_proc().
  change vfork() set CLONE_VFORK.

refs #266
refs #267
refs #372

support PTRACE_GETEVENTMSG.
  to store ptrace event, add 'unsigned long ptrace_eventmsg;' member in struct fork_tree_node.

refs #273
2015-01-14 10:43:18 +09:00
0942bf0ce0 make dkprintf() evaluate its parameters always
Parameters of dkprintf() should be evaluated even if dkprintf() is
disabled.  Because this enables to find expression of parameter obsolete
and to avoid unnecessary compiler warnings such as "unused variable".
2014-12-22 16:58:03 +09:00
9c94e90007 use ftn->tid instead of proc->tid 2014-12-22 16:58:02 +09:00
8909597499 clone(): support for handling CLONE_SIGHAND and CLONE_VM flags separately 2014-12-04 16:55:17 +09:00
8f30e16976 when mcexec is killed by SIGKILL, terminate mckernel process (BUG#259) 2014-11-27 16:13:52 +09:00
89acf5c5d6 support for AT_RANDOM auxiliary entry on the process stack (needed for _dl_random in glibc) 2014-11-11 08:48:27 +09:00
3fe7e39607 some variables definition are gathered to fork_tree_node from process.
- remove both-defined: pid, pgid, status
- move to fork_tree_node: tid
- make dummy fork_tree_node for idle_process.
2014-10-29 16:54:09 +09:00
11947a4ce3 initialize and propagate a cpu affinity (temporary fix)
This fix is only intended to work an OpenMP program.
It is necessary to investigate behavior of linux and reimplement this
fix.
2014-10-20 15:21:49 +09:00
f195b9c675 don't use COW pages in private anonymous mapping (quick fix) 2014-10-17 23:25:15 +09:00
d2cb890cdd idle(): recheck runq just before cpu status check
There is a problem which causes wait4(2) hang when wait4(2) called by a
process races with its child process termination.
This is a quick fix for this problem. See idle().

refs #271
2014-10-15 17:58:27 +09:00
758796bb69 idle(): cosmetic changes 2014-10-15 17:58:27 +09:00
95dd193fd6 Fix reporting of having done execve to ptracer 2014-10-15 14:49:23 +09:00
2997274470 Make __WCLONE option for wait4(2) and flags for clone(2) work properly. 2014-10-15 14:45:58 +09:00
013d3e95c2 Fix manipulation of fork_tree_node for ptrace 2014-10-15 14:42:17 +09:00
658b88fd7b Modify spacing 2014-10-15 14:40:47 +09:00
da17625be9 gdb: definitions for ptrace() and syscall part of TRACEME 2014-10-15 14:30:17 +09:00
dbecaa2fc8 Add ptrace functions of job-control and signal
Note that a forked process automatically becomes ptraced state in this
commit.
2014-10-15 14:28:55 +09:00
a7b0880a8d Make findthread_and_lock take ihk_spinlock_t ** 2014-09-23 12:03:48 +09:00
7e12f0db72 Revert "テスト支援コード"
This reverts commit 054cb2ada2.
2014-09-17 19:59:32 +09:00
d692b57a67 Revert "idle 開始時に free_list の状況を表示する"
This reverts commit ec47968a48.
2014-09-17 19:59:27 +09:00