public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [linux-nvme:nvme-6.4-rc4-pull 5/5] drivers/nvme/host/core.c:1202:51: error: 'struct nvme_request' has no member named 'start_time'
@ 2023-05-30 21:27 kernel test robot
  2023-05-31  0:08 ` Uday Shankar
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-05-30 21:27 UTC (permalink / raw)
  To: Uday Shankar
  Cc: oe-kbuild-all, linux-nvme, Keith Busch, Hannes Reinecke,
	Christoph Hellwig

tree:   git://git.infradead.org/nvme.git nvme-6.4-rc4-pull
head:   f041d3b83aea7e76e4dfc6591954d6dfe506dbdb
commit: f041d3b83aea7e76e4dfc6591954d6dfe506dbdb [5/5] nvme: improve handling of long keep alives
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20230531/202305310532.V3y3hWXI-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add linux-nvme git://git.infradead.org/nvme.git
        git fetch --no-tags linux-nvme nvme-6.4-rc4-pull
        git checkout f041d3b83aea7e76e4dfc6591954d6dfe506dbdb
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/nvme/host/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305310532.V3y3hWXI-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/nvme/host/core.c: In function 'nvme_keep_alive_end_io':
>> drivers/nvme/host/core.c:1202:51: error: 'struct nvme_request' has no member named 'start_time'
    1202 |         unsigned long rtt = jiffies - nvme_req(rq)->start_time;
         |                                                   ^~


vim +1202 drivers/nvme/host/core.c

  1195	
  1196	static enum rq_end_io_ret nvme_keep_alive_end_io(struct request *rq,
  1197							 blk_status_t status)
  1198	{
  1199		struct nvme_ctrl *ctrl = rq->end_io_data;
  1200		unsigned long flags;
  1201		bool startka = false;
> 1202		unsigned long rtt = jiffies - nvme_req(rq)->start_time;
  1203		unsigned long delay = nvme_keep_alive_work_period(ctrl);
  1204	
  1205		/*
  1206		 * Subtract off the keepalive RTT so nvme_keep_alive_work runs
  1207		 * at the desired frequency.
  1208		 */
  1209		if (rtt <= delay) {
  1210			delay -= rtt;
  1211		} else {
  1212			dev_warn(ctrl->device, "long keepalive RTT (%u ms)\n",
  1213				 jiffies_to_msecs(rtt));
  1214			delay = 0;
  1215		}
  1216	
  1217		blk_mq_free_request(rq);
  1218	
  1219		if (status) {
  1220			dev_err(ctrl->device,
  1221				"failed nvme_keep_alive_end_io error=%d\n",
  1222					status);
  1223			return RQ_END_IO_NONE;
  1224		}
  1225	
  1226		ctrl->ka_last_check_time = jiffies;
  1227		ctrl->comp_seen = false;
  1228		spin_lock_irqsave(&ctrl->lock, flags);
  1229		if (ctrl->state == NVME_CTRL_LIVE ||
  1230		    ctrl->state == NVME_CTRL_CONNECTING)
  1231			startka = true;
  1232		spin_unlock_irqrestore(&ctrl->lock, flags);
  1233		if (startka)
  1234			queue_delayed_work(nvme_wq, &ctrl->ka_work, delay);
  1235		return RQ_END_IO_NONE;
  1236	}
  1237	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-nvme:nvme-6.4-rc4-pull 5/5] drivers/nvme/host/core.c:1202:51: error: 'struct nvme_request' has no member named 'start_time'
  2023-05-30 21:27 [linux-nvme:nvme-6.4-rc4-pull 5/5] drivers/nvme/host/core.c:1202:51: error: 'struct nvme_request' has no member named 'start_time' kernel test robot
@ 2023-05-31  0:08 ` Uday Shankar
  2023-05-31  4:01   ` Keith Busch
  0 siblings, 1 reply; 3+ messages in thread
From: Uday Shankar @ 2023-05-31  0:08 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, linux-nvme, Keith Busch, Hannes Reinecke,
	Christoph Hellwig

On Wed, May 31, 2023 at 05:27:59AM +0800, kernel test robot wrote:
> tree:   git://git.infradead.org/nvme.git nvme-6.4-rc4-pull
> head:   f041d3b83aea7e76e4dfc6591954d6dfe506dbdb
> commit: f041d3b83aea7e76e4dfc6591954d6dfe506dbdb [5/5] nvme: improve handling of long keep alives
> config: arm64-defconfig (https://download.01.org/0day-ci/archive/20230531/202305310532.V3y3hWXI-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 12.3.0
> reproduce (this is a W=1 build):
>         mkdir -p ~/bin
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git remote add linux-nvme git://git.infradead.org/nvme.git
>         git fetch --no-tags linux-nvme nvme-6.4-rc4-pull
>         git checkout f041d3b83aea7e76e4dfc6591954d6dfe506dbdb
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/nvme/host/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202305310532.V3y3hWXI-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/nvme/host/core.c: In function 'nvme_keep_alive_end_io':
> >> drivers/nvme/host/core.c:1202:51: error: 'struct nvme_request' has no member named 'start_time'
>     1202 |         unsigned long rtt = jiffies - nvme_req(rq)->start_time;
>          |                                                   ^~

My bad, I only tested this with CONFIG_NVME_MULTIPATH set, in which case
the field exists and we don't see the error. The following change should
fix this up. Keith, can you squash this with f041d3b83aea in nvme.git?

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 601dc5f9ac58..bf8d76de5299 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1197,7 +1197,7 @@ static enum rq_end_io_ret nvme_keep_alive_end_io(struct request *rq,
        struct nvme_ctrl *ctrl = rq->end_io_data;
        unsigned long flags;
        bool startka = false;
-       unsigned long rtt = jiffies - nvme_req(rq)->start_time;
+       unsigned long rtt = jiffies - (rq->deadline - rq->timeout);
        unsigned long delay = nvme_keep_alive_work_period(ctrl);

        /*


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [linux-nvme:nvme-6.4-rc4-pull 5/5] drivers/nvme/host/core.c:1202:51: error: 'struct nvme_request' has no member named 'start_time'
  2023-05-31  0:08 ` Uday Shankar
@ 2023-05-31  4:01   ` Keith Busch
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Busch @ 2023-05-31  4:01 UTC (permalink / raw)
  To: Uday Shankar
  Cc: kernel test robot, oe-kbuild-all, linux-nvme, Hannes Reinecke,
	Christoph Hellwig

On Tue, May 30, 2023 at 06:08:58PM -0600, Uday Shankar wrote:
> 
> My bad, I only tested this with CONFIG_NVME_MULTIPATH set, in which case
> the field exists and we don't see the error. The following change should
> fix this up. Keith, can you squash this with f041d3b83aea in nvme.git?

Folded in, thanks for the quick fix.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-31  4:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30 21:27 [linux-nvme:nvme-6.4-rc4-pull 5/5] drivers/nvme/host/core.c:1202:51: error: 'struct nvme_request' has no member named 'start_time' kernel test robot
2023-05-31  0:08 ` Uday Shankar
2023-05-31  4:01   ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox