inusTorvaldsannouncedLinux5.0,
andwithittheopeningofthemerge
window(periodoftimeduringwhich
disruptivechangesareallowedaheadof5.1).
Inhisannouncement,hedetailedafewlast-
minutefixes,andthathewashappyoverall
withhavingextendedthe5.0cyclebyaweek,
followingtheatypical5.0-RC8.Thenewkernel
includesmanynewfeatures,amongthemthe
EnergyAwareSchedulercoveredinlastissue.
ItalsogainssupportintheAMDGPU
driversforFreeSync,atechnologypopular
withgamersthatsmoothsthedisplayby
aligningthetransitionoftheframedisplayed
withtheverticalblankingintervalofthe
display.Acompletesummaryofwhat’snew
in5.0isprovided(asusual)byKernelNewbies
athttps://kernelnewbies.org/Linux_5.0.
Physicallycontiguousmemory
Linuxgenerallydealswithtwodifferentviews
ofmemory:physicalandvirtual.Physical
memorydescribestheactualchipswithinthe
machine(thatis,theDRAM),andisusually
quitelimitedcomparedtosecondarystorage
suchasadiskorNVMe.Virtualmemory
representsatranslatedviewinwhichregions
ofmemorymayappearlargeandcontiguous
tosoftware,butinfactaremappedusing
OS-managed‘pagetables’intomanydifferent
physicallocationsbyhardware.Thetranslation
isfineformostpurposes,andinfactiscriticalto
ourabilitytowritemodernapplications.But
therearetimeswhencontiguousvirtualmemory
isnotenough.
Sometimes,hardwareneedstrulycontiguous
regionsofphysicalmemory.Thiscanbe
becausethehardwareislesscomplex–for
example,withembeddeddevicesthatarenot
capableof‘scattergather’memoryoperations
whenmovingdataaround.Butitcanalsobe
desirableforperformanceonmuch
biggermachines.Whena
sufficientlylargeregionof
contiguousphysicalmemoryexists,
aso-called‘huge’pagemapping
canbecreatedtorepresentthe
virtual-to-physicaltranslationofa
largeregionusingfewerentriesinpagetables,
andthehardwarestructuresthatcachethese.
Theproblemisthatwhenasystemis
running,physicalmemoryquicklybeginsto
fragmentasitisallocatedandfreed,so
eventuallyitcanbecomedifficulttofindlarge
regionsofcontiguousphysicalmemory.ZiYan’s
“Generatingphysicallycontiguousmemoryafter
pageallocation”pagesaimtohelpbyeffectively
defragmentingphysicalmemorytofreeuplarge
chunksofit.
opinion
I’velatelybeen
playingalotwithdifferent
computerarchitecturesthat
interestme.Anarchitecture
describesthekindof
fundamentalinstructions
thatareunderstoodbya
familyofcomputers;for
example‘x86’forInteland
AMD,‘arm’and‘riscv’.For
example,nearlyeveryone
readingthishasanx
laptopcomputer,and
maybeanArm-based
RaspberryPiorthreefor
variousprojects.
Butforotherkindsof
computer,it’smuchharder
togetoneathome.Insome
cases,thisisduetocost.
Fewpeoplehavethespace,
powerbudgetorbuilding
structuralsupport,letalone
themoney,forapersonal
mainframe.Inothercases,
scarcityisafactor.Older
computersarehardtocome
by,somearesonewthat
theyhaven’tbeenmadeyet.
Thelattercaseincludes
newdesignsthatarecoming
butarenotonthemarket
justyet.Inalmostallof
thesecases,thereare
readilyavailableemulators
thatletyoutestdrivejustas
easilyasrunningavirtual
machineonyourdesktop.
Agoodexampleisthe
RISC-VQEMUportand
associatedtools,whichyou
cangetholdofathttps://
github.com/riscv/riscv-
qemu/wiki.
JonMastersisakernelhacker
who’sbeeninvolvedwithLinuxfor
morethan 22 years,andworkson
energy-efficientARMservers.
just
emulate it
L
ongoingDeveLopment
DavidHowellspostedaRequestFor
Commentpatchseriestitled“Containers
andusingauthenticatedfilesystems”,
intendedtostartaconversationabout
containerisingthekernel’ssupportfor
cryptokeysthatitcanmanageonbehalfof
filesystemsandothersubsystems.The
patchesintroducedanew,explicitnotionof
acontainerinkernelspace,whichhasnot
previouslybeenthecase.
Theseideaswererejectedforavariety
ofreasons,buttheymayjuststartanew
dialogueaboutin-kernelcontainer
representation.SashaLevinproposeda
discussionattheupcomingLinuxStorage
FilesystemandMemoryManagement
Summitaboutthepreferredteststhat
shouldberunagainstpatchesdestinedfor
-stablekernels.
Stablekernelsarethosereleasedby
GregKroah-Hartmanandbasedupon
existingLinuskernelswithvariousfixesand
backports,intendedforthosewhowantto
runanupstreamkernelbutneedsome
levelofmaintainance.
Gregnotedthatvarioustestsagainst
stableprobablyexceededthosefor
mainlinereleases,whileotherspiled
onwithinputaroundthedifferenttests
thatcouldberun.
“physicalmemory quickly
begins to fragmentasit
isallocatedandfreed”
Kernel Watch
JonMasterssummarisesthelatesthappeningsinthe
Linuxkernelcommunity,foryourreadingpleasure.
10 LXF249May 2019 http://www.linuxformat.com
Newsdesk