#
f0393f06 |
| 23-Jan-2007 |
Jeff Roberson <jeff@FreeBSD.org> |
- Remove setrunqueue and replace it with direct calls to sched_add(). setrunqueue() was mostly empty. The few asserts and thread state setting were moved to the individual schedulers. sched_a
- Remove setrunqueue and replace it with direct calls to sched_add(). setrunqueue() was mostly empty. The few asserts and thread state setting were moved to the individual schedulers. sched_add() was chosen to displace it for naming consistency reasons. - Remove adjustrunqueue, it was 4 lines of code that was ifdef'd to be different on all three schedulers where it was only called in one place each. - Remove the long ifdef'd out remrunqueue code. - Remove the now redundant ts_state. Inspect the thread state directly. - Don't set TSF_* flags from kern_switch.c, we were only doing this to support a feature in one scheduler. - Change sched_choose() to return a thread rather than a td_sched. Also, rely on the schedulers to return the idlethread. This simplifies the logic in choosethread(). Aside from the run queue links kern_switch.c mostly does not care about the contents of td_sched.
Discussed with: julian
- Move the idle thread loop into the per scheduler area. ULE wants to do something different from the other schedulers.
Suggested by: jhb
Tested on: x86/amd64 sched_{4BSD, ULE, CORE}.
show more ...
|
#
d071f504 |
| 20-Jan-2007 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFp4 (113077, 113083, 113103, 113124, 113097):
Dont expose em->shared to the outside world before its properly initialized. Might not affect anything but its at least a better coding style.
Don
MFp4 (113077, 113083, 113103, 113124, 113097):
Dont expose em->shared to the outside world before its properly initialized. Might not affect anything but its at least a better coding style.
Dont expose em via p->p_emuldata until its properly initialized. This also enables us to get rid of some locking and simplify the code because we are workin on a local copy.
In linux_fork and linux_vfork create the process in stopped state to be sure that the new process runs with fully initialized emuldata structure [1]. Also fix the vfork (both in linux_clone and linux_vfork) race that could result in never woken up process [2].
Reported by: Scot Hetzel [1] Suggested by: jhb [2] Reviewed by: jhb (at least some important parts) Submitted by: rdivacky Tested by: Scot Hetzel (on amd64)
Change 2 comments (in the new code) to comply to style(9).
Suggested by: jhb
show more ...
|
#
973ac082 |
| 14-Jan-2007 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFp4 (112893): Make linux_vfork() actually work. This enables make to work again with 2.6. It also fixes the LTP vfork tests.
Submitted by: rdivacky
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
1c65504c |
| 07-Jan-2007 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFp4 (112498): Rename the locking flags to EMUL_DOLOCK and EMUL_DONTLOCK to prevent confusion.
Submitted by: rdivacky
|
#
acd3428b |
| 06-Nov-2006 |
Robert Watson <rwatson@FreeBSD.org> |
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
show more ...
|
#
0f054958 |
| 20-Oct-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Fix a recent regression regarding valid signals.
Submitted by: rdivacky
|
#
0a62e035 |
| 15-Oct-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFP4 (106538 + 106541): Implement CLONE_VFORK. This fixes the clone05 LTP test.
Submitted by: rdivacky
|
#
2482245b |
| 15-Oct-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Revert my previous commit, I mismerged this to the wrong place.
Pointy hat to: netchild
|
#
21aed094 |
| 15-Oct-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFP4 (106541): Fix the clone05 test in the LTP.
Submitted by: rdivacky
|
#
4b3583a3 |
| 15-Oct-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFP4 (107144[1]): Implement CLONE_FS on i386[1] and amd64.
Submitted by: rdivacky [1]
|
#
687c23be |
| 15-Oct-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFP4 (107868 - 107870): Use a macro to test for a valid signal instead of doing it my hand everywhere.
Submitted by: rdivacky
|
#
6dc4e810 |
| 20-Sep-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
style(9)
While I'm here add a MFC reminder, I forgot it in the previous commit.
Noticed by: ssouhlal MFC after: 1 week
|
#
a312f6a3 |
| 20-Sep-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Bring the i386 linux mmap code more into line with how linux (2.4.x) behaves. This fixes a lot of test which failed before. For amd64 there are still some problems, but without any testers which appl
Bring the i386 linux mmap code more into line with how linux (2.4.x) behaves. This fixes a lot of test which failed before. For amd64 there are still some problems, but without any testers which apply patches and run some predefines tests we can't do more ATM.
Submitted by: Marcin Cieslak <saper@SYSTEM.PL> (minor fixups by myself) Tested with: LTP
show more ...
|
#
a6c5f813 |
| 27-Aug-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Fix video playing and network connections in realplayer (and most likely other stuff) in the osrelease=2.6.16 case: - implement CLONE_PARENT semantic - fix TLS loading in clone CLONE_SETTLS - lock
Fix video playing and network connections in realplayer (and most likely other stuff) in the osrelease=2.6.16 case: - implement CLONE_PARENT semantic - fix TLS loading in clone CLONE_SETTLS - lock proc in the currently disabled part of CLONE_THREAD
I suggest to not unload the linux module after testing this, there are some "<defunct>" processes hanging around after exiting (they aren't with osrelease=2.4.2) and they may panic your kernel when unloading the linux module. They are in state Z and some of them consume CPU according to ps. But I don't trust the CPU part, the idle threads gets too much CPU that this may be possible (accumulating idle, X and 2 defunct processes results in 104.7%, this looks to much to be a rounding error).
Noticed by: Intron <mag@intron.ac> Submitted by: rdivacky (in collaboration with Intron) Tested by: Intron, netchild Reviewed by: jhb (previous version)
show more ...
|
#
40f734dd |
| 25-Aug-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Emulate what vfork does instead of using it in linux_vfork. This way we can do the stuff we need to do with linux processes at fork and don't panic the kernel at exit of the child.
Submitted by: rdi
Emulate what vfork does instead of using it in linux_vfork. This way we can do the stuff we need to do with linux processes at fork and don't panic the kernel at exit of the child.
Submitted by: rdivacky Tested with: tst-vfork* (glibc regression tests) Tested by: netchild
show more ...
|
#
94cb2ecf |
| 17-Aug-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Move some stuff into headers where they belong.
Sponsored by: Google SoC 2006 Submitted by: rdivacky Noticed by: jhb, ssouhlal
|
#
0eef2f8a |
| 16-Aug-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Style fixes to comments.
Sponsored by: Google SoC 2006 Submitted by: rdivacky Noticed by: jhb, ssouhlal
|
#
9b44bfc5 |
| 15-Aug-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Add the linux 2.6.x stuff (not used by default!): - TLS - complete - pid/tid mangling - complete - thread area - complete - futexes - complete with issues - clone() extension - complete with som
Add the linux 2.6.x stuff (not used by default!): - TLS - complete - pid/tid mangling - complete - thread area - complete - futexes - complete with issues - clone() extension - complete with some possible minor issues - mq*/timer*/clock* stuff - complete but untested and the mq* stuff is disabled when not build as part of the kernel with native FreeBSD mq* support (module support for this will come later)
Tested with: - linux-firefox - works, tested - linux-opera - works, tested - linux-realplay - doesnt work, issue with futexes - linux-skype - doesnt work, issue with futexes - linux-rt2-demo - works, tested - linux-acroread - doesnt work, unknown reason (coredump) and sometimes issue with futexes - various unix utilities in linux-base-gentoo3 and linux-base-fc4: everything tried worked
On amd64 not everything is supported like on i386, the catchup is planned for later when the remaining bugs in the new functions are fixed.
To test this new stuff, you have to run sysctl compat.linux.osrelease=2.6.16 to switch back use sysctl compat.linux.osrelease=2.4.2
Don't switch while running a linux program, strange things may or may not happen.
Sponsored by: Google SoC 2006 Submitted by: rdivacky Some suggestions/help by: jhb, kib, manu@NetBSD.org, netchild
show more ...
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
8917b8d2 |
| 06-Feb-2006 |
John Baldwin <jhb@FreeBSD.org> |
- Always call exec_free_args() in kern_execve() instead of doing it in all the callers if the exec either succeeds or fails early. - Move the code to call exit1() if the exec fails after the vmspac
- Always call exec_free_args() in kern_execve() instead of doing it in all the callers if the exec either succeeds or fails early. - Move the code to call exit1() if the exec fails after the vmspace is gone to the bottom of kern_execve() to cut down on some code duplication.
show more ...
|
Revision tags: release/6.0.0_cvs, release/6.0.0 |
|
#
c035ac04 |
| 01-Aug-2005 |
Maxim Sobolev <sobomax@FreeBSD.org> |
Propagate error code of kern_execve() to the caller properly.
PR: 81670 Submitted by: Andrew Bliznak <andriko.b@gmail.com> Pointy hat to: sobomax
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
4b178336 |
| 03-Mar-2005 |
Maxim Sobolev <sobomax@FreeBSD.org> |
In linux emulation layer try to detect attempt to use linux_clone() to create kernel threads and call rfork(2) with RFTHREAD flag set in this case, which puts parent and child into the same threading
In linux emulation layer try to detect attempt to use linux_clone() to create kernel threads and call rfork(2) with RFTHREAD flag set in this case, which puts parent and child into the same threading group. As a result all threads that belong to the same program end up in the same threading group.
This is similar to what linuxthreads port does, though in this case we don't have a luxury of having access to the source code and there is no definite way to differentiate linux_clone() called for threading purposes from other uses, so that we have to resort to heuristics.
Allow SIGTHR to be delivered between all processes in the same threading group previously it has been blocked for s[ug]id processes.
This also should improve locking of the same file descriptor from different threads in programs running under linux compat layer.
PR: kern/72922 Reported by: Andriy Gapon <avg@icyb.net.ua> Idea suggested by: rwatson
show more ...
|
#
d9e97471 |
| 07-Feb-2005 |
John Baldwin <jhb@FreeBSD.org> |
Use the LCONVPATHEXIST() macro rather than it's exact expansion to be consistent.
|
#
610ecfe0 |
| 30-Jan-2005 |
Maxim Sobolev <sobomax@FreeBSD.org> |
o Split out kernel part of execve(2) syscall into two parts: one that copies arguments into the kernel space and one that operates completely in the kernel space;
o use kernel-only version of ex
o Split out kernel part of execve(2) syscall into two parts: one that copies arguments into the kernel space and one that operates completely in the kernel space;
o use kernel-only version of execve(2) to kill another stackgap in linuxlator/i386.
Obtained from: DragonFlyBSD (partially) MFC after: 2 weeks
show more ...
|
#
84569dff |
| 26-Jan-2005 |
Maxim Sobolev <sobomax@FreeBSD.org> |
o Move copyin()/copyout() out of i386_{get,set}_ldt() and i386_{get,set}_ioperm() and make those APIs visible in the kernel namespace;
o use i386_{get,set}_ldt() and i386_{get,set}_ioperm() instea
o Move copyin()/copyout() out of i386_{get,set}_ldt() and i386_{get,set}_ioperm() and make those APIs visible in the kernel namespace;
o use i386_{get,set}_ldt() and i386_{get,set}_ioperm() instead of sysarch() in the linuxlator, which allows to kill another two stackgaps.
MFC after: 2 weeks
show more ...
|
Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
1bc85c0d |
| 06-Sep-2004 |
Doug Rabson <dfr@FreeBSD.org> |
Add a few stub syscalls to get TransGaming's winex a bit closer to working.
|