[PATCH 1/1] nvme : Add sysfs entry for NVMe CMBs when appropriate

Stephen Bates sbates at raithlin.com
Wed Oct 5 07:38:43 PDT 2016


On Wed, Oct 05, 2016 at 11:22:51AM +0300, Sagi Grimberg wrote:
>
> >Add a sysfs attribute that contains salient information about the NVMe
> >Controller Memory Buffer when one is present. For now, just display the
> >information about the CMB available from the control registers. We attach
> >the CMB attribute file to the existing nvme_ctrl sysfs group so it can
> >handle the sysfs teardown.
>
> Hey Stephen,
>
> I'm wandering if placing this only for pci is correct. In theory, we
> could have fabrics expose a cmb (while its usage is still somewhat
> unknown at the moment).
>
> Perhaps cmbloc/cmbsize should exist in ctrl and be queried by
> ->reg_read32() callout. In addition, we would need a new map_cmb()
> callout in ctrl->ops.
>
> Thoughts?

Sagi

The fabrics specification currently denotes the CMBLOC and CMBSZ
properties as reserved [1]. So it is not currently possible to
advertise a CMB in a fabrics controller. While that might change down
the road we can't assume that is going to happen.

I am inclined to keep thingsin pci.c for now and then address this
again when (if) the fabrics specification gets updated.

Also I am wondering where the physical memory backing a fabrics CMB
would reside. Would this be memory in the fabric NIC on the host, in
the NIC on the target or somewhere else?

1. See Figure 27 of http://www.nvmexpress.org/wp-content/uploads/\
   NVMe_over_Fabrics_1_0_Gold_20160605.pdf

Cheers

Stephen



More information about the Linux-nvme mailing list