Intel & FreeBSD: Better Together - meetbsd.com · Introduced to FreeBSD 5.0 in 2003 by kensmith@...
Transcript of Intel & FreeBSD: Better Together - meetbsd.com · Introduced to FreeBSD 5.0 in 2003 by kensmith@...
● Introduction (OTC & Me)● Intel’s past involvement with BSD● Intel’s latest involvement with BSD● What’s next● Power Management deep-dive● Q&A
Agenda
● Introduced to FreeBSD 5.0 in 2003 by kensmith@● Software Developer at Intel since 2005● Focus switched to FreeBSD upstream work in 2018● Diverse career
Ben Widawsky
● Organization specializing in Open Source ● 20 years building expertise and acquiring industry talent
○ The other Alan Cox● Contributes to over 100 community projects● Community Friendly licensing
○ Match the ecosystem when possible■ GPLv2 or GPLv3 for utilities close to Linux Kernel■ Apache for cloud
Intel Open Source Technology Center (OTC)
BSD-Friendly Case Studies
Intel Linux Graphics● Intel releases code GPL/BSD● Intel develops Linux driver● Community ports to FreeBSD
Intel Network Drivers● Internally developed● Intel releases GPL code for Linux
and BSD code for FreeBSD
● Work required from community● Licenses can become mixed● Developed largely in the open● Easy for community to contribute
● No work required from community● Licenses are clear● Developed largely internally● Difficult to take community
contributions
● 2011○ jimharris@ started on integrated SAS controller in the Intel C600
● 2012○ jimharris@ merged isci(4), nvme(4), nvd(4), nvmecontrol(8)
● 2013○ NTB (Non-Transparent Bridge) driver (by carl@)○ jimharris@ ported VTune drivers to FreeBSD
● 2014 ○ jimharris@ merged ismt(4)○ DPDK on FreeBSD○ jimharris@ ported pcm
Intel’s Past Contributions
● 2015○ Intel Ethernet team designates FreeBSD as Tier 1 OS○ cem@ merged an ioat(4) based on version developed by jimharris@
● 2017○ Intel Ethernet adopts iflib(9) as standard for future Ethernet driver
releases○ Intel Ethernet releases iflib(9) drivers for 10Gbe Ethernet Products○ Glenn Weinberg ported PMDK
Intel’s Past Contributions (cont’d)
Intel and FreeBSD Foundation establish collaborative relationship
● Intel is working closely with our partners with the shared goal of restoring confidence in the security of our customers’ data
● Intel engages with FreeBSD Foundation to help ensure coordinated disclosure method to help mitigate side-channel security issues
● Intel works collaboratively ahead of public disclosure to develop:○ Engineering mitigation○ Relevant guidance and documentation○ 2-way communication channel
● Results in mitigated software and guidance in advance of disclosure
Intel Adopts Security First Pledge
● Introduction (OTC & Me)● Intel’s past involvement with BSD● Intel’s latest involvement with BSD
Agenda
● OTC forms a FreeBSD team○ Liaison and support for security mitigations○ OS/Hardware enabling in “spare time”
● Early tasks○ Laundry list of things to enable○ Scrubbing and prioritizing
● Goal - Be useful○ Doing instead of talking
Humble Beginnings (2018)
● Environment adjusting○ Decreasing build times○ Remote debugging (serial ports, kgdb, ddb, etc)○ Obtaining machines
● Acclimatize to community○ Get small patches committed
✓ 7 patches since July
○ Port a useful tool✓ Turbostat
○ Participate in community discussion/reviews✓ Session leader BSDCam 2018 Power Management✓ Nvdimm testing
○ Find 10 year old bug✓ UFS + Quota + rename
The Context Switch
● Current Active Work○ iflib(9) drivers for Intel 40Gbe Ethernet products
■ done○ nvdimm namespace support
■ working on setting attributes in geom○ power management improvements
■ debugging○ Thunderbolt
■ scoping
Do Things People Care About
● Introduction (OTC & Me)● Intel’s past involvement with BSD● Intel’s new involvement with BSD● What’s next
Agenda
Figuring Out What to Do
Ideally:1. community wants2. sales interest3. has a developer
available and interested4. customers are ready to
deploy.
● Device Drivers○ Intel Wireless○ Intel Graphics○ Thunderbolt○ evdev/udev
● Power Management / Performance○ Suspend Resume Improvements
▪ Robustness▪ S4
○ Turbo Boost● Bhyve
○ GPU passthrough○ USB passthrough
● Internal/External APIs○ CUDA + Other HPC○ ALTQ replacement○ inotify/fsevents
● Code Cleanup○ Unification of i386, amd64, and x86
● Tools○ Powertop port
Requests So Far● Device Drivers
○ Intel Networking 100Gbe○ Better NVMe Error Handling○ QAT○ DSA (Data Streaming Accelerator)
● Power Management / Performance○ Runtime Power Management
● Internal/External APIs● Security
○ Enabling root of trust▪ KPT
● Stability○ CI / test farm
● Tools/Libraries○ CET○ DPDK○ SPDK○ Snap○ RDT○ Better VTune support○ Nvme firmware updater
● Help me prioritize the work○ Help me understand where we can co-invest
● Help me find new work○ If a task has impact for Intel, Alliance with communities, and is feasible,
send it my way!● Power Management
○ If you have ideas on how runtime power management should look○ Help me move the point in the Venn diagram
● Be nice :-)
Call to Action
● Introduction (OTC & Me)● Intel’s past involvement with BSD● Intel’s new involvement with BSD● What’s next● Power Management deep-dive
Agenda
1.Understand the existing suspend/resume path2.Add a “suspend-to-idle” option3.Emulated S3a.Enable s0ix for platforms which support it4.Design a runtime power management framework5.Take a platform and make that work
Power Management Goals
Goal
Reality
“The definition of insanity is doing the same thing over and over and expecting different results.”
‐ Albert Einstein
Sleep Flow
Down Devices
ACPI PrepLid Close
Sleep Button
Power Button
Sx
S5
Power Off
Down CPU
Restore CPU
S3
Event
ACPI Wake
Up Devices
Emulated S3 Flow aka Suspend to Idle
Down Devices
ACPI PrepLid Close
Sleep Button
Power Button
Sx
S5
Power Off
Down CPU
Restore CPU
S3
Event
ACPI Wake
Up Devices
Idle CPU
Opportunistic Idle
Device IdleDevice Idle
Device IdleDevice Idle
Device Idle
hysteresis LPI?
Delay
Wake Event
Up Devices
Idle CPU
Refcount vs. Poll All devices or
just some?
● Suspend-to-idle debugging○ Random wakeups○ Random poweroff○ Dead
● Beginning to think about runtime PM● Wishlist
○ rtcwake equivalent (help remote testing)○ serial portless debugging○ nvme(4) robustification○ Bring devices back up on failures in sleep path
■ Example: prints in wakeup events
Power Management Status
● Introduction (OTC & Me)● Intel’s past involvement with BSD● Intel’s new involvement with BSD● What’s next● Power Management deep-dive● Q&A
Agenda
▪ Jim Harris - Contributing the non-network Intel history▪ Shan Greer - Contributing network driver Intel history▪ Eric Joyner - Explaining the licensing in network driver team▪ John Venn▪ FreeBSD community
▪ jhb@▪ emaste@
Thanks + Q&A
● Email○ [email protected] - “official stuff”○ [email protected] - FreeBSD stuff○ [email protected] - everything else
● Personal Twitter○ @widawsky
● Personal Blog○ https://bwidawsk.net - Add to the blog
● Docs/Links○ Low Power Idle○ https://01.org/
Contacts/Links