inus Torvalds announced the release
of Linux 5.5-rc7, and implied that it
could be the last before 5.5 (although
he wasn’t sure if he would need an rc8). In any
case, it is certain that Linux 5.5 will be out
imminently. The release of 5.5 will bring the
opening of the “merge window” during which
features intended for 5.6 will be merged.
One of the features we already anticipate
landing in 5.6 will be support for the WireGuard
VPN. WireGuard “aims to be much simpler and
easier to audit than IPsec” and is made
specifically for inclusion into the Linux kernel.
It is only a few thousand lines of code and is
well-supported by distributions. It is also
(apparently) quite easy to use.
Thermal pressure
Modern microprocessors perform (as many
as) billions of calculations every second. The
rate at which these occur depends upon many
factors, but one of them is the frequency of
the processor, or literally how many times
transistors within it switch on and off every
second. Each time a transistor switches, it
consumes a little energy and generates a little
heat. Some additional heat is lost due to static
effects of modern silicon, unrelated to
processor activity.
Processors need to keep their overall heat
(and energy consumption) within certain
envelopes. One of those popularly quoted in
the press (hey that’s us!–Ed) is TDP (thermal
design power), or the amount of heat that the
cooling system can dissipate. In a phone, the
‘cooling system’ is often the case of the phone,
conducting heat away from the chip and into your
pocket. As a result, mobile devices in particular
must operate under some very tight constraints.
The dynamic power consumption of
transistors is a function of voltage squared
times frequency. Consequently, lowering voltage
and frequency has a dramatic effect on power
(and heat). As a result, modern processors use
a feature known as DVFS (dynamic voltage
and frequency scaling) to rapidly make such
adjustments on the fly. Often, this is done to
save energy (and battery life).
When that is the case, the OS scheduler can
usually influence the process, trading power for
performance when applications need instant
responsiveness. Sometimes processors need to
cap performance due to heat. When this happens,
the operating system may have no idea what’s
going on. Enter the Linux Thermal Pressure
patches. Thara Gopinath posted version 7 of a
series intended to teach the scheduler to better
place tasks (applications) in accordance with the
thermal ‘pressure’ seen by a system over time.
Linux will monitor when thermal throttling occurs
and spread out task placement over a range of
processor cores to try to reduce pressure and
regain performance.
On a related note, the ‘IV edition of the Power
Management and Scheduling in the Linux Kernel
(OSPM) summit’ will be in Pisa from 11-13 May.
OPINION
Recently I set up an
OpenStack cluster at
home containing a mix of
x86 and Arm nodes. I used
‘Kolla’ – containerised
OpenStack – and deployed
it using kolla-ansible. This
latter part is supposed to
provide a turnkey solution:
edit a few config files, sit
back and automate the
hundreds of steps involved.
The reality was a little
different. While (eventually)
the scripts more or less
worked, there was a
problem. Guest (‘instance’)
VMs could not reach the
outside world. I traced
various tap, bridge and
other networking interfaces
that connect a guest
through a virtual router and
on to a host network. It led
me to conclude that netfilter
NAT wasn’t working within
the network namespaces
used for the ‘vrouter’ virtual
routers in OpenStack. Many
hours later I realised there
was a bug in the host kernel
on one of my machines.
What I ultimately learned
was that OpenStack is (still)
far too complex for many
‘everyday’ environments.
Kernel debugging is not a
task that average users
should have to be exposed
to. But I was also reminded
how gratifying it is to crawl
up and down the stack for
fun. The pieces are
incredibly complex, but the
source is open, and it is
possible to figure out how it
all goes together.
Jon Masters has been involved
with Linux for more than 22 years.
COMPLEX
OPENSTACK
L
ONGOING DEVELOPMENT
Anup Patel posted v.10 of a patch series
implementing RISC-V support in KVM (the
built-in Linux hypervisor layer). The patches
have been booted successfully under QEMU
and the implementation is pretty complete,
modulo a few pieces of in-kernel emulation
for platform management (SBI v0.2, PLIC,
etc.) that are punted to KVM userspace (in
the host). The patches even try to handle
non-homogeneous RISC-V platforms with
mixed cores, where it might be necessary to
trap and emulate basic features.
Greg Kroah-Hartman published a ‘Linux
Kernel Code of Conduct Committee: August
2019 to November 2019 report’, and then
another for December. He summarised the
number of complaints received under the
Linux Kernel Code of Conduct (www.kernel.
org/code-of-conduct.html). The idea is to
publish anonymised reports to promote civil
discourse upstream. Complaints are handled
through private outreach and coaching.
Linus Torvalds noted that Bruce Evans had
passed away, saying, “Bruce wasn’t ever
really much directly involved in Linux
development – he was active on the BSD
side – but he was the developer behind
Minix/i386, which was what I used for the
original Linux development in the very early
days before Linux became self-hosting”.
Kernel Watch
Jon Masters summarises the latest happenings in
the Linux kernel, so you don’t have to.
10 LXF260 March 2020 http://www.linuxformat.com
NEWSDESK
inusTorvaldsannouncedtherelease
ofLinux5.5-rc7,andimpliedthatit
couldbethelastbefore5.5(although
hewasn’tsureifhewouldneedanrc8).Inany
case,itiscertainthatLinux5.5willbeout
imminently.Thereleaseof5.5willbringthe
openingofthe“mergewindow”duringwhich
featuresintendedfor5.6willbemerged.
Oneofthefeatureswealreadyanticipate
landingin5.6willbesupportfortheWireGuard
VPN.WireGuard“aimstobemuchsimplerand
easiertoauditthanIPsec”andismade
specificallyforinclusionintotheLinuxkernel.
Itisonlyafewthousandlinesofcodeandis
well-supportedbydistributions.Itisalso
(apparently)quiteeasytouse.
Thermalpressure
Modernmicroprocessorsperform(asmany
as)billionsofcalculationseverysecond.The
rateatwhichtheseoccurdependsuponmany
factors,butoneofthemisthefrequencyof
theprocessor,orliterallyhowmanytimes
transistorswithinitswitchonandoffevery
second.Eachtimeatransistorswitches,it
consumesalittleenergyandgeneratesalittle
heat.Someadditionalheatislostduetostatic
effectsofmodernsilicon,unrelatedto
processoractivity.
Processorsneedtokeeptheiroverallheat
(andenergyconsumption)withincertain
envelopes.Oneofthosepopularlyquotedin
thepress(heythat’sus!–Ed)isTDP(thermal
designpower),ortheamountofheatthatthe
coolingsystemcandissipate.Inaphone,the
‘coolingsystem’isoftenthecaseofthephone,
conductingheatawayfromthechipandintoyour
pocket.Asaresult,mobiledevicesinparticular
mustoperateundersomeverytightconstraints.
Thedynamicpowerconsumptionof
transistorsisafunctionofvoltagesquared
timesfrequency.Consequently,loweringvoltage
andfrequencyhasadramaticeffectonpower
(andheat).Asaresult,modernprocessorsuse
afeatureknownasDVFS(dynamicvoltage
andfrequencyscaling)torapidlymakesuch
adjustmentsonthefly.Often,thisisdoneto
saveenergy(andbatterylife).
Whenthatisthecase,theOSschedulercan
usuallyinfluencetheprocess,tradingpowerfor
performancewhenapplicationsneedinstant
responsiveness.Sometimesprocessorsneedto
capperformanceduetoheat.Whenthishappens,
theoperatingsystemmayhavenoideawhat’s
goingon.EntertheLinuxThermalPressure
patches.TharaGopinathpostedversion 7 ofa
seriesintendedtoteachtheschedulertobetter
placetasks(applications)inaccordancewiththe
thermal‘pressure’seenbyasystemovertime.
Linuxwillmonitorwhenthermalthrottlingoccurs
andspreadouttaskplacementoverarangeof
processorcorestotrytoreducepressureand
regainperformance.
Onarelatednote,the‘IVeditionofthePower
ManagementandSchedulingintheLinuxKernel
(OSPM)summit’willbeinPisafrom11-13May.
OPINION
RecentlyIsetupan
OpenStackclusterat
homecontainingamixof
x86andArmnodes.Iused
‘Kolla’–containerised
OpenStack–anddeployed
itusingkolla-ansible.This
latterpartissupposedto
provideaturnkeysolution:
editafewconfigfiles,sit
backandautomatethe
hundredsofstepsinvolved.
Therealitywasalittle
different.While(eventually)
thescriptsmoreorless
worked,therewasa
problem.Guest(‘instance’)
VMscouldnotreachthe
outsideworld.Itraced
varioustap,bridgeand
othernetworkinginterfaces
thatconnectaguest
throughavirtualrouterand
ontoahostnetwork.Itled
metoconcludethatnetfilter
NATwasn’tworkingwithin
thenetworknamespaces
usedforthe‘vrouter’virtual
routersinOpenStack.Many
hourslaterIrealisedthere
wasabuginthehostkernel
ononeofmymachines.
WhatIultimatelylearned
wasthatOpenStackis(still)
fartoocomplexformany
‘everyday’environments.
Kerneldebuggingisnota
taskthataverageusers
shouldhavetobeexposed
to.ButIwasalsoreminded
howgratifyingitistocrawl
upanddownthestackfor
fun.Thepiecesare
incrediblycomplex,butthe
sourceisopen,anditis
possibletofigureouthowit
allgoestogether.
JonMastershasbeeninvolved
withLinuxformorethan 22 years.
COMPLEX
OPENSTACK
L
ONGOINGDEVELOPMENT
AnupPatelpostedv.10ofapatchseries
implementingRISC-VsupportinKVM(the
built-inLinuxhypervisorlayer).Thepatches
havebeenbootedsuccessfullyunderQEMU
andtheimplementationisprettycomplete,
moduloafewpiecesofin-kernelemulation
forplatformmanagement(SBIv0.2,PLIC,
etc.)thatarepuntedtoKVMuserspace(in
thehost).Thepatcheseventrytohandle
non-homogeneousRISC-Vplatformswith
mixedcores,whereitmightbenecessaryto
trapandemulatebasicfeatures.
GregKroah-Hartmanpublisheda‘Linux
KernelCodeofConductCommittee:August
2019 toNovember 2019 report’,andthen
anotherforDecember.Hesummarisedthe
numberofcomplaintsreceivedunderthe
LinuxKernelCodeofConduct(www.kernel.
org/code-of-conduct.html).Theideaisto
publishanonymisedreportstopromotecivil
discourseupstream.Complaintsarehandled
throughprivateoutreachandcoaching.
LinusTorvaldsnotedthatBruceEvanshad
passedaway,saying,“Brucewasn’tever
reallymuchdirectlyinvolvedinLinux
development–hewasactiveontheBSD
side–buthewasthedeveloperbehind
Minix/i386,whichwaswhatIusedforthe
originalLinuxdevelopmentintheveryearly
daysbeforeLinuxbecameself-hosting”.
Kernel Watch
JonMasterssummarisesthelatesthappeningsin
theLinuxkernel,soyoudon’thaveto.
10 LXF260March 2020 http://www.linuxformat.com
NEWSDESK