SlideShare a Scribd company logo
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 Environment
Kernel 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 systems
linuxlab_conf
 
Secure IoT Firmware for RISC-V
Secure IoT Firmware for RISC-VSecure IoT Firmware for RISC-V
Secure IoT Firmware for RISC-V
RISC-V International
 
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
Linaro
 
BUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoCBUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoC
Linaro
 
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 protocol
linuxlab_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 Story
Linaro
 
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
Linaro
 
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
linuxlab_conf
 
LAS16-300K2: Geoff Thorpe - IoT Zephyr
LAS16-300K2: Geoff Thorpe - IoT ZephyrLAS16-300K2: Geoff Thorpe - IoT Zephyr
LAS16-300K2: Geoff Thorpe - IoT Zephyr
Shovan 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-205
Linaro
 
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 profit
linuxlab_conf
 
P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304
Linaro
 
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
Linaro
 
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
Kernel 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 Containers
Michelle 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 mind
Linaro
 
Linaro and Android Kernel
Linaro and Android KernelLinaro and Android Kernel
Linaro and Android Kernel
John 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 IoT
Amrisha Prashar
 
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
Canonical
 
2014_DPDK_slides.pdf
2014_DPDK_slides.pdf2014_DPDK_slides.pdf
2014_DPDK_slides.pdf
eceschmidt
 
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 Beyond
David 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_scripting
Dani 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 - Berlin
Djalal 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 projects
Christian 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 Kiratech
Kiratech
 
TDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux EmbarcadoTDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux Embarcado
tdc-globalcode
 
Containerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcementsContainerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcements
Kiratech
 
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
Michelle Holley
 
Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introduction
rinnocente
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux Multimedia
Caglar 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
 
Interview Questions
Interview QuestionsInterview Questions
Interview Questions
rajusandeep12
 
Linux vs windows
Linux vs windowsLinux vs windows
Linux vs windows
Dhaivat Zala
 
1256.ppt
1256.ppt1256.ppt

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 Gallo
Linaro
 
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
Linaro
 
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
Linaro
 
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
Linaro
 
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
Linaro
 
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
Linaro
 
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 mainline
Linaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
Linaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
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 mainline
Linaro
 
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
Linaro
 
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
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
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
Linaro
 
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 boot
Linaro
 

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

Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
SAI KAILASH R
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
digitalxplive
 
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
Edge AI and Vision Alliance
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
CEPTES Software Inc
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
LINUS PROJECTS (INDIA)
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 

Recently uploaded (20)

Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
 
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
“Deploying Large Language Models on a Raspberry Pi,” a Presentation from Usef...
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 

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