- 03 Jul, 2018 40 commits
-
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
This is the umpteenth incarnation of the McKusick allocator, aimed at replacing other allocators which have serious issues: - TLSF is fast but not that good when it comes to memory overhead with small sizes (i.e. < 512 bytes) on 64bit. - heapobj-pshared has decent overhead figures but may be insanely slow at deallocating blocks from large, hot heaps. - the Cobalt core allocator is even worse than heapobj-pshared in deallocating blocks, although the system heap should be generally small enough not to trigger the most pathological cases in practice, hopefully. Nevertheless, the performances are unacceptable. The original McKusick algorithm implements a quick fit allocation scheme, based on bucket management of ^2-sized chunks, which automatically switches to a page-based allocation method for blocks larger than twice the base page size. This variant maintains the free page list in AVL trees for fast lookups of multi-page memory ranges, and pages holding bucketed memory have a quick allocation bitmap to manage their blocks internally. The current implementation can replace TLSF for delivering process-local memory with similar performances but lesser overhead with small sizes. Most importantly, a kernel variant of HEAPMEM should replace the Cobalt core allocator. Likewise, heapobj-pshared which is beyond repair should be replaced with a process-shareable variant as well, assuming the average size and allocation patterns of real-time objects are similar in all contexts.
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Make the AVL tree usable in shared memory when AVL_SHARED is defined at build time, switching to offset-based memory references. Gilles published this code in July 2016 as part of his personal toolkit for hobby projects aka 'libchutils'.
-
Philippe Gerum authored
Some architectures may define a secondary system call range for internal operations, fix the consistency check not to warn about them.
-
This stresses the case of fast-path mutex acquire plus pthread_cond_wait with that mutex, which currently triggers a bug in xnsynch_release. Along this, drop the HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL conditional - libboilerplate takes care of that. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
We must not try to drop the prio ceiling in the kernel if it wasn't committed yet. That could easily happen when using a prio-ceiling mutex to wait on a cond-var. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Norbert Lange <norbert.lange@andritz.com>
-
Otherwise we first add the synch object to the new owner's boost list before we remove it from the old one's, corrupting the list. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
This triggers a bug in the PP implementation. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
Each rtnet device registered with the stack is represented by a node into /sys/devices/virtual/rtnet/. Setting the address of the real device probed by the kernel into the rtnet_device.sysbind field before calling rt_register_rtnetdev(), causes the "adapter" symlink to be installed in the newly created attribute directory, pointing at that device. e.g. static int probe_handler(struct pci_dev *pdev, const struct pci_device_id *ent) { ... rtdev->sysbind = &pdev->dev; ... ret = rt_register_rtnetdev(rtdev); ... } $ ls -l /sys/devices/virtual/rtnet/ total 0 drwxr-xr-x 2 root root 0 Mar 30 12:50 enp1s0 drwxr-xr-x 2 root root 0 Mar 30 12:50 rtlo $ ls -l /sys/devices/virtual/rtnet/enp1s0/ total 0 lrwxrwxrwx 1 root root 0 Mar 30 12:51 adapter -> ../../../pci0000:00/0000:00:13.0/0000:01:00.0 lrwxrwxrwx 1 root root 0 Mar 30 12:51 subsystem -> ../../../../class/rtnet -rw-r--r-- 1 root root 4096 Mar 30 12:50 uevent
-
Moving the definition out of the ifdef solves the following error: include/xenomai/cobalt/kernel/clock.h:260:16: error: ‘struct <anonymous>’ has no member named ‘adjust_time’ include/xenomai/cobalt/kernel/clock.h:263:19: error: ‘struct <anonymous>’ has no member named ‘adjust_time’ Signed-off-by:
Henning Schild <henning.schild@siemens.com>
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
CONFIG_X86_X32 used to depend on CONFIG_IA32_EMULATION. Since upstream commit #9b54050b, this is not the case anymore, and both options can be enabled separately. Remove the assumption about such dependency, fixing the build issue.
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Except for the short phase between thread_init and shadow_map, a thread is always identifiable via the pid of its Linux mate. Use this shorter value, which also correlates with what ftrace records anyway, instead of the pointer or the name. Report the full thread name only in prominent cases: init, resume and switch. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
All these are synchronous, and the thread context is already recorded by ftrace. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Matching numbers against syscall.h, specifically when the call is compat or x32, is tedious work. Fortunately, ftrace allows up to automate this. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Specifically useful to validate scheduling during PI or PP phases. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Adding PIDs and the state of the previous task will allow to track Xenomai task switches in kernelshark (so far via out-of-tree patches, upstream is planning for the necessary plugin concept). Moreover, reporting the current priority on context switch helps debugging unexpected or delayed context switches Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The code of cobalt_print_sched_params is carried into the format string in tracefs, and trace-cmd tries to make any sense out of it. While it can process simply statements, this code is too complex and will prevent the parsing. Convert it into a function. That still does not resolve the parsing issue of trace-cmd, but that can be addressed by a custom plugin which can then interpret this tracepoint. That wouldn't be possible with the broken format string. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
__print_symbolic already ensures that unknown policies are printed numerically. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-