From nobody Fri Jan 21 02:26:48 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D44E11968BDA; Fri, 21 Jan 2022 02:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jg3D83rqDz4ny8; Fri, 21 Jan 2022 02:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642732008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CRTyFW68zx2tqO8wrcJ4TZYetfvnugrwqX5bSih/o8s=; b=iMRsRIZAGrQ15Aedsb0sTNo73rmb/aowSKxTrppih+sEayiyJAkdWeyorsExMd7w90Qmy2 +WXm0Ds6JMFuNuZ99VbKkaRVC++c+9+svKcQpWmibUBORCLJAeH2mizELVf1UDEsRDNuzm k8Mta25YTrZamEDMvziC4cVYvYPnTQgU90Pq2VqNoWuej7zfNoOqKZ/AEWn5mamfI7OSvx wvF+AinBAC0HoHEeU5OChhr5aqFNfTRxENNqZgk8dgSQkrkpJpn0CQUIyT3jUXhDxlBhNE q+ofogPxD3H0Gh2/7F2ICwd+EqPw5BHDfDQ2hHJ5PcrS+GhBqbsnsA8PEdvQNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4994B13B9F; Fri, 21 Jan 2022 02:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20L2Qmtw001131; Fri, 21 Jan 2022 02:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20L2Qmmw001130; Fri, 21 Jan 2022 02:26:48 GMT (envelope-from git) Date: Fri, 21 Jan 2022 02:26:48 GMT Message-Id: <202201210226.20L2Qmmw001130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: eb4d2eab0719 - stable/13 - Add some nvme initialization routines to TSLOG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb4d2eab0719744a9926f596dd4a20a3559af67c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642732008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CRTyFW68zx2tqO8wrcJ4TZYetfvnugrwqX5bSih/o8s=; b=m6Sh6pjl4V559xyVQUyzJGs2tzWNJ24j0gtWa9wbthn/B11ZmZ/We+e8t3OLwhv0jGDS0O SVTsf5eRY4Nk9nDQQHLC90ew4NR0K/WOT5FGwZX14XZljDtJrmqespNbJWjGOFi7PEh2gG wsNdcRWSie25Z/87+jxVKAZDLGO5k9VnwsL/AuGtHodkqkejnEi5IC+iqjBKGGx70Z2D2D 4DELX/uLx9u82K9g/p/u5lE/CnHeb/b87XITCbfJz+/1CkMtBZq0o/gXQVHL01uBGvtc6w OVu42lpLNWnpaBnjTjih5XD+hwVAwV3pppaKcHzUost85LXkLAFSQR6xAo0DTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642732008; a=rsa-sha256; cv=none; b=ZHOBVOs3wLsMs6s2CUIxTl+LyKW7aKOU4holr2lFYAEQdb4aYjUYghhLAjg7gwUmDG7BxF yBvF21iu49Cx4XiA/e/DfgX54BKGLWafMlskZzhxpJe4PXKX+OgNNCcXsMfik3ESVi/sH5 4NRWNkeksEeaEeqZQK4xk04thcsQ6RmAe5v5RHoCLX7ZG1uWHGcVS2SwPDCtcJ8629YSaK LHPmU55GGudjS5B/qTfvexyI2pTHAwLIiOIJKlryKS1kDTUDRVxBwqafi9CDl2MNPlpkWe JMbo+7S9pKUzHKsDo73gGQsqCpCFs23jAvaGUvS2oB2ruSya9lTxveT2jEHKVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=eb4d2eab0719744a9926f596dd4a20a3559af67c commit eb4d2eab0719744a9926f596dd4a20a3559af67c Author: Colin Percival AuthorDate: 2021-09-05 19:48:43 +0000 Commit: Alexander Motin CommitDate: 2022-01-21 02:07:30 +0000 Add some nvme initialization routines to TSLOG About 335 ms of EC2 instance boot time is being spent here. (cherry picked from commit bad42df9bfcb8d77bdec04ea1f9acd874c762740) --- 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