1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00
serenity/Kernel
Andreas Kling f4f958f99f Kernel: Make DoubleBuffer use a KBuffer instead of kmalloc()ing
Background: DoubleBuffer is a handy buffer class in the kernel that
allows you to keep writing to it from the "outside" while the "inside"
reads from it. It's used for things like LocalSocket and TTY's.
Internally, it has a read buffer and a write buffer, but the two will
swap places when the read buffer is exhausted (by reading from it.)

Before this patch, it was internally implemented as two Vector<u8>
that we would swap between when the reader side had exhausted the data
in the read buffer. Now instead we preallocate a large KBuffer (64KB*2)
on DoubleBuffer construction and use that throughout its lifetime.

This removes all the kmalloc heap traffic caused by DoubleBuffers :^)
2020-01-20 16:08:49 +01:00
..
ACPI Kernel: Remove some unnecessary casts to uintptr_t 2020-01-20 13:13:03 +01:00
Arch/i386 Kernel: Remove some unnecessary casts to uintptr_t 2020-01-20 13:13:03 +01:00
Devices SB16: Map the DMA buffer in kernelspace so we can write to it 2020-01-20 13:13:03 +01:00
FileSystem Kernel: Make DoubleBuffer use a KBuffer instead of kmalloc()ing 2020-01-20 16:08:49 +01:00
Heap Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Net Kernel: Make DoubleBuffer use a KBuffer instead of kmalloc()ing 2020-01-20 16:08:49 +01:00
PCI Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
TTY Kernel: Make DoubleBuffer use a KBuffer instead of kmalloc()ing 2020-01-20 16:08:49 +01:00
VM Add AnonymousVMObject::create_with_physical_page() 2020-01-20 13:13:03 +01:00
.bochsrc Meta: Make Serenity run on Bochs once again 2019-08-06 21:09:24 +02:00
.gitignore Meta: Removed all gitignore in the source tree only keeping the root one 2019-06-30 10:41:26 +02:00
Assertions.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
build-gpt-image-grub.sh Build: Fix more bugs in the POSIX sh-ification of scripts 2019-11-03 13:11:43 +01:00
build-image-grub.sh Build: use $SUDO_[UG]ID in build-image-* instead of relying on makeall 2020-01-15 21:52:09 +01:00
build-image-qemu.sh Build: use $SUDO_[UG]ID in build-image-* instead of relying on makeall 2020-01-15 21:52:09 +01:00
build-root-filesystem.sh Base: Let's make home directories 700 to keep things private :^) 2020-01-09 21:57:52 +01:00
CMOS.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
CMOS.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Console.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Console.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
debug-kernel Debugging: Add kernel debugging support 2020-01-13 11:06:42 +01:00
DoubleBuffer.cpp Kernel: Make DoubleBuffer use a KBuffer instead of kmalloc()ing 2020-01-20 16:08:49 +01:00
DoubleBuffer.h Kernel: Make DoubleBuffer use a KBuffer instead of kmalloc()ing 2020-01-20 16:08:49 +01:00
FB.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
grub.cfg Kernel: Move DMI decoder initialization method to init_stage2 2020-01-14 15:38:58 +01:00
grub_gpt.cfg Kernel: Move DMI decoder initialization method to init_stage2 2020-01-14 15:38:58 +01:00
init.cpp Kernel: Clean up and reorganize init.cpp 2020-01-18 10:24:57 +01:00
IO.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
IRQHandler.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
IRQHandler.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KBuffer.h Kernel: Allow naming KBuffers 2020-01-20 14:00:11 +01:00
KBufferBuilder.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KBufferBuilder.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KernelInfoPage.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KeyCode.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KParams.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KParams.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
kprintf.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KResult.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
kstdio.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KSyms.cpp Kernel: Remove some unnecessary casts to uintptr_t 2020-01-20 13:13:03 +01:00
KSyms.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
linker.ld Kernel: Move kernel above the 3GB virtual address mark 2020-01-17 22:34:26 +01:00
Lock.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Lock.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
makeall.sh Build: use $SUDO_[UG]ID in build-image-* instead of relying on makeall 2020-01-15 21:52:09 +01:00
Makefile Kernel: Move kernel above the 3GB virtual address mark 2020-01-17 22:34:26 +01:00
mkmap.sh Kernel: Allow modules to link against anything in kernel.map :^) 2019-11-28 21:30:20 +01:00
Module.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
MousePacket.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Multiboot.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Process.cpp Kernel: Use the templated copy_to/from_user() in more places 2020-01-20 13:41:21 +01:00
Process.h Kernel: Add a 1-deep cache to Process::region_from_range() 2020-01-19 16:44:37 +01:00
ProcessTracer.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ProcessTracer.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Profiling.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Profiling.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Random.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Random.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
RTC.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
RTC.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
run run: Bump default RAM size from 128 MB to 256 MB 2020-01-15 23:14:20 +01:00
Scheduler.cpp Kernel: Stop flushing GDT/IDT registers all the time 2020-01-18 11:10:44 +01:00
Scheduler.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
SharedBuffer.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
SharedBuffer.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
StdLib.cpp Kernel: Assert that copy_to/from_user() are called with user addresses 2020-01-19 09:18:55 +01:00
StdLib.h Kernel: Assert that copy_to/from_user() are called with user addresses 2020-01-19 09:18:55 +01:00
sync.sh Meta: Allow sync.sh to be run from any directory 2020-01-06 10:43:00 +01:00
Syscall.cpp Kernel: Add fast-path for sys$gettid() 2020-01-19 17:32:05 +01:00
Syscall.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
TestModule.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Thread.cpp Kernel: Use the templated copy_to/from_user() in more places 2020-01-20 13:41:21 +01:00
Thread.h Kernel: Use the templated copy_to/from_user() in more places 2020-01-20 13:41:21 +01:00
TimerQueue.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
TimerQueue.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
UnixTypes.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
WaitQueue.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
WaitQueue.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00