SlideShare a Scribd company logo
1 of 32
Download to read offline
Internet of Tiny Linux (IoTL): Episode IV
Nicolas Pitre
<nico@linaro.org>
2017-09-25
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
1 sur 32 2017-10-04 à 09:20
Nicolas Pitre
This is a discussion on various methods, from low hanging fruits to more daring approaches, being put forward to reduce the size of Linux kernel and user space binaries to make them suitable for very small
IoT applications. Latest results in terms of effectiveness and upstream acceptance will be discussed.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
2 sur 32 2017-10-04 à 09:20
"Internet of Things" (IoT)
Internet of Tiny Linux (IoTL)
Goals
Ubiquitous and Low Cost
Reliable and Easy to Use
Secure and Field-Upgradable
Pick two!
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
3 sur 32 2017-10-04 à 09:20
"Internet of Things" (IoT)
Internet of Tiny Linux (IoTL)
Solutions
Avoid custom base software
Leverage the Open Source community
Gather critical mass around common infrastructure
Share the cost of non-differentiating development
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
4 sur 32 2017-10-04 à 09:20
"Internet of Things" (IoT)
Internet of Tiny Linux (IoTL)
Linux is a logical choice
Large community of developers
Best looked-after network stack
Extensive storage options
Already widely used in embedded setups
Etc.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
5 sur 32 2017-10-04 à 09:20
"Internet of Things" (IoT)
Internet of Tiny Linux (IoTL)
The Linux kernel is a logical choice… BUT
it is featureful → Bloat
its default tuning is for high-end systems
the emphasis is on scaling up more than scaling down
is the largest component in most Linux-based embedded systems
Linux Kernel Size Reduction is part of the solution
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
6 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
REducing the code size
Automatic size reduction techniques:
Linker Section Garbage Collection (-gc-sections
Link Time Optimization (LTO)
Manual size reduction techniques:
Extra kernel configuration options
Alternative code implementations
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
7 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
Subsystem specific trimming
Already Done (few examples):
Compile out block device support.
Compile out NTP support.
Compile out support for capabilities (only root is granted permission).
Compile out support for non-root users and groups.
Compile out printk() and related strings.
Etc.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
8 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
Let’s remove POSIX timers
CONFIG_POSIX_TIMERS=y
text data bss dec hex filename
36516 2956 3912 43384 a978 ./kernel/time/built-in.o
CONFIG_POSIX_TIMERS=n
text data bss dec hex filename
27329 2884 1200 31413 7ab5 ./kernel/time/built-in.o
28% size reduction on the whole time subsystem.
Available in Linux v4.10.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
9 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
Let’s remove PI futexes
CONFIG_FUTEX_PI=y
$ size kernel/futex.o
text data bss dec hex filename
7174 19 0 7193 1c19 kernel/futex.o
CONFIG_FUTEX_PI=n
$ size kernel/futex.o
text data bss dec hex filename
3484 17 0 3501 dad kernel/futex.o
51% size reduction.
Merged in Linux v4.14-rc1.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
10 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
The SLOB of schedulers: nanosched
$ make tinyconfig && make kernel/sched/
$ size kernel/sched/built-in.o
text data bss dec hex filename
20325 1308 120 21753 54f9 kernel/sched/built-in.o
$ echo CONFIG_SCHED_NANO=y >> .config
$ make kernel/sched/
$ size kernel/sched/built-in.o
text data bss dec hex filename
9853 324 208 10385 2891 kernel/sched/built-in.o
What are the chances for inclusion into the mainline kernel tree?
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
11 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
Mmake the deadline scheduler class configurable
A much smaller patch with the preliminary work already merged upstream.
Before:
$ size -t kernel/sched/built-in.o
text data bss dec hex filename
[...]
22661 3372 116 26149 6625 (TOTALS)
With CONFIG_SCHED_DL=n:
$ size -t kernel/sched/built-in.o
text data bss dec hex filename
[...]
17601 3308 100 21009 5211 (TOTALS)
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
12 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
Mmake the realtime scheduler class configurable
Before:
text data bss dec hex filename
22661 3372 116 26149 6625 (TOTALS)
With CONFIG_SCHED_DL=n:
text data bss dec hex filename
17601 3308 100 21009 5211 (TOTALS)
With CONFIG_SCHED_DL=n && CONFIG_SCHED_RT=n:
text data bss dec hex filename
15149 3276 28 18453 4815 (TOTALS)
Patches available here:
http://git.linaro.org/people/nicolas.pitre/linux.git optional_sched_classes
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
13 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
Upstream maintainer acceptance
But you can prove me wrong: show me a Linux kernel for a real device that fits into 32KB of RAM (or even 256 KB) and then I’ll consider the cost/benefit equation.
Until that happens I consider most forms of additional complexity on the non-hardware dependent side of the kernel a net negative.
June 11th 2017
— Ingo Molnar
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
14 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
Let’s pick a real hardware target
STM32F469 Discovery kit
STM32F469NI MCU (ARM Cortex-M4)
16MB SDRAM
16MB Quad-SPI NOR Flash
Already accommodates embedded Linux comfortably.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
15 sur 32 2017-10-04 à 09:20
Reducing the Linux Kernel Size
Internet of Tiny Linux (IoTL)
The Ultimate Goal
STM32F469NI MCU
BGA216 package
ARM Cortex-M4 core
2 Mbytes of Flash
324 Kbytes of RAM
Ought to run Linux on its own.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
16 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Change of strategy
Shrink the kernel "size" by eXecuting it In Place from Flash (XIP)
Do XIP of user space as well
Concentrate efforts on data size reduction rather than code reduction
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
17 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Kernel XIP
Already available !
Improved it by storing kernel .data compressed into Flash
Patches available here:
http://git.linaro.org/people/nicolas.pitre/linux.git xip_zdata
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
18 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
User Space XIP requirements
Executable binary format allowing independent code and data access
BFLT Binary Flat Format:
very lightweight
poorly documented
requires ad hoc tools
shared library support is a hack
FDPIC ELF:
designed for split segments from the start
can be inspected with standard ELF tools
supports dynamic libraries
Patches available here:
http://git.linaro.org/people/nicolas.pitre/linux.git fdpic
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
19 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
User Space XIP requirements
File system driver allowing direct Flash mappings
I chose cramfs because:
it is lightweight
easy to add direct ROM access
may dispense with the block layer
very low memory usage
For XIP support I added:
the possibility to not compress some data blocks
the ability to locate data blocks arbitrarily for alignment purposes
automatic mapping from ROM whenever possible when mmap() is used
The mkcramfs tool knows how to locate ELF read-only segments in a file and mark them for XIP while still compressing writable data segments to be loaded into RAM.
Patches available here:
http://git.linaro.org/people/nicolas.pitre/linux.git xipcramfs
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
20 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
still large RAM kernel footprint
$ size vmlinux
text data bss dec hex filename
957220 79744 53940 1090904 10a558 vmlinux
The text segment is executed from ROM but data and bss are loaded into RAM.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
21 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
My symsize script
#!/bin/sh
{
read addr1 type1 sym1
while read addr2 type2 sym2; do
size=$((0x$addr2 - 0x$addr1))
case $type1 in
b|B|d|D)
echo -e "$type1 $sizet$sym1"
;;
esac
type1=$type2
addr1=$addr2
sym1=$sym2
done
} < System.map | sort -n -r -k 2
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
22 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
symsize output
b 16384 __log_buf
D 8192 init_thread_union
d 4288 timer_bases
b 4108 in_lookup_hashtable
b 4096 ucounts_hashtable
d 3760 cpuhp_ap_states
D 2048 tasklist_lock
d 2048 page_wait_table
d 1296 init_sighand
D 1072 runqueues
[...]
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
23 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Static memory usage reduction
arch/arm/include/asm/thread_info.h
-#define THREAD_SIZE_ORDER 1
+#define THREAD_SIZE_ORDER 0
fs/dcache.c
-#define IN_LOOKUP_SHIFT 10
+#define IN_LOOKUP_SHIFT 5
kernel/time/timer.c
-#define LVL_BITS 6
+#define LVL_BITS 4
kernel/ucount.c
-#define UCOUNTS_HASHTABLE_BITS 10
+#define UCOUNTS_HASHTABLE_BITS 5
and so on.i.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
24 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Static memory usage reduction
Result:
text data bss dec hex filename
947884 64424 31964 1044272 fef30 vmlinux
data reduction: 15320 bytes
bss reduction: 21976 bytes
Total reduction: 37296 bytes (28%)
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
25 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Runtime memory usage reduction
Time to boot the board:
Booting Linux on physical CPU 0x0
Linux version 4.13.0-00061-ga90f1ee20e-dirty (nico@xanadu.home) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #468 Mon Sep 18 23:30:43 EDT 2017
CPU: ARMv7-M [410fc241] revision 1 (ARMv7M), cr=00000000
OF: fdt: Machine model: STMicroelectronics STM32F469i-DISCO board
[...]
On node 0 totalpages: 4096
Normal zone: 32 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 4096 pages, LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[...]
Memory: 16064K/16384K available (663K kernel code, 51K rwdata, 232K rodata, 44K init, 29K bss, 320K reserved, 0K cma-reserved)
80 unreleased memblock pages
32 pages for memmap! (time to shrink memory)
8 pages for pcpu-alloc
13 pages for rwdata
11 pages of initdata
Where are the missing 16 pages?
Answer: At least 13 are taken by unflatten_and_copy_device_tree().
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
26 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Runtime memory usage reduction
Tweak workqueue allocation to shrink its per-cpu memory usage
Reduce the per-cpu memory pool from 8 pages to only one
Reduce available RAM from 16MB to 800KB
Shrinks mem_map from 32 to 2 pages
What to do with the unflatten device tree?
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
27 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Runtime memory usage reduction
What about initcalls?
init/main.c
+ pages = global_node_page_state(NR_SLAB_UNRECLAIMABLE);
if (initcall_debug)
ret = do_one_initcall_debug(fn);
else
ret = fn();
+ pages = global_node_page_state(NR_SLAB_UNRECLAIMABLE) - pages;
+ if (pages)
+ printk("memory: %d pages allocated by initcall %pfn", pages, fn);
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
28 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Runtime memory usage reduction
What about initcalls?
Result:
2 pages allocated by spawn_ksoftirqd
2 pages allocated by regulator_init
1 pages allocated by stm32f469_pinctrl_init
11 pages allocated by of_platform_default_populate_init
1 pages allocated by topology_init
1 pages allocated by init_pipe_fs
1 pages allocated by proc_loadavg_init
1 pages allocated by chr_dev_init
1 pages allocated by kswapd_init
1 pages allocated by stm32_timers_driver_init
1 pages allocated by stm32_rtc_driver_init
1 pages allocated by i2c_dev_init
1 pages allocated by pm_qos_power_init
25 total pages allocated from initcalls.
But… 11 pages for of_platform_default_populate_init() !?
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
29 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Runtime memory usage reduction
A view from user space:
/ # dmesg | grep Memory
Memory: 628K/800K available [...]
/ # free
total used free shared buffers cached
Mem: 640 496 144 0 0 24
-/+ buffers/cache: 472 168
/ # cat /proc/meminfo
MemTotal: 640 kB
MemFree: 136 kB
MemAvailable: 136 kB
Cached: 24 kB
MmapCopy: 84 kB
KernelStack: 60 kB
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
30 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Runtime memory usage reduction
Memory distribution:
140 KB used by Device Tree data
96 KB from unflatten_and_copy_device_tree()
44 KB from of_platform_default_populate_init()
84 KB used by user space tasks
2 tasks
16 KB stack (2 x 8 KB)
68 KB data
64 KB kernel data
52 KB .data
8 KB .bss
56 KB initcalls
besides of_platform_default_populate_init()
60 KB kernel stacks
13 kernel threads
2 user tasks
A few KB’s from memblock_alloc
168 KB available memory
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
31 sur 32 2017-10-04 à 09:20
Reducing RAM usage
Internet of Tiny Linux (IoTL)
Conclusion:
Shrinking data usage is easier than reducing code size
Current solution is still incomplete
Lots of memory is still unaccounted for and must be tracked
Leveraging the kmemleak infrastructure should be investigated
Device Tree data is a big memory hog
Still not ready for the STM32F469NI’s 324 KB of internal RAM but getting closer.
Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1)
32 sur 32 2017-10-04 à 09:20

More Related Content

What's hot

SGX Trusted Execution Environment
SGX Trusted Execution EnvironmentSGX Trusted Execution Environment
SGX Trusted Execution EnvironmentKernel TLV
 
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systemsClaudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systemslinuxlab_conf
 
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesBUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesLinaro
 
BUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoCBUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoCLinaro
 
BUD17-400: Secure Data Path with OPTEE
BUD17-400: Secure Data Path with OPTEE BUD17-400: Secure Data Path with OPTEE
BUD17-400: Secure Data Path with OPTEE Linaro
 
Alessio Lama - Development and testing of a safety network protocol
Alessio Lama - Development and testing of a safety network protocolAlessio Lama - Development and testing of a safety network protocol
Alessio Lama - Development and testing of a safety network protocollinuxlab_conf
 
BKK16-500K2 CTO talk - The End to End Story
BKK16-500K2 CTO talk - The End to End StoryBKK16-500K2 CTO talk - The End to End Story
BKK16-500K2 CTO talk - The End to End StoryLinaro
 
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and ProgressBKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and ProgressLinaro
 
Mirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in GoMirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in Golinuxlab_conf
 
LAS16-300K2: Geoff Thorpe - IoT Zephyr
LAS16-300K2: Geoff Thorpe - IoT ZephyrLAS16-300K2: Geoff Thorpe - IoT Zephyr
LAS16-300K2: Geoff Thorpe - IoT ZephyrShovan Sargunam
 
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...linuxlab_conf
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205Linaro
 
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.LAS16-407: Internet of Tiny Linux (IoTL): the sequel.
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.Linaro
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Linaro
 
Andrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitAndrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitlinuxlab_conf
 
P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304Linaro
 
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLinaro
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageKernel TLV
 
Using VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear ContainersUsing VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear ContainersMichelle Holley
 

What's hot (20)

SGX Trusted Execution Environment
SGX Trusted Execution EnvironmentSGX Trusted Execution Environment
SGX Trusted Execution Environment
 
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systemsClaudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
 
Secure IoT Firmware for RISC-V
Secure IoT Firmware for RISC-VSecure IoT Firmware for RISC-V
Secure IoT Firmware for RISC-V
 
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesBUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
 
BUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoCBUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoC
 
BUD17-400: Secure Data Path with OPTEE
BUD17-400: Secure Data Path with OPTEE BUD17-400: Secure Data Path with OPTEE
BUD17-400: Secure Data Path with OPTEE
 
Alessio Lama - Development and testing of a safety network protocol
Alessio Lama - Development and testing of a safety network protocolAlessio Lama - Development and testing of a safety network protocol
Alessio Lama - Development and testing of a safety network protocol
 
BKK16-500K2 CTO talk - The End to End Story
BKK16-500K2 CTO talk - The End to End StoryBKK16-500K2 CTO talk - The End to End Story
BKK16-500K2 CTO talk - The End to End Story
 
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and ProgressBKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
 
Mirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in GoMirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in Go
 
LAS16-300K2: Geoff Thorpe - IoT Zephyr
LAS16-300K2: Geoff Thorpe - IoT ZephyrLAS16-300K2: Geoff Thorpe - IoT Zephyr
LAS16-300K2: Geoff Thorpe - IoT Zephyr
 
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
Luca Cipriani - Control your Embedded Linux remotely by using MQTT and a web ...
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205
 
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.LAS16-407: Internet of Tiny Linux (IoTL): the sequel.
LAS16-407: Internet of Tiny Linux (IoTL): the sequel.
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
Andrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitAndrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profit
 
P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304
 
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 
Using VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear ContainersUsing VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear Containers
 

Similar to Internet of Tiny Linux (IoTL): Episode IV - SFO17-100

SFO15-BFO2: Reducing the arm linux kernel size without losing your mind
SFO15-BFO2: Reducing the arm linux kernel size without losing your mindSFO15-BFO2: Reducing the arm linux kernel size without losing your mind
SFO15-BFO2: Reducing the arm linux kernel size without losing your mindLinaro
 
Linaro and Android Kernel
Linaro and Android KernelLinaro and Android Kernel
Linaro and Android KernelJohn Lee
 
Introduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoTIntroduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoTCanonical
 
Introduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoTIntroduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoTAmrisha Prashar
 
2014_DPDK_slides.pdf
2014_DPDK_slides.pdf2014_DPDK_slides.pdf
2014_DPDK_slides.pdfeceschmidt
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Hajime Tazaki
 
Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and BeyondDavid Evans
 
An introduction to_ns_nam_and_o_tcl_scripting
An introduction to_ns_nam_and_o_tcl_scriptingAn introduction to_ns_nam_and_o_tcl_scripting
An introduction to_ns_nam_and_o_tcl_scriptingDani Aristiyawan
 
Modern IoT and Embedded Linux Deployment - Berlin
Modern IoT and Embedded Linux Deployment - BerlinModern IoT and Embedded Linux Deployment - Berlin
Modern IoT and Embedded Linux Deployment - BerlinDjalal Harouni
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsChristian Charreyre
 
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at KiratechMoby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at KiratechKiratech
 
TDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux EmbarcadoTDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux Embarcadotdc-globalcode
 
Containerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcementsContainerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcementsKiratech
 
Making Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDKMaking Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDKMichelle Holley
 
Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introductionrinnocente
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux MultimediaCaglar Dursun
 
Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...SZ Lin
 

Similar to Internet of Tiny Linux (IoTL): Episode IV - SFO17-100 (20)

SFO15-BFO2: Reducing the arm linux kernel size without losing your mind
SFO15-BFO2: Reducing the arm linux kernel size without losing your mindSFO15-BFO2: Reducing the arm linux kernel size without losing your mind
SFO15-BFO2: Reducing the arm linux kernel size without losing your mind
 
Linaro and Android Kernel
Linaro and Android KernelLinaro and Android Kernel
Linaro and Android Kernel
 
Introduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoTIntroduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoT
 
Introduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoTIntroduction to Ubuntu core, Ubuntu for IoT
Introduction to Ubuntu core, Ubuntu for IoT
 
2014_DPDK_slides.pdf
2014_DPDK_slides.pdf2014_DPDK_slides.pdf
2014_DPDK_slides.pdf
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
 
Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and Beyond
 
An introduction to_ns_nam_and_o_tcl_scripting
An introduction to_ns_nam_and_o_tcl_scriptingAn introduction to_ns_nam_and_o_tcl_scripting
An introduction to_ns_nam_and_o_tcl_scripting
 
Modern IoT and Embedded Linux Deployment - Berlin
Modern IoT and Embedded Linux Deployment - BerlinModern IoT and Embedded Linux Deployment - Berlin
Modern IoT and Embedded Linux Deployment - Berlin
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projects
 
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at KiratechMoby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
 
TDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux EmbarcadoTDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux Embarcado
 
Containerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcementsContainerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcements
 
Making Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDKMaking Networking Apps Scream on Windows with DPDK
Making Networking Apps Scream on Windows with DPDK
 
Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introduction
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux Multimedia
 
Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...
 
Interview Questions
Interview QuestionsInterview Questions
Interview Questions
 
Linux vs windows
Linux vs windowsLinux vs windows
Linux vs windows
 
1256.ppt
1256.ppt1256.ppt
1256.ppt
 

More from Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloLinaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaLinaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraLinaro
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaLinaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 

More from Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Recently uploaded

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 

Recently uploaded (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 

Internet of Tiny Linux (IoTL): Episode IV - SFO17-100

  • 1. Internet of Tiny Linux (IoTL): Episode IV Nicolas Pitre <nico@linaro.org> 2017-09-25 Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 1 sur 32 2017-10-04 à 09:20
  • 2. Nicolas Pitre This is a discussion on various methods, from low hanging fruits to more daring approaches, being put forward to reduce the size of Linux kernel and user space binaries to make them suitable for very small IoT applications. Latest results in terms of effectiveness and upstream acceptance will be discussed. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 2 sur 32 2017-10-04 à 09:20
  • 3. "Internet of Things" (IoT) Internet of Tiny Linux (IoTL) Goals Ubiquitous and Low Cost Reliable and Easy to Use Secure and Field-Upgradable Pick two! Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 3 sur 32 2017-10-04 à 09:20
  • 4. "Internet of Things" (IoT) Internet of Tiny Linux (IoTL) Solutions Avoid custom base software Leverage the Open Source community Gather critical mass around common infrastructure Share the cost of non-differentiating development Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 4 sur 32 2017-10-04 à 09:20
  • 5. "Internet of Things" (IoT) Internet of Tiny Linux (IoTL) Linux is a logical choice Large community of developers Best looked-after network stack Extensive storage options Already widely used in embedded setups Etc. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 5 sur 32 2017-10-04 à 09:20
  • 6. "Internet of Things" (IoT) Internet of Tiny Linux (IoTL) The Linux kernel is a logical choice… BUT it is featureful → Bloat its default tuning is for high-end systems the emphasis is on scaling up more than scaling down is the largest component in most Linux-based embedded systems Linux Kernel Size Reduction is part of the solution Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 6 sur 32 2017-10-04 à 09:20
  • 7. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) REducing the code size Automatic size reduction techniques: Linker Section Garbage Collection (-gc-sections Link Time Optimization (LTO) Manual size reduction techniques: Extra kernel configuration options Alternative code implementations Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 7 sur 32 2017-10-04 à 09:20
  • 8. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) Subsystem specific trimming Already Done (few examples): Compile out block device support. Compile out NTP support. Compile out support for capabilities (only root is granted permission). Compile out support for non-root users and groups. Compile out printk() and related strings. Etc. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 8 sur 32 2017-10-04 à 09:20
  • 9. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) Let’s remove POSIX timers CONFIG_POSIX_TIMERS=y text data bss dec hex filename 36516 2956 3912 43384 a978 ./kernel/time/built-in.o CONFIG_POSIX_TIMERS=n text data bss dec hex filename 27329 2884 1200 31413 7ab5 ./kernel/time/built-in.o 28% size reduction on the whole time subsystem. Available in Linux v4.10. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 9 sur 32 2017-10-04 à 09:20
  • 10. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) Let’s remove PI futexes CONFIG_FUTEX_PI=y $ size kernel/futex.o text data bss dec hex filename 7174 19 0 7193 1c19 kernel/futex.o CONFIG_FUTEX_PI=n $ size kernel/futex.o text data bss dec hex filename 3484 17 0 3501 dad kernel/futex.o 51% size reduction. Merged in Linux v4.14-rc1. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 10 sur 32 2017-10-04 à 09:20
  • 11. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) The SLOB of schedulers: nanosched $ make tinyconfig && make kernel/sched/ $ size kernel/sched/built-in.o text data bss dec hex filename 20325 1308 120 21753 54f9 kernel/sched/built-in.o $ echo CONFIG_SCHED_NANO=y >> .config $ make kernel/sched/ $ size kernel/sched/built-in.o text data bss dec hex filename 9853 324 208 10385 2891 kernel/sched/built-in.o What are the chances for inclusion into the mainline kernel tree? Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 11 sur 32 2017-10-04 à 09:20
  • 12. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) Mmake the deadline scheduler class configurable A much smaller patch with the preliminary work already merged upstream. Before: $ size -t kernel/sched/built-in.o text data bss dec hex filename [...] 22661 3372 116 26149 6625 (TOTALS) With CONFIG_SCHED_DL=n: $ size -t kernel/sched/built-in.o text data bss dec hex filename [...] 17601 3308 100 21009 5211 (TOTALS) Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 12 sur 32 2017-10-04 à 09:20
  • 13. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) Mmake the realtime scheduler class configurable Before: text data bss dec hex filename 22661 3372 116 26149 6625 (TOTALS) With CONFIG_SCHED_DL=n: text data bss dec hex filename 17601 3308 100 21009 5211 (TOTALS) With CONFIG_SCHED_DL=n && CONFIG_SCHED_RT=n: text data bss dec hex filename 15149 3276 28 18453 4815 (TOTALS) Patches available here: http://git.linaro.org/people/nicolas.pitre/linux.git optional_sched_classes Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 13 sur 32 2017-10-04 à 09:20
  • 14. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) Upstream maintainer acceptance But you can prove me wrong: show me a Linux kernel for a real device that fits into 32KB of RAM (or even 256 KB) and then I’ll consider the cost/benefit equation. Until that happens I consider most forms of additional complexity on the non-hardware dependent side of the kernel a net negative. June 11th 2017 — Ingo Molnar Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 14 sur 32 2017-10-04 à 09:20
  • 15. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) Let’s pick a real hardware target STM32F469 Discovery kit STM32F469NI MCU (ARM Cortex-M4) 16MB SDRAM 16MB Quad-SPI NOR Flash Already accommodates embedded Linux comfortably. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 15 sur 32 2017-10-04 à 09:20
  • 16. Reducing the Linux Kernel Size Internet of Tiny Linux (IoTL) The Ultimate Goal STM32F469NI MCU BGA216 package ARM Cortex-M4 core 2 Mbytes of Flash 324 Kbytes of RAM Ought to run Linux on its own. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 16 sur 32 2017-10-04 à 09:20
  • 17. Reducing RAM usage Internet of Tiny Linux (IoTL) Change of strategy Shrink the kernel "size" by eXecuting it In Place from Flash (XIP) Do XIP of user space as well Concentrate efforts on data size reduction rather than code reduction Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 17 sur 32 2017-10-04 à 09:20
  • 18. Reducing RAM usage Internet of Tiny Linux (IoTL) Kernel XIP Already available ! Improved it by storing kernel .data compressed into Flash Patches available here: http://git.linaro.org/people/nicolas.pitre/linux.git xip_zdata Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 18 sur 32 2017-10-04 à 09:20
  • 19. Reducing RAM usage Internet of Tiny Linux (IoTL) User Space XIP requirements Executable binary format allowing independent code and data access BFLT Binary Flat Format: very lightweight poorly documented requires ad hoc tools shared library support is a hack FDPIC ELF: designed for split segments from the start can be inspected with standard ELF tools supports dynamic libraries Patches available here: http://git.linaro.org/people/nicolas.pitre/linux.git fdpic Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 19 sur 32 2017-10-04 à 09:20
  • 20. Reducing RAM usage Internet of Tiny Linux (IoTL) User Space XIP requirements File system driver allowing direct Flash mappings I chose cramfs because: it is lightweight easy to add direct ROM access may dispense with the block layer very low memory usage For XIP support I added: the possibility to not compress some data blocks the ability to locate data blocks arbitrarily for alignment purposes automatic mapping from ROM whenever possible when mmap() is used The mkcramfs tool knows how to locate ELF read-only segments in a file and mark them for XIP while still compressing writable data segments to be loaded into RAM. Patches available here: http://git.linaro.org/people/nicolas.pitre/linux.git xipcramfs Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 20 sur 32 2017-10-04 à 09:20
  • 21. Reducing RAM usage Internet of Tiny Linux (IoTL) still large RAM kernel footprint $ size vmlinux text data bss dec hex filename 957220 79744 53940 1090904 10a558 vmlinux The text segment is executed from ROM but data and bss are loaded into RAM. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 21 sur 32 2017-10-04 à 09:20
  • 22. Reducing RAM usage Internet of Tiny Linux (IoTL) My symsize script #!/bin/sh { read addr1 type1 sym1 while read addr2 type2 sym2; do size=$((0x$addr2 - 0x$addr1)) case $type1 in b|B|d|D) echo -e "$type1 $sizet$sym1" ;; esac type1=$type2 addr1=$addr2 sym1=$sym2 done } < System.map | sort -n -r -k 2 Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 22 sur 32 2017-10-04 à 09:20
  • 23. Reducing RAM usage Internet of Tiny Linux (IoTL) symsize output b 16384 __log_buf D 8192 init_thread_union d 4288 timer_bases b 4108 in_lookup_hashtable b 4096 ucounts_hashtable d 3760 cpuhp_ap_states D 2048 tasklist_lock d 2048 page_wait_table d 1296 init_sighand D 1072 runqueues [...] Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 23 sur 32 2017-10-04 à 09:20
  • 24. Reducing RAM usage Internet of Tiny Linux (IoTL) Static memory usage reduction arch/arm/include/asm/thread_info.h -#define THREAD_SIZE_ORDER 1 +#define THREAD_SIZE_ORDER 0 fs/dcache.c -#define IN_LOOKUP_SHIFT 10 +#define IN_LOOKUP_SHIFT 5 kernel/time/timer.c -#define LVL_BITS 6 +#define LVL_BITS 4 kernel/ucount.c -#define UCOUNTS_HASHTABLE_BITS 10 +#define UCOUNTS_HASHTABLE_BITS 5 and so on.i. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 24 sur 32 2017-10-04 à 09:20
  • 25. Reducing RAM usage Internet of Tiny Linux (IoTL) Static memory usage reduction Result: text data bss dec hex filename 947884 64424 31964 1044272 fef30 vmlinux data reduction: 15320 bytes bss reduction: 21976 bytes Total reduction: 37296 bytes (28%) Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 25 sur 32 2017-10-04 à 09:20
  • 26. Reducing RAM usage Internet of Tiny Linux (IoTL) Runtime memory usage reduction Time to boot the board: Booting Linux on physical CPU 0x0 Linux version 4.13.0-00061-ga90f1ee20e-dirty (nico@xanadu.home) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #468 Mon Sep 18 23:30:43 EDT 2017 CPU: ARMv7-M [410fc241] revision 1 (ARMv7M), cr=00000000 OF: fdt: Machine model: STMicroelectronics STM32F469i-DISCO board [...] On node 0 totalpages: 4096 Normal zone: 32 pages used for memmap Normal zone: 0 pages reserved Normal zone: 4096 pages, LIFO batch:0 pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [...] Memory: 16064K/16384K available (663K kernel code, 51K rwdata, 232K rodata, 44K init, 29K bss, 320K reserved, 0K cma-reserved) 80 unreleased memblock pages 32 pages for memmap! (time to shrink memory) 8 pages for pcpu-alloc 13 pages for rwdata 11 pages of initdata Where are the missing 16 pages? Answer: At least 13 are taken by unflatten_and_copy_device_tree(). Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 26 sur 32 2017-10-04 à 09:20
  • 27. Reducing RAM usage Internet of Tiny Linux (IoTL) Runtime memory usage reduction Tweak workqueue allocation to shrink its per-cpu memory usage Reduce the per-cpu memory pool from 8 pages to only one Reduce available RAM from 16MB to 800KB Shrinks mem_map from 32 to 2 pages What to do with the unflatten device tree? Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 27 sur 32 2017-10-04 à 09:20
  • 28. Reducing RAM usage Internet of Tiny Linux (IoTL) Runtime memory usage reduction What about initcalls? init/main.c + pages = global_node_page_state(NR_SLAB_UNRECLAIMABLE); if (initcall_debug) ret = do_one_initcall_debug(fn); else ret = fn(); + pages = global_node_page_state(NR_SLAB_UNRECLAIMABLE) - pages; + if (pages) + printk("memory: %d pages allocated by initcall %pfn", pages, fn); Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 28 sur 32 2017-10-04 à 09:20
  • 29. Reducing RAM usage Internet of Tiny Linux (IoTL) Runtime memory usage reduction What about initcalls? Result: 2 pages allocated by spawn_ksoftirqd 2 pages allocated by regulator_init 1 pages allocated by stm32f469_pinctrl_init 11 pages allocated by of_platform_default_populate_init 1 pages allocated by topology_init 1 pages allocated by init_pipe_fs 1 pages allocated by proc_loadavg_init 1 pages allocated by chr_dev_init 1 pages allocated by kswapd_init 1 pages allocated by stm32_timers_driver_init 1 pages allocated by stm32_rtc_driver_init 1 pages allocated by i2c_dev_init 1 pages allocated by pm_qos_power_init 25 total pages allocated from initcalls. But… 11 pages for of_platform_default_populate_init() !? Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 29 sur 32 2017-10-04 à 09:20
  • 30. Reducing RAM usage Internet of Tiny Linux (IoTL) Runtime memory usage reduction A view from user space: / # dmesg | grep Memory Memory: 628K/800K available [...] / # free total used free shared buffers cached Mem: 640 496 144 0 0 24 -/+ buffers/cache: 472 168 / # cat /proc/meminfo MemTotal: 640 kB MemFree: 136 kB MemAvailable: 136 kB Cached: 24 kB MmapCopy: 84 kB KernelStack: 60 kB Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 30 sur 32 2017-10-04 à 09:20
  • 31. Reducing RAM usage Internet of Tiny Linux (IoTL) Runtime memory usage reduction Memory distribution: 140 KB used by Device Tree data 96 KB from unflatten_and_copy_device_tree() 44 KB from of_platform_default_populate_init() 84 KB used by user space tasks 2 tasks 16 KB stack (2 x 8 KB) 68 KB data 64 KB kernel data 52 KB .data 8 KB .bss 56 KB initcalls besides of_platform_default_populate_init() 60 KB kernel stacks 13 kernel threads 2 user tasks A few KB’s from memblock_alloc 168 KB available memory Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 31 sur 32 2017-10-04 à 09:20
  • 32. Reducing RAM usage Internet of Tiny Linux (IoTL) Conclusion: Shrinking data usage is easier than reducing code size Current solution is still incomplete Lots of memory is still unaccounted for and must be tracked Leveraging the kmemleak infrastructure should be investigated Device Tree data is a big memory hog Still not ready for the STM32F469NI’s 324 KB of internal RAM but getting closer. Internet of Tiny Linux (IoTL): Episode IV (1) file:///C:/Users/Martine/AppData/Local/Temp/slides-2.html#(1) 32 sur 32 2017-10-04 à 09:20