© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. CGE7 Core Isolation Nawneet Anand.

Slides:



Advertisements
Similar presentations
Real Time Versions of Linux Operating System Present by Tr n Duy Th nh Quách Phát Tài 1.
Advertisements

User-Mode Linux Ken C.K. Lee
The Process Control Block From: A Process Control Block (PCB, also called Task Control Block or Task Struct) is.
Interrupts What is an interrupt? What does an interrupt do to the “flow of control” Interrupts used to overlap computation & I/O – Examples would be console.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Jonathan.
Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented by Reinette Grobler.
Chapter 13 Embedded Systems
Process Description and Control A process is sometimes called a task, it is a program in execution.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
The Design of Robust and Efficient Microkernel ManRiX, The Design of Robust and Efficient Microkernel Presented by: Manish Regmi
Introduction to Embedded Systems
1 Previous lecture review n Out of basic scheduling techniques none is a clear winner: u FCFS - simple but unfair u RR - more overhead than FCFS may not.
OFFLINE SCHEDULER BOF Raz Ben Yehuda Linux plumbers conference 2009.
Free Running Counter & Real Time Control
Fall 2013 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
1 Chapter 4 Processes R. C. Chang. 2 Linux Processes n Each process is represented by a task_struct data structure (task and process are terms that Linux.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila.
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
4P13 Week 2 & 3 Talking Points 1. Kernel Processes 2.
4300 Lines Added 1800 Lines Removed 1500 Lines Modified PER DAY DURING SUSE Lab.
Real Time System with MVL. © 2007 MontaVista Confidential | Overview of MontaVista Agenda Why Linux Real Time? Linux Kernel Scheduler Linux RT technology.
Time Sources and Timing David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Interrupts and Interrupt Handling David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. CGE7 Flight Recoder Demo Nawneet Anand.
Interrupt Handler Migration and Direct Interrupt Scheduling for Rapid Scheduling of Interrupt-driven Tasks Reviewer: Kim, Hyukjoong ESLab.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Soft Timers : Efficient Microsecond Software Timer Support for Network Processing - Mohit Aron & Peter Druschel CS533 Winter 2007.
Real-Time Operating Systems RTOS For Embedded systems.
Event Sources and Realtime Actions
Introduction to threads
Mohit Aron Peter Druschel Presenter: Christopher Head
Homework Reading Machine Projects Labs
REAL-TIME OPERATING SYSTEMS
Chapter Objectives In this chapter, you will learn:
Scheduling of Non-Real-Time Tasks in Linux (SCHED_NORMAL/SCHED_OTHER)
Current Generation Hypervisor Type 1 Type 2.
Chapter 5a: CPU Scheduling
Time Sources and Timing
Thread Fundamentals Header Advanced .NET Threading, Part 1
Chapter 11 – Processes and Services
Anton Burtsev February, 2017
Midterm Review David Ferry, Chris Gill
Linux 202 Training Module Program and Process.
Time Sources and Timing
Operating Systems for Underwater Wireless Sensor Networks
Real-time Software Design
Interrupts and Interrupt Handling
Chapter 6: CPU Scheduling
A Comparison Study of Process Scheduling in FreeBSD, Linux and Win2k
More examples How many processes does this piece of code create?
Light-weight Contexts: An OS Abstraction for Safety and Performance
Scheduling.
Operating systems Process scheduling.
Chapter 5: CPU Scheduling
Outline Scheduling algorithms Multi-processor scheduling
Chapter 6: CPU Scheduling
Multithreaded Programming
Operating Systems Lecture 3.
Linux Architecture Overview.
Midterm Review Brian Kocoloski
Lecture 6: Multiprogramming and Context Switching
Operating System Introduction.
How & When The Kernel Runs
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Supporting Time-Sensitive Applications on a Commodity OS
Chapter 6: CPU Scheduling
Linux Process State Scheduling information Identifiers
Interrupts and Interrupt Handling
Chapter 6: CPU Scheduling
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. CGE7 Core Isolation Nawneet Anand

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Agenda What is core Isolation ? Why Isolate? Isolate From? How to Isolate? How to test? Test result. 2

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. What is core isolation? Core Isolation is a technique that allows a task to have the core dedicated to its needs until it exits. By this technique application can in isolation from Linux kernel scheduler,interrupts, ticks, Timers and hrtimers, workqueue. 3

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Why Isolate? 4 Applications with aggressive real-time constraints need to improve their worst case response time. To get better performance isolation needed. Such application can be of networking,HPC or Real time systems etc. ex- Networking: Data plane / Control Plane

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Why Isolate?...contd… Control Plane: Power Efficient Data Plane: High Performance –Stack present in user space to avoid context switches –Single High performance thread per cpu/core –Core must process packets at ~0 latency –So Isolate core from background kernel activities 5

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Isolate: From? 6 Tasks Interrupts Ticks Timers & Hrtimers Workqueues

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Isolate from Tasks 7 Scheduler’s load balancer migrates tasks between CPUs –Create separate cpusets for control and data plane CPUs –Disable load balancing between them

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Isolate from Interrupts 8 Interrupts can land on any CPU depending on the configuration. –Most of them can be affined to a set of cores –Affine them to Control plane cores i.e boot core cpu 0.

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Isolate from Ticks 9 Tick: timer firing every 5-10 ms on all CPUs NO_HZ_FULL: Limits tick interval to 1 second Can get spurious ticks when hrtimer() returns without servicing any hrtimer. –To ignore this we are using -q option as command line parameter.

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Isolate from (hr)timers 10 Pinned & Unpinned Affined to local CPU and may be re- armed. Migrate all unpinned timers to Non- quiesced CPUs

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Isolate from workqueues 11 Pinned & Unpinned Affined to local CPU and may be re-armed Control them from sysfs

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. How to Isolate Boot system. Stop the IRQ balance Create Cpusets. Hotplug out/in all cpu’s we wanted to work on stress application( stess application used for demo).This will Move all tied task to other CPUs. 12

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. How to Isolate …contd.. Update cpusets for normal task movement within all CPUs(The ones which are hard bounded to a CPU wouldn’t get migrated this way. Update the CPU sets whenever we want to run a stress task on a cpu,so that the cpu in question is isolated and all its migrated using echo $taskid >/dev/cpusets/common-set- name/tasks 13

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. How to test change the mode of script Affine the Irq affinity to boot core. Check the affinity. executed the script 14

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. How to test.. Contd… Execute “ps -Leo pid,tid,psr,pcpu,comm | grep stress “ on other shell.We can see isolated core on which stress apllication executed. run “ killall stress” -it will give show on script console isolation start/end time as well previous and current total system interrupt count. 15

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Test Result Stress application executed on isolated core with maximum CPU utilization interrupts for last: 49 seconds test_case_id:Min-isolation 10 secs result:PASS measurement:49 units:secs 16

© 2013 MontaVista Software, LLC. MontaVista Confidential and Proprietary. Thanks 17