Going fast by being lazy: Context switching in PowerPC Linux
Channel: Linux.conf.au 2011 -- Brisbane, Australia
Date: 23/11/2014

Presenter(s): Michael Neuling
URL: http://2011.linux.conf.au/programme/schedule/view_talk/93

Modern CPU architectures with floating point and vector instructions
sets have extended CPU state which needs to be context switched between
processes by the operating system.

On PowerPC this CPU state is growing.  The new POWER7 processor added
more vector registers for the Vector-Scalar Extension (VSX)
instructions.  As this state grows, there's increasing overhead when
Linux context switches between processes.  This overhead is incurred
every context switch, so it's seemingly a prime candidate for
optimisation.

This presentation details how context switching of this extended CPU
state is currently handled on PowerPC Linux.  It then details an attempt
to lazily save and restore this state, so it's only switched when really
necessary.  It details the performance gains, the dangers of attempting
this in an SMP environment and the other trials and tribulations along
the way to getting it to work.


http://2011.linux.conf.au/ - http://www.linux.org.au
CC BY-SA - http://creativecommons.org/licenses/by-sa/4.0/legalcode.txt