Commit Graph

44 Commits

Author SHA1 Message Date
bjorn3 8ffe704e7a Remove yet another unnecessary change 2017-04-28 18:44:37 +02:00
bjorn3 4441b750cf Remove unnecessary change 2017-04-28 18:43:39 +02:00
bjorn3 c9fdc4beae Make it working 2017-04-28 18:42:33 +02:00
bjorn3 4c006bca48 Remove UserOrListHandle 2017-04-28 16:18:41 +02:00
bjorn3 80afcc8879 Implement listing all schemes using : scheme 2017-04-28 15:40:15 +02:00
Andrew Plaza 2fc4454f5e set PIT_TICKS to 0 in context::switch() 2017-04-25 16:59:14 -04:00
Andrew Plaza 5ba02ca940 Reset PIT_TICKS to 0 on context::switch, change condition for context::switch [irq]
Set the counter to 0 when context is to be switched in the PIT interrupt,
and change the condition for context switching from % 10 to >= 10.
2017-04-25 14:40:23 -04:00
Andrew Plaza 7127e14b5d Fix PIT Interrupt Not Context Switching [irq]
PIT interrupt should context switch or else all of redox crashes.
This will fix programs like the Snake game crashing all of Redox.
A global AtomicUSize counter was added, and a line to switch contexts
on every 10 PIT interrupts in irq.rs.
2017-04-24 22:07:32 -04:00
Jeremy Soller dd98bfec5c Fix typo in live scheme 2017-04-19 22:00:30 -06:00
Jeremy Soller efd64d55e1 Bug fixes for fcntl and o_cloexec
Add fcntl to schemes
Fix debug: hang
2017-04-19 21:56:09 -06:00
Jeremy Soller d036c667a1 Perform cloexec logic in kernel 2017-04-16 12:49:54 -06:00
Jeremy Soller ea1150cd9b Implement CLOEXEC for root scheme and initfs 2017-04-15 22:35:05 -06:00
Jeremy Soller 9d39317f95 Fix issue where ppid changes during child close 2017-04-15 20:29:08 -06:00
Jeremy Soller 66120cf201 Fix deallocation issues by ignoring deallocation on temporary page 2017-04-15 19:56:48 -06:00
Jeremy Soller 800e6c6de7 Free page tables during unmap, if empty 2017-04-15 19:22:17 -06:00
Jeremy Soller 1e8df4b905 Add sys:iostat 2017-04-15 09:58:03 -06:00
Jeremy Soller a38f32c735 Add path implementation to most kernel schemes 2017-04-15 09:50:02 -06:00
Jeremy Soller 7b5873e460 Allow allocation of larger sizes 2017-04-14 21:17:31 -06:00
Jeremy Soller b3a3caf191 Fix memmove 2017-04-14 21:07:02 -06:00
Jeremy Soller 6fef10bcb1 Merge branch 'master' of https://github.com/redox-os/kernel 2017-04-14 20:59:32 -06:00
Jeremy Soller a9d92df5fa Implement frame recycler 2017-04-14 20:59:27 -06:00
Jeremy Soller 903432f057 Fix issue with reusing temporary page frame 2017-04-14 20:59:01 -06:00
Jeremy Soller 7c1d5d8306 Disable SMP startup, fix issue with reusing trampoline frame 2017-04-14 20:58:23 -06:00
pi_pi3 5c1e619063 Avoid multiplication in memcpy family functions
Instead of multiplying everything by 8[/4], now addition is used. That
way code is prettier.
2017-04-14 14:51:04 +02:00
pi_pi3 c4fc76f844 A faster implementation of the memcpy family
The default implementation of the memcpy, memmove, memset and memcmp
functions in the kernel file `extern.rs` uses a naive implementation
by copying, assigning or comparing bytes ony by one. This can be slow.
This commit proposes a reimplementation of those functions by copying,
assigning or comparing in group of 8 bytes by using the u64 type and
its respective pointers instead of u8. Alternative version for 32-bit
architectures are also supplied for future compatibility with x86.
Both version first copy whatever they can with wide word types. The
tail, i.e. the final few bytes that do not fit in a dword or qword
are then copied byte by byte.

Here is a comparison of copying 64kiB (65536 bytes) on stack:

x86_64-unknown-linux-gnu: (64-bit)
       | naive (ns) | fast (ns) | speedup (x)
-------|------------|-----------|------------
memcpy |   204430   |   32994   |   ~6.20
memmove|   202540   |   33186   |   ~6.10
memset |   163391   |   23884   |   ~6.84
memcmp |   205663   |   34385   |   ~5.98

i686-unknown-linux-gnu: (32-bit)
       | naive (ns) | fast (ns) | speedup (x)
-------|------------|-----------|------------
memcpy |   206297   |   66858   |   ~3.09
memmove|   204576   |   70326   |   ~2.91
memset |   165599   |   50227   |   ~3.30
memcmp |   204262   |   70572   |   ~2.89

Copying on the heap behaves simmilarly.

All tests performed on Intel i5 6600K (4x4.2GHz),
ArchLinux Kernel 4.8.12-3 x86_64.
2017-04-14 14:37:32 +02:00
Jeremy Soller c4fb60f216 Implement script file support 2017-04-11 21:27:39 -06:00
Jeremy Soller e43f5dda81 Implement timeouts
Cleanup utf8 path error handling
2017-04-08 21:59:30 -06:00
Jeremy Soller b286e69c9d Fix shutdown by disabling APs 2017-04-07 21:49:32 -06:00
Jeremy Soller a7f35e14cc Cleanup debug scheme 2017-04-05 20:11:51 -06:00
Jeremy Soller 2087544ea7 Move all files to src 2017-04-03 21:47:01 -06:00
Jeremy Soller ff93e9cb82 Cleanup some 2017-04-03 21:16:50 -06:00
Jeremy Soller 906ef94ffd Fix bug with sleep - wake is not cleared after it occurs
Do not initialize waitcondition with capacity
2017-03-21 20:30:46 -06:00
Jeremy Soller 228cd79cd4 Refactor ACPI, implement poweroff correctly using the DSDT in ACPI 2017-03-19 16:45:19 -06:00
Konrad Lipner 5ccbd788f3 Remove hardcoded initfs folder
initfs folder should be specified in INITFS_FOLDER environment variable
As a result kernel module can be compiled on it's own.
2017-02-15 21:54:38 +01:00
Jeremy Soller b9793deb59 Disable secondary processors with hlt 2017-02-13 22:15:42 -07:00
Corentin Henry 4d2499e4d3 remove unused #[macro_use] 2017-01-24 11:14:12 -08:00
Jeremy Soller 35c2297724 Fix from @yoric - incorrect initialization of spin loop 2017-01-11 13:59:10 -07:00
Jeremy Soller ed69fac232 Allow memory: to be accessed in all namespaces 2017-01-10 09:59:30 -07:00
Jeremy Soller ba4588e84f Simplify path parsing 2017-01-10 09:22:59 -07:00
Jeremy Soller 433746e13c Move skipping to loop encompasing entire path 2017-01-10 09:19:02 -07:00
Kelvin Ly b0cafc1890 Correctly handle relative paths starting from the root directory 2017-01-07 08:00:16 -05:00
Kelvin Ly 046d8ac0c5 Fix typo and add functionality to more properly handle the parent of the root of the filesystem 2017-01-07 00:49:45 -05:00
Kelvin Ly fc94bd411a Allow for more complicated directory paths 2017-01-07 00:41:32 -05:00
Jeremy Soller 0c8ba636f4 Cleanup Redox repo, update Rust, remove old target 2017-01-03 15:55:00 -07:00