The branch main has been updated by cperciva:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=bad42df9bfcb8d77bdec04ea1f9acd874c762740

commit bad42df9bfcb8d77bdec04ea1f9acd874c762740
Author:     Colin Percival <cperc...@freebsd.org>
AuthorDate: 2021-09-05 19:48:43 +0000
Commit:     Colin Percival <cperc...@freebsd.org>
CommitDate: 2021-09-05 19:48:43 +0000

    Add some nvme initialization routines to TSLOG
    
    About 335 ms of EC2 instance boot time is being spent here.
---
 sys/dev/nvme/nvme_ctrlr.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index 52eab6254d89..833bf328584a 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -407,6 +407,7 @@ nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr)
 {
        int err;
 
+       TSENTER();
        nvme_ctrlr_disable_qpairs(ctrlr);
 
        pause("nvmehwreset", hz / 10);
@@ -414,7 +415,9 @@ nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr)
        err = nvme_ctrlr_disable(ctrlr);
        if (err != 0)
                return err;
-       return (nvme_ctrlr_enable(ctrlr));
+       err = nvme_ctrlr_enable(ctrlr);
+       TSEXIT();
+       return (err);
 }
 
 void
@@ -1045,6 +1048,8 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting)
        uint32_t old_num_io_queues;
        int i;
 
+       TSENTER();
+
        /*
         * Only reset adminq here when we are restarting the
         *  controller after a reset.  During initialization,
@@ -1117,6 +1122,7 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting)
 
        for (i = 0; i < ctrlr->num_io_queues; i++)
                nvme_io_qpair_enable(&ctrlr->ioq[i]);
+       TSEXIT();
 }
 
 void
@@ -1124,6 +1130,8 @@ nvme_ctrlr_start_config_hook(void *arg)
 {
        struct nvme_controller *ctrlr = arg;
 
+       TSENTER();
+
        /*
         * Reset controller twice to ensure we do a transition from cc.en==1 to
         * cc.en==0.  This is because we don't really know what status the
@@ -1155,6 +1163,7 @@ fail:
 
        ctrlr->is_initialized = 1;
        nvme_notify_new_controller(ctrlr);
+       TSEXIT();
 }
 
 static void
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to