Re: [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-11-21 Thread Xiubo Li
On 2018/11/22 0:37, Mike Christie wrote: On 11/20/2018 11:37 PM, Xiubo Li wrote: [...] -is_running = list_empty(>cmdr_queue_entry); +is_running = test_bit(TCMU_CMD_BIT_INFLIGHT, >flags); se_cmd = cmd->se_cmd; if (is_running) { @@ -1289,7 +1319,6 @@ static int

Re: [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-11-21 Thread Mike Christie
On 11/20/2018 11:37 PM, Xiubo Li wrote: > [...] >>> -is_running = list_empty(>cmdr_queue_entry); >>> +is_running = test_bit(TCMU_CMD_BIT_INFLIGHT, >flags); >>> se_cmd = cmd->se_cmd; >>> if (is_running) { >>> @@ -1289,7 +1319,6 @@ static int tcmu_check_expired_cmd(int id, void

Re: [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-11-20 Thread Xiubo Li
On 2018/11/21 11:19, Mike Christie wrote: On 10/17/2018 02:54 AM, xiu...@redhat.com wrote: From: Xiubo Li [...] diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 9cd404a..00ed7bb 100644 --- a/drivers/target/target_core_user.c +++

Re: [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-11-20 Thread Mike Christie
On 10/17/2018 02:54 AM, xiu...@redhat.com wrote: > From: Xiubo Li > > Currently there has one cmd timeout timer and one qfull timer for > each udev, and whenever there has any new coming cmd it will update > the cmd timer or qfull timer. And for some corner case the timers > are always working

[PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-10-17 Thread xiubli
From: Xiubo Li Currently there has one cmd timeout timer and one qfull timer for each udev, and whenever there has any new coming cmd it will update the cmd timer or qfull timer. And for some corner case the timers are always working only for the ringbuffer's and full queue's newest cmd. That's