Topics for Linux Plumbers Conference Unconference:
Friday September 15
Topic: Test driven development (TDD) in the kernel
Host(s): Knut Omang <knut.omang@oracle.com>
Description: Test driven development is a proven concept for user land
projects, and is as far as I have seen to some extent used for kernel development,
but is currently limited to what can be tested from user land, either via system call interfaces
or by creating mock environments to compile selected kernel code in user land.
Testing for instance kernel internal algorithms or usage of them, such as rbtrees, radix trees or sg lists cannot easily be
done this way. Also, once the test is in kernel code, there are some very interesting low hanging
opportunities such as for instance error injection and simple code coverage.
I'd like to demonstrate a tool I created for this purpose, and that we develop and use
internally in Oracle. It will be made available on Github for people to look at ahead of this
unconference. I submitted a talk proposal for this, but it did not reach up, but I modestly think
it is such a simple and good idea that I simply cannot wait yet another year without talking about it!
Topic: Support for adding DT based thermal zones at runtime
Host(s): Moritz Fischer <mdf@kernel.org>
Description: During a recent project I encountered an issue where I needed support for thermal
zones that get instantiated by a devicetree overlay. In our specific case we had temperature sensors
on a daughtercard that is swap-able. I haven't found a good solution on how to make the current
of-thermal code work with runtime added thermal-zones, (assumption is all thermal zones present at boot)
and was wondering if people have clever ideas.
Usecase: Daughter card (FPGA) is hotpluggable and exports thermal data using 13 sensoors with 2 Thermal Zones (TZ) each.
Overlay DT looks like a good idea because adding them all to DT means carrying all these thermal zones over.
The current DT implementaiton doesnt work, because the parsing code runs at __init and doesnt operate well with overlays
First attepmpt : of_populate_runtime_thermal_zones - adds a lot of duplicate code
The idea is to remove __init and rescan TZ on of_overlay_notify
Qualcomm has a working solution for virtual thermal zones that should be available soon. That may be a good option.
The DT overlay solution hasn't gathered much traction as yet. Can this be looked at?
Talk to Grant Likely about how feasible this is and is expected to be supported by frameworks, thermal framework in this case.
Per Grant: First thing is Be careful!
If there is a hook in thermal framework to go and look for if anything has changed.
Should thermal framework be a bus reprsenation in DT? - It might be ugly to define thermal in kernel as a bus.
I think there is enough hooks in place to get notified on reconfigure
The trick is to support cleanly reconfigure TZ in Thermal framework and there is notification already available in DT that can be hooked up easily
Topic: Soft Affinity for Workloads
Host(s): Rohit Jain <rohit.k.jain@oracle.com>
Description: For weak performance isolation with multi-tenancy for some applications
by allowing space partitioning of CPUs, there is a need for applications
to specify soft affinity to some CPUs. So that one "group" does not
interfere with other "groups", yet allow the group to occupy the full
set of CPUs when no one else is using it. Currently, CFS allows time
sharing of CPUs and sched_setaffinity allows for "hard" affinity (or
restricting CPUs to a given mask or set).
One solution could be to to add a new cpumask other than cpus_allowed
(which is used for "hard" affinity). Let's say cpus_preferred. And allow
an application to set a preference to a set of CPUs if it so desires.
Topic: Automated testing of LKML patches with Clang
Host(s): Nick Desaulniers <ndesaulniers@google.com/nick.desaulniers@gmail.com>
Description: It's useful to have bots automatically test proposed patches and notify authors when they
fail to compile in certain configurations. Currently for Clang, a few folks interested in supporting it email
authors when patches break things, but regression finding is currently not automated for Clang. I'd like to
pick some brains as to what is a smart way to automatically test proposed patches for a seemingly limitless
number of kernel configurations.
Topic: ktask: multithread cpu-intensive kernel work
Host(s): Daniel Jordan <daniel.m.jordan@oracle.com>
Description: As memory size and CPU counts increase on the largest systems, certain paths in the kernel that are single-threaded today are not scaling well and will become even bigger bottlenecks in the future. Examples include zeroing the biggest huge pages (e.g. 1G on x86), walking a process’s entire page table, and freeing large ranges of pages.
These paths have been well optimized in one thread, so now it's a matter of scaling up the CPUs to match the amount of work to be done.
One solution to this problem is ktask, a generic framework built on top of workqueues that takes care of splitting up a large task, starting a number of threads appropriate for the size of the task and the system, and load balancing the work between these threads. ktask uses internal limits to maintain an appropriate level of concurrency across the system.
I want to get feedback on the overall approach and discuss similar scalability issues others are having in the kernel.
Notes: Oracle has lots of big iron boxes with hundreds to thousands of CPUs. Certain Linux work doesn't scale to these boxes. Big scalability problem is single threaded page freeing on task exit. Also usable for initial page table setup, which is single threaded as well. Ktask has two API calls: ktask_run() and ktask_run_numa(). API can set up a bunch of threads and iterate through them. Example benchmarks with fallocate: can speed up 10x with 16 threads on a 288 CPU system with 1TB. Speed up occurs because single CPU cannot saturate the memory bus. API can automatically size number of threads based on heuristics. Have been other attempts to multi-thread some kernel allocation tasks (Aaron Lu) but that was a specific instance not a generic framework. Several upstream objections: workload disturbance, energy efficiency (probably red herring since same amount of energy is consumed, just consumed faster). Cgroup problem (cgroups don't currently charge for kernel threads; could fix by adding a charge for the cpu consumed in the ktask framework on behalf of the cgroup).
Topic:Platform Management on Heterogeneous multicore systems
Host: Davorin Mista
Notes: Platform based on Cortex a53 and cortex r5. Platform management is power, thermal, security etc. Heterogeneous systems can't rely on OS control if there's >1 OS running (Think Linux running on a53 but RTOS running on r5 cores). Often use case (defence) is RTOS controls secure world and mission critical tasks and Linux controls UI and data processing => cannot have Linux be the master OS and will be the slave in most cases.
Topic: Restartable Sequences interaction with debugger single-stepping
Host(s): Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Description: When presented last year, the main issue that was remaining with restartable sequences was related to forward progress guaranteesandd interaction with debugger single-stepping. It would be good to gather feedback on the actual requirements and figure out what are the acceptable/unacceptable approaches to tackle them. (this discussion should not conflict with the Tracing track on Friday afternoon)
Topic:
Host(s): <person who will host the discussion>
Description: <describe problem you want to talk about>
Topic: <something short>
Host(s): <person who will host the discussion>
Description: <describe problem you want to talk about>