SlideShare a Scribd company logo
1 of 25
Download to read offline
Linux Kernel on RISC-V:
Where do we stand ?
Atish Patra, Principal R&D Engineer
Damien Le Moal, Director, System Software Group
7/19/2018©2018 Western Digital Corporation or its affiliates. All rights reserved.
• Software ecosystem status overview
– Development toolchain
– Linux distributions
– Linux kernel
• What’s next ?
• Our learnings
• Contribution process
• Summary
Overview
7/19/2018 2©2018 Western Digital Corporation or its affiliates. All rights reserved.
Why Linux ?
Linux
96%
Others
4%
TOP 1M WEBSITES
7/19/2018 3©2018 Western Digital Corporation or its affiliates. All rights reserved.
Linux
50%
Others
50%
X86 SERVER
Linux
72%
Others
28%
IOT DEVICES
Android
77%
Others
23%
MOBILE DEVICES
Software Ecosystem Overview
7/19/2018 4©2018 Western Digital Corporation or its affiliates. All rights reserved.
User Space
Glibc, core libraries
Linux Kernel
RISCV CPU
Core Device drivers (CPU management, interrupt
management, ...)
Toolchainsupportand
optimization
CPU extensions device drivers
Bootloader(BBL)
Supervisor Binary Interface (SBI)
Memory Management (MMU, IOMMU)
Linux
Distribution
Applications
Jan 18
Glibc
Software Ecosystem Growth
7/19/2018 5©2018 Western Digital Corporation or its affiliates. All rights reserved.
March 17
Binutils
May 17
GCC
Nov 17
4.15 Linux
Kernel
March 18
QEMU
Feb 18
Debian
port start
March 18
Fedora bootstrap
done
• Almost Complete Development Environment
– GCC 7.3.1
– Perl 5.26
– Python 2 and 3
– Git
– Systemd
– LLVM
Development toolchain
7/19/2018 6©2018 Western Digital Corporation or its affiliates. All rights reserved.
• 1st Linux distro available on RISC-V
• Fedora 29 available
• The koji build farm
– Contains 3 boards + 6 QEMU VMs
– 3000+ builds a week, 500+ a day
– The best was 85+% success rate for a week
• 22347 number of packages are built
Linux Distributions: Fedora
7/19/2018 7©2018 Western Digital Corporation or its affiliates. All rights reserved.
• More than 80% Debian packages are built for RISC-V
• Higher than Itanium!!
• More than 9k of ~13k arch-dependent packages built
Linux Distributions: Debian
7/19/2018 8©2018 Western Digital Corporation or its affiliates. All rights reserved.
March 2018 June 2018
Demonstration (Thanks to Palmer)
7/19/2018 9©2018 Western Digital Corporation or its affiliates. All rights reserved.
• So what Can I do on a RISC-V
desktop ?
– Browsing
– 3D gaming
– Chat/Tweet
– Crypto currency mining ???
• What is SBI ?
– OS interface for Supervisor Execution Environment(SEE)
– Equivalent to microcode implementation
– Implemented by Berkely Boot Loader (bbl)
– Provides cleaner interface for Supervisor OS (i.e. Linux)
• Interface functions
– Set Clock events
– Send/Clear Inter Processor Interrupts(IPI)
– Serial Console Get/Update
– Remote Memory barrier (aka fence)
Kernel Status: Supervisor Binary Interface (SBI)
7/19/2018 10©2018 Western Digital Corporation or its affiliates. All rights reserved.
Kernel Status: Core Features
7/19/2018 11©2018 Western Digital Corporation or its affiliates. All rights reserved.
• UMP/SMP Support
• Interrupt Controller
• Clock driver
• Virtual memory support
• Serial Driver
• System call/trap handling
• Kernel module support
• CPU hotplug support
Kernel Status: RISC-V Boot Process
7/19/2018 12©2018 Western Digital Corporation or its affiliates. All rights reserved.
• No dedicated boot CPU
• A lottery based mechanism to select the boot CPU
• Non-boot CPUs boot in random order
• ~100 lines of assembly instructions
• All device initialization depends on device-tree
• Device tree is read from ROM & passed to kernel by BBL
Kernel Status: Interrupt Management
7/19/2018 13©2018 Western Digital Corporation or its affiliates. All rights reserved.
• One timer per hart
• Per CPU based clock event
• Clockevents are initialized via CPU hotplug during SMP bring up
• One shot timer
• Every clock event reprograms next one via SBI call
• All the timers across all the harts are synchronized within one tick of
each other
• Tickless kernel (NOHZ) support is also enabled
Kernel Status: Timer Management
7/19/2018 14©2018 Western Digital Corporation or its affiliates. All rights reserved.
Kernel Status: CPU Hotplug
7/19/2018 15©2018 Western Digital Corporation or its affiliates. All rights reserved.
Offline
Online
CPU hotplug core
CPU hotplug core
subsy1 subsy2 subsy3 subsy4 ….
User space Kernel
CPU offline
CPU online
__cpu_disabl
e
__cpu_die
__cpu_up
Arch
WAIT on
WFI
Issue an IPI
boot
cpu
Kernel Status: CPU Hotplug
7/19/2018 16©2018 Western Digital Corporation or its affiliates. All rights reserved.
• Ftrace
– Normal trace
– Function graph tracing
– Function profiling
– Filtering
– No kprobes
• Perf
– Instructions count
– Cycle count
• GDB port is in progress
Kernel Status: Tracing/Debugging
7/19/2018 17©2018 Western Digital Corporation or its affiliates. All rights reserved.
• High performance Java support
– OpenJDK port by J extension group going on
– Jikes RVM going on. Not yet public
• In progress
– Rust
– GO, Clang
• JavaScript
– V8
– Node.js
• Others
– Dart, Ruby
– GTK, OpenCV
What’s next – User space
7/19/2018 18©2018 Western Digital Corporation or its affiliates. All rights reserved.
• Independent boot loader(uboot or coreboot)
• SBI extension for power management/virtualization
• CPU topology
• Multi-level interrupt controller through irq domains (in progress)
• CPU power management
• Context tracking for NO_HZ_FULL
• Precise IRQ time accounting
• IRQ stats update for Timer/IPI interrupt
What’s next – Core Linux Kernel
7/19/2018 19©2018 Western Digital Corporation or its affiliates. All rights reserved.
• Specification required
– IOMMU
– Performance Monitor counters
– Virtualization support
• Not useful at this time due to lack of hardware
– Numa
– Memory hotplug
– Huge pages
What’s next – Core Linux Kernel
7/19/2018 20©2018 Western Digital Corporation or its affiliates. All rights reserved.
• Kexec
• Kdump
• Lockdep
• Kasan
• Kprobes
• kernel function-return probes
• KGDB
• BPF
What’s next – Tracing/Debugging
7/19/2018 21©2018 Western Digital Corporation or its affiliates. All rights reserved.
• QEMU verification is very handy
• NFS & chroot in QEMU brings up the Fedora/Debian without any costly
hardware!!
• Remote gdb debugging possible in QEMU
• Print device tree in bbl
• Use Ftrace to analyze kernel issues
• Print to debug kernel
• Dumping dmesg in QEMU
• Inspecting registers in QEMU
Our Learnings
7/19/2018 22©2018 Western Digital Corporation or its affiliates. All rights reserved.
• RISC-V port available in Mainline Linux since v4.15
• The RISC-V development tree
– kernel.org/palmer/riscv-linux.git
– master: a copy of Linus’ master, up to the latest RC.
– for-linus : RISC-V branch that’s pulled into Linus’ master branch
– for-next : RISC-V branch that’s pulled into linux-next
– riscv-all : RISC-V integration branch
• Patches should be sent to
– linux-riscv@lists.infradead.org
• IRC Chatrooms on freenode
– #linux-riscv
– #riscv
Contribution Process
7/19/2018 23©2018 Western Digital Corporation or its affiliates. All rights reserved.
Q&A
atish.patra@wdc.com
7/19/2018 24©2018 Western Digital Corporation or its affiliates. All rights reserved.
Atish Patra
7/19/2018©2018 Western Digital Corporation or its affiliates. All rights reserved. 25

More Related Content

What's hot

Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals哲豪 康哲豪
 
Computing Performance: On the Horizon (2021)
Computing Performance: On the Horizon (2021)Computing Performance: On the Horizon (2021)
Computing Performance: On the Horizon (2021)Brendan Gregg
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceSUSE Labs Taipei
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelSUSE Labs Taipei
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsBrendan Gregg
 
USENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsUSENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsBrendan Gregg
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)Linaro
 
Prerequisite knowledge for shared memory concurrency
Prerequisite knowledge for shared memory concurrencyPrerequisite knowledge for shared memory concurrency
Prerequisite knowledge for shared memory concurrencyViller Hsiao
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KernelThomas Graf
 
XPDDS17: Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...
XPDDS17:  Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...XPDDS17:  Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...
XPDDS17: Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...The Linux Foundation
 
Linux kernel tracing
Linux kernel tracingLinux kernel tracing
Linux kernel tracingViller Hsiao
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingViller Hsiao
 
Process Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux KernelProcess Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux KernelHaifeng Li
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernellcplcp1
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking WalkthroughThomas Graf
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPThomas Graf
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedBrendan Gregg
 
reference_guide_Kernel_Crash_Dump_Analysis
reference_guide_Kernel_Crash_Dump_Analysisreference_guide_Kernel_Crash_Dump_Analysis
reference_guide_Kernel_Crash_Dump_AnalysisBuland Singh
 

What's hot (20)

Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals
 
Computing Performance: On the Horizon (2021)
Computing Performance: On the Horizon (2021)Computing Performance: On the Horizon (2021)
Computing Performance: On the Horizon (2021)
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux Kernel
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
USENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsUSENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame Graphs
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
Prerequisite knowledge for shared memory concurrency
Prerequisite knowledge for shared memory concurrencyPrerequisite knowledge for shared memory concurrency
Prerequisite knowledge for shared memory concurrency
 
Xvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisorXvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisor
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux Kernel
 
XPDDS17: Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...
XPDDS17:  Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...XPDDS17:  Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...
XPDDS17: Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...
 
Linux kernel tracing
Linux kernel tracingLinux kernel tracing
Linux kernel tracing
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
Process Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux KernelProcess Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux Kernel
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting Started
 
reference_guide_Kernel_Crash_Dump_Analysis
reference_guide_Kernel_Crash_Dump_Analysisreference_guide_Kernel_Crash_Dump_Analysis
reference_guide_Kernel_Crash_Dump_Analysis
 

Similar to Linux kernel status in RISC-V

Introduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformIntroduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformSZ Lin
 
Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsRogue Wave Software
 
Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...
Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...
Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...Yoshitake Kobayashi
 
How We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfHow We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfRakuten Group, Inc.
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...Linaro
 
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal GemfireIMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal GemfireIn-Memory Computing Summit
 
Irati goals and achievements - 3rd RINA Workshop
Irati goals and achievements - 3rd RINA WorkshopIrati goals and achievements - 3rd RINA Workshop
Irati goals and achievements - 3rd RINA WorkshopEleni Trouva
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstackIkuo Kumagai
 
Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019
Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019
Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019VMware Tanzu
 
HKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOHKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOLinaro
 
Host Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsHost Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsNetronome
 
2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...
2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...
2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...xiso
 
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...OpenNebula Project
 
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...Dmytro Korzhevin
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth Pilli
 
P4_tutorial.pdf
P4_tutorial.pdfP4_tutorial.pdf
P4_tutorial.pdfPramodhN3
 
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processorUplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processorSatya Harish
 

Similar to Linux kernel status in RISC-V (20)

Porting tock to open titan
Porting tock to open titanPorting tock to open titan
Porting tock to open titan
 
Bringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near YouBringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near You
 
Introduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformIntroduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure Platform
 
Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applications
 
Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...
Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...
Civil Infrastructure Platform: Industrial Grade SLTS Kernel and Base-layer De...
 
How We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdfHow We Defined Our Own Cloud.pdf
How We Defined Our Own Cloud.pdf
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
 
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal GemfireIMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
 
Irati goals and achievements - 3rd RINA Workshop
Irati goals and achievements - 3rd RINA WorkshopIrati goals and achievements - 3rd RINA Workshop
Irati goals and achievements - 3rd RINA Workshop
 
The GPGPU Continuum
The GPGPU ContinuumThe GPGPU Continuum
The GPGPU Continuum
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstack
 
Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019
Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019
Greenplum Experts Panel, Greenplum Operations at Scale - Greenplum Summit 2019
 
HKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOHKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEO
 
Host Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsHost Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment Models
 
2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...
2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...
2022-05-03 SoC Interest Group Meeting - Deploying and testing firmware-softwa...
 
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
 
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latest
 
P4_tutorial.pdf
P4_tutorial.pdfP4_tutorial.pdf
P4_tutorial.pdf
 
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processorUplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
 

Recently uploaded

Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...amitlee9823
 
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证tufbav
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...amitlee9823
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制uodye
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证ehyxf
 
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...amitlee9823
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证tufbav
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...motiram463
 
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...amitlee9823
 

Recently uploaded (20)

Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
 
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Ravet ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
 
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
 
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men  🔝Vijayawada🔝   E...
➥🔝 7737669865 🔝▻ Vijayawada Call-girls in Women Seeking Men 🔝Vijayawada🔝 E...
 

Linux kernel status in RISC-V

  • 1. Linux Kernel on RISC-V: Where do we stand ? Atish Patra, Principal R&D Engineer Damien Le Moal, Director, System Software Group 7/19/2018©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 2. • Software ecosystem status overview – Development toolchain – Linux distributions – Linux kernel • What’s next ? • Our learnings • Contribution process • Summary Overview 7/19/2018 2©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 3. Why Linux ? Linux 96% Others 4% TOP 1M WEBSITES 7/19/2018 3©2018 Western Digital Corporation or its affiliates. All rights reserved. Linux 50% Others 50% X86 SERVER Linux 72% Others 28% IOT DEVICES Android 77% Others 23% MOBILE DEVICES
  • 4. Software Ecosystem Overview 7/19/2018 4©2018 Western Digital Corporation or its affiliates. All rights reserved. User Space Glibc, core libraries Linux Kernel RISCV CPU Core Device drivers (CPU management, interrupt management, ...) Toolchainsupportand optimization CPU extensions device drivers Bootloader(BBL) Supervisor Binary Interface (SBI) Memory Management (MMU, IOMMU) Linux Distribution Applications
  • 5. Jan 18 Glibc Software Ecosystem Growth 7/19/2018 5©2018 Western Digital Corporation or its affiliates. All rights reserved. March 17 Binutils May 17 GCC Nov 17 4.15 Linux Kernel March 18 QEMU Feb 18 Debian port start March 18 Fedora bootstrap done
  • 6. • Almost Complete Development Environment – GCC 7.3.1 – Perl 5.26 – Python 2 and 3 – Git – Systemd – LLVM Development toolchain 7/19/2018 6©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 7. • 1st Linux distro available on RISC-V • Fedora 29 available • The koji build farm – Contains 3 boards + 6 QEMU VMs – 3000+ builds a week, 500+ a day – The best was 85+% success rate for a week • 22347 number of packages are built Linux Distributions: Fedora 7/19/2018 7©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 8. • More than 80% Debian packages are built for RISC-V • Higher than Itanium!! • More than 9k of ~13k arch-dependent packages built Linux Distributions: Debian 7/19/2018 8©2018 Western Digital Corporation or its affiliates. All rights reserved. March 2018 June 2018
  • 9. Demonstration (Thanks to Palmer) 7/19/2018 9©2018 Western Digital Corporation or its affiliates. All rights reserved. • So what Can I do on a RISC-V desktop ? – Browsing – 3D gaming – Chat/Tweet – Crypto currency mining ???
  • 10. • What is SBI ? – OS interface for Supervisor Execution Environment(SEE) – Equivalent to microcode implementation – Implemented by Berkely Boot Loader (bbl) – Provides cleaner interface for Supervisor OS (i.e. Linux) • Interface functions – Set Clock events – Send/Clear Inter Processor Interrupts(IPI) – Serial Console Get/Update – Remote Memory barrier (aka fence) Kernel Status: Supervisor Binary Interface (SBI) 7/19/2018 10©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 11. Kernel Status: Core Features 7/19/2018 11©2018 Western Digital Corporation or its affiliates. All rights reserved. • UMP/SMP Support • Interrupt Controller • Clock driver • Virtual memory support • Serial Driver • System call/trap handling • Kernel module support • CPU hotplug support
  • 12. Kernel Status: RISC-V Boot Process 7/19/2018 12©2018 Western Digital Corporation or its affiliates. All rights reserved. • No dedicated boot CPU • A lottery based mechanism to select the boot CPU • Non-boot CPUs boot in random order • ~100 lines of assembly instructions • All device initialization depends on device-tree • Device tree is read from ROM & passed to kernel by BBL
  • 13. Kernel Status: Interrupt Management 7/19/2018 13©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 14. • One timer per hart • Per CPU based clock event • Clockevents are initialized via CPU hotplug during SMP bring up • One shot timer • Every clock event reprograms next one via SBI call • All the timers across all the harts are synchronized within one tick of each other • Tickless kernel (NOHZ) support is also enabled Kernel Status: Timer Management 7/19/2018 14©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 15. Kernel Status: CPU Hotplug 7/19/2018 15©2018 Western Digital Corporation or its affiliates. All rights reserved. Offline Online CPU hotplug core CPU hotplug core subsy1 subsy2 subsy3 subsy4 …. User space Kernel CPU offline CPU online __cpu_disabl e __cpu_die __cpu_up Arch WAIT on WFI Issue an IPI boot cpu
  • 16. Kernel Status: CPU Hotplug 7/19/2018 16©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 17. • Ftrace – Normal trace – Function graph tracing – Function profiling – Filtering – No kprobes • Perf – Instructions count – Cycle count • GDB port is in progress Kernel Status: Tracing/Debugging 7/19/2018 17©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 18. • High performance Java support – OpenJDK port by J extension group going on – Jikes RVM going on. Not yet public • In progress – Rust – GO, Clang • JavaScript – V8 – Node.js • Others – Dart, Ruby – GTK, OpenCV What’s next – User space 7/19/2018 18©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 19. • Independent boot loader(uboot or coreboot) • SBI extension for power management/virtualization • CPU topology • Multi-level interrupt controller through irq domains (in progress) • CPU power management • Context tracking for NO_HZ_FULL • Precise IRQ time accounting • IRQ stats update for Timer/IPI interrupt What’s next – Core Linux Kernel 7/19/2018 19©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 20. • Specification required – IOMMU – Performance Monitor counters – Virtualization support • Not useful at this time due to lack of hardware – Numa – Memory hotplug – Huge pages What’s next – Core Linux Kernel 7/19/2018 20©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 21. • Kexec • Kdump • Lockdep • Kasan • Kprobes • kernel function-return probes • KGDB • BPF What’s next – Tracing/Debugging 7/19/2018 21©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 22. • QEMU verification is very handy • NFS & chroot in QEMU brings up the Fedora/Debian without any costly hardware!! • Remote gdb debugging possible in QEMU • Print device tree in bbl • Use Ftrace to analyze kernel issues • Print to debug kernel • Dumping dmesg in QEMU • Inspecting registers in QEMU Our Learnings 7/19/2018 22©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 23. • RISC-V port available in Mainline Linux since v4.15 • The RISC-V development tree – kernel.org/palmer/riscv-linux.git – master: a copy of Linus’ master, up to the latest RC. – for-linus : RISC-V branch that’s pulled into Linus’ master branch – for-next : RISC-V branch that’s pulled into linux-next – riscv-all : RISC-V integration branch • Patches should be sent to – linux-riscv@lists.infradead.org • IRC Chatrooms on freenode – #linux-riscv – #riscv Contribution Process 7/19/2018 23©2018 Western Digital Corporation or its affiliates. All rights reserved.
  • 24. Q&A atish.patra@wdc.com 7/19/2018 24©2018 Western Digital Corporation or its affiliates. All rights reserved. Atish Patra
  • 25. 7/19/2018©2018 Western Digital Corporation or its affiliates. All rights reserved. 25