History log of /netbsd/sys/dev/ic/nvme.c (Results 1 – 25 of 67)
Revision Date Author Comments
# 78d277db 13-Sep-2022 riastradh <riastradh@NetBSD.org>

nvme(4): Don't leak memory for queues on every resume.


# fdd0974f 30-Aug-2022 riastradh <riastradh@NetBSD.org>

nvme(4): Actually check if bp is null as commented previously.

I had tested this change, but forgot to amend the commit before
exporting to CVS.


# ecfcf4d9 30-Aug-2022 riastradh <riastradh@NetBSD.org>

nvme(4): If bp is null or bp->b_ci is not assigned, use curcpu().

curcpu() might be stale by the time we're done, but it's still safe
to pass it to cpu_index, and this is just used as a best-effort

nvme(4): If bp is null or bp->b_ci is not assigned, use curcpu().

curcpu() might be stale by the time we're done, but it's still safe
to pass it to cpu_index, and this is just used as a best-effort
mechanism to keep I/O on queues handled by the same CPU.

bp is not always provided, and bp->b_ci is not always assigned,
e.g. when dumping. (If bp->b_ci is supposed to be always assigned,
then we need to audit all the paths into it to assign it in those
where it's not.)

Fixes dump on nvme.

show more ...


# 343eb2dd 20-Aug-2022 riastradh <riastradh@NetBSD.org>

nvme(4): Read cqe flags and cid in that order.


# 8b656bd1 15-Aug-2022 riastradh <riastradh@NetBSD.org>

nvme(4): KASSERT(A && B) -> KASSERT(A); KASSERT(B)


# 4112efb4 14-Aug-2022 jmcneill <jmcneill@NetBSD.org>

nvme: Make sure that q_ccb_list is always accessed with the q lock held.


# 1796c0de 31-Jul-2022 mlelstv <mlelstv@NetBSD.org>

The namespace id is a 32bit value, in particular the "all namespaces" value
for global commands is 0xffffffff. While the driver only supports 16bit
numbers (device minor & 0xffff), we need to use the

The namespace id is a 32bit value, in particular the "all namespaces" value
for global commands is 0xffffffff. While the driver only supports 16bit
numbers (device minor & 0xffff), we need to use the full value for pass
through commands.

This fixes e.g. logpage requests on the controller level.

show more ...


# e19f86ea 07-May-2022 skrll <skrll@NetBSD.org>

Add support for Apple silicon NVME. Ported from OpenBSD.


# 992cfc6e 16-Nov-2021 skrll <skrll@NetBSD.org>

Trailing whitespace


# beecddb6 07-Aug-2021 thorpej <thorpej@NetBSD.org>

Merge thorpej-cfargs2.


# 6831be28 29-May-2021 riastradh <riastradh@NetBSD.org>

nvme(4): Move disestablishment of admin q interrupt to nvme_detach.

Nothing re-established this after suspend/resume, so attempting
suspend/resume/suspend would crash, and presumably we would miss
i

nvme(4): Move disestablishment of admin q interrupt to nvme_detach.

Nothing re-established this after suspend/resume, so attempting
suspend/resume/suspend would crash, and presumably we would miss
interrupts after resume. This keeps the establish/disestablish more
symmetric in attach/detach.

show more ...


# 63671591 29-May-2021 riastradh <riastradh@NetBSD.org>

nvme(4): Add suspend/resume, derived from OpenBSD.


# 3bee0c11 24-Apr-2021 thorpej <thorpej@NetBSD.org>

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass a

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

show more ...


# a3822310 27-Dec-2020 jmcneill <jmcneill@NetBSD.org>

Zero DMA memory after load, and add PREREAD sync op after to ensure it is visible


# ff2162d4 04-Dec-2020 kardel <kardel@NetBSD.org>

PR kern/55839:
handle multiple nvme_rescan()s correctly by doing the
name-space identify only once per nsid.

fixes issue where modloading triggers multiple
rescans.


# 74a91195 10-Nov-2020 rin <rin@NetBSD.org>

One more fix for big-endian machines.

Now, ld(4) at nvme(4) works perfectly for aarch64eb!

Tested on ROCKPro64 and qemu-system-aarch64.


# 11851ae0 24-Sep-2020 ryo <ryo@NetBSD.org>

no need to swap pt.cmd.cdwXX at nvme_set_number_of_queues(). cmd.cdwXX will be swapped in nvme_pt_fill().


# 475b491c 22-Sep-2020 kardel <kardel@NetBSD.org>

PR kern/55674:
move name space availability check from ld_nvme.c:ld_nvme_attach()
to nvme.c:nvme_rescan().
this avoids allocation of ld(4) instances for every possible
name space, even if it is n

PR kern/55674:
move name space availability check from ld_nvme.c:ld_nvme_attach()
to nvme.c:nvme_rescan().
this avoids allocation of ld(4) instances for every possible
name space, even if it is not usable. it also reduces the device
node flood generated from that strategy.

show more ...


# 4386d54e 28-Jul-2020 jdolecek <jdolecek@NetBSD.org>

say what is not configured in nvme_print()


# d47800f0 07-Apr-2020 ryo <ryo@NetBSD.org>

avoid "panic: LOCKDEBUG: Mutex error: rw_vector_enter,309: spin lock held"

ok nonaka@. thanks


# e226ee44 11-Nov-2019 nonaka <nonaka@NetBSD.org>

nvme(4): Use the SET_FEATURES command to get the number of allocated queues.


# 04791bbc 26-Sep-2019 nonaka <nonaka@NetBSD.org>

nvme(4): Don't attach the device, if namespace not found.


# 52da1227 20-Sep-2019 nonaka <nonaka@NetBSD.org>

Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().

A new completion queue entry check incorrectly determined that there was
a Completion Queue entry for a command that was not su

Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().

A new completion queue entry check incorrectly determined that there was
a Completion Queue entry for a command that was not submitted.

Fix PR kern/54275, PR kern/54503, PR kern/54532.

show more ...


# 6eeae01b 28-Jun-2019 jmcneill <jmcneill@NetBSD.org>

Fix a performance issue where one busy queue can starve all other queues.

In normal operations with multiple queues, the nvme driver will attempt
to schedule I/O requests on the submitting CPU. This

Fix a performance issue where one busy queue can starve all other queues.

In normal operations with multiple queues, the nvme driver will attempt
to schedule I/O requests on the submitting CPU. This breaks down when any
one of the queues becomes full; the driver returns EAGAIN to the disk
layer, which causes the disk layer to stop submitting more requests until
the blocked request is consumed. When space becomes available in the full
queue, it pulls the next buffer from the bufq and fills the queue again,
until finally hitting EAGAIN and preventing other queues from processing
requests.

Two changes here to fix the problem:

- When processing requests from the bufq, attempt to assign them to the
queue associated with the CPU that originated the request.
- If that queue is busy, try to find another queue with available space
before returning EAGAIN. This way, only when all queues are full will
the disk layer stop submitting more requests.

Now for some real numbers. On a Rockchip RK3399 board (6 CPUs), with 6
concurrent readers:

Old code:
4294967296 bytes transferred in 52.420 secs (81933752 bytes/sec)
4294967296 bytes transferred in 53.969 secs (79582117 bytes/sec)
4294967296 bytes transferred in 55.391 secs (77539082 bytes/sec)
4294967296 bytes transferred in 55.649 secs (77179595 bytes/sec)
4294967296 bytes transferred in 56.102 secs (76556402 bytes/sec)
4294967296 bytes transferred in 72.901 secs (58915066 bytes/sec)

New code:
4294967296 bytes transferred in 37.171 secs (115546186 bytes/sec)
4294967296 bytes transferred in 37.611 secs (114194445 bytes/sec)
4294967296 bytes transferred in 37.655 secs (114061009 bytes/sec)
4294967296 bytes transferred in 38.247 secs (112295534 bytes/sec)
4294967296 bytes transferred in 38.496 secs (111569183 bytes/sec)
4294967296 bytes transferred in 38.595 secs (111282997 bytes/sec)

show more ...


# 88e15702 14-Jun-2019 mrg <mrg@NetBSD.org>

in nvme_attach() when creating the admin queue to probe the device info,
and also in nvme_dmamem_alloc(), allow as many DMA segment as would be
maximally needed for the size, rather than hard coding

in nvme_attach() when creating the admin queue to probe the device info,
and also in nvme_dmamem_alloc(), allow as many DMA segment as would be
maximally needed for the size, rather than hard coding '2' for the form
and '1' for the latter.

now ld@nvme on i386 doesn't crash and i see at least 1.3GB/sec.

show more ...


123