BSDCan2016 - v1.1.24a

BSDCan 2016
The Technical BSD Conference

Speakers
Warner Losh
Schedule
Day Talks #1 - 10 June - 2016-06-10
Room DMS 1120
Start time 10:00
Duration 01:00
Info
ID 670
Event type Lecture
Track Embedded
Language used for presentation English

A Walkthrough of CAM

Understanding NVMe CAM front end

A walk through of CAM, its data flows, code flows and how to write drivers for it will be presented.

CAM has been in the FreeBSD system for 17 years, yet it remains one of the more difficult subsystems to approach. It started out in a parallel SCSI world on systems with 16MB doing maybe 20 I/Os per second (iops) and a few disks. It has evolve to cope with systems with dozens of solid state drives that push tens of thousands of iops poised to move to hundreds of thousand.

Towards that end, the author has written a CAM front end to the NVMe driver.

This talk will walk through the new nvme front end. To understand the work, however, you need to understand CAM and how it fits together. The talk will focus on providing a tutorial for CAM. Starting with a brief overview of the FreeBSD I/O stack, the tutorial will focus on how CAM's connections to the system. I/O will be traced trough CAM, from its "periph" drivers that connect to the GEOM system to consume I/O from the upper layers, down through the transport (XPT) layer to the host interface modules (SIMs) which send the I/O requests to the drives. In addition to the simple data flows through CAM, various auxiliary details of CAM will be discussed. From a walk through of how CAM enumerates devices and how it divides those roles, to how the SIM drivers are created by the "new bus" drivers and how they interact with the BUS DMA system, these little discussed auxiliary details will be presented. Details of the new NVMe CAM front end will also be presented along side the more general details of CAM.

Accompanying the talk will be a paper documenting the connections within CAM in more detail than the one hour format of the talk will allow. The author hopes to also complete man pages for all the CAM APIs before BSDcan, which this paper will cross reference.