Age | Commit message (Collapse) | Author |
|
Ignore packets that are too small, or not as large as they claim to be.
|
|
- IPv4SocketHandle => SocketHandle<IPv4Socket>
- TCPSocketHandle => SocketHandle<TCPSocket>
- UDPSocketHandle => SocketHandle<UDPSocket>
|
|
|
|
|
|
|
|
|
|
|
|
This fetches info from /proc/netadapters and /proc/net_tcp, updating
every second. Very cool. :^)
|
|
This makes it easier to decide on a good initial width for a column.
|
|
After a while, the kmalloc/kfree counts got too wide for the label.
|
|
This replaces Optional<T>(U&&) which clang-tidy complained may hide the
regular copy and move constructors. That's a good point, clang-tidy,
and I appreciate you pointing that out!
|
|
|
|
|
|
|
|
|
|
|
|
This makes it possible to iterate over these with range-for. :^)
|
|
Yet more of this same thing. Each one of these patches has a small but
noticeable impact on the steady-state kmalloc numbers. :^)
|
|
Remove the global hash tables and replace them with InlineLinkedLists.
This significantly reduces the kernel heap pressure from doing many
small mmap()'s.
|
|
Using a HashTable to track "all instances of Foo" is only useful if we
actually need to look up entries by some kind of index. And since they
are HashTable (not HashMap), the pointer *is* the index.
Since we have the pointer, we can just use it directly. Duh.
This increase sizeof(VMObject) by two pointers, but removes a global
table that had an entry for every VMObject, where the cost was higher.
It also avoids all the general hash tabling business when creating or
destroying VMObjects. Generally we should do more of this. :^)
|
|
|
|
This is a very simple version of the nc (netcat) command. It only
supports outgoing TCP connections, and has no options aside from the
target host and port.
|
|
This is comprised of five small changes:
* Keep a counter for tx/rx packets/bytes per TCP socket
* Keep a counter for tx/rx packets/bytes per network adapter
* Expose that data in /proc/net_tcp and /proc/netadapters
* Convert /proc/netadapters to JSON
* Fix up ifconfig to read the JSON from netadapters
|
|
|
|
This was not actually used and just sitting there being confusing.
|
|
When assigning properties, we were relying on the JSON serialization
code to wrap strings in double-quotes ("). JsonValue::to_string() does
not wrap string values, so what we want here is serialized(). :^)
|
|
This broke due to a change in JsonValue API. JsonValue::to_string() now
returns the value serialized to a string, which may become "undefined".
You kinda want JsonValue::as_string(), but that is only callable when
the JsonValue *is* a string. Thankfully there is now as_string_or(alt).
|
|
Return the contained string if the value *is* a string, otherwise it
returns the alternative string passed in the parameter.
|
|
We were only doing this in Process::deallocate_region(), which meant
that kernel-only Regions never gave back their VM.
With this patch, we can start reusing freed-up address space! :^)
|
|
This is not perfect as it uses a lot of VM, but since the buffers are
supposed to be temporary it's not super terrible.
This could be improved by giving back the unused VM to the kernel's
RangeAllocator after finishing the buffer building.
|
|
This makes it possible to use something other than a StringBuilder for
serialization (and to produce something other than a String.) :^)
|
|
Just to make sure that things are on the up-and-up.
|
|
Each Function is a heap allocation, so let's make an effort to avoid
doing that during scheduling. Because of header dependencies, I had to
put the runnables iteration helpers in Thread.h, which is a bit meh but
at least this cuts out all the kmalloc() traffic in pick_next().
|
|
|
|
If kmalloc backtraces are enabled during backtracing, things don't go
super well when the backtrace code calls kmalloc()..
With this fixed, it's basically possible to get all kmalloc backtraces
on the debugger by running (as root):
sysctl kmalloc_stacks=1
|
|
This makes VMObject 8 bytes smaller since we can use the array size as
the page count.
The size() is now also computed from the page count instead of being
a separate value. This makes sizes always be a multiple of PAGE_SIZE,
which is sane.
|
|
This is a simple array wrapper that knows its size. It has begin/end
so you can use range-for. It also has a resize() that reallocates.
|
|
InodeVMObject is a VMObject with an underlying Inode in the filesystem.
AnonymousVMObject has no Inode.
I'm happy that InodeVMObject::inode() can now return Inode& instead of
VMObject::inode() return Inode*. :^)
|
|
This wasn't really thought-through, I was just trying anything to see
if it would make WindowServer faster. This doesn't seem to make much of
a difference either way, so let's just not do it for now.
It's easy to bring back if we think we need it in the future.
|
|
The VMObject name was always either the owning region's name, or the
absolute path of the underlying inode.
We can reconstitute this information if wanted, no need to keep copies
of these strings around.
|
|
|
|
Make more Vector-of-trivial-type operations go fast :^)
|
|
|
|
This allows us to take advantage of the now-optimized (to do memmove())
Vector::append(const T*, int count) for collecting these strings.
This is a ~15% speedup on the load_4chan_catalog benchmark.
|
|
This can definitely be improved with better trivial type detection and
by using the TypedTransfer template in more places.
It's a bit annoying that we can't get <type_traits> in Vector.h since
it's included in the toolchain compilation before we have libstdc++.
|
|
This class needs to be fixed up to not hide the read()/write() virtuals
at some point.
|
|
Our protocol says we have to call has_value() before release_value().
The code was already safe, but the compiler had no way of knowing that.
|
|
It's now possible to run Serenity inside Bochs by executing "./run b"
Note that it only works with a GRUB image (i.e ./build-image-grub.sh)
|
|
This is showing up at the boundary between kernel and userspace stack
frames in backtraces, and looks silly.
|
|
This class works by eagerly allocating 1MB of virtual memory but only
adding physical pages on demand. In other words, when you append to it,
its memory usage will increase by 1 page whenever you append across a
page boundary (4KB.)
|