Return-Path: Received: from smtp.nue.novell.com ([195.135.221.5]:35699 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755347AbdEEGMg (ORCPT ); Fri, 5 May 2017 02:12:36 -0400 Subject: Re: [PATCH 03/19] target: Avoid that aborting a command sporadically hangs To: Bart Van Assche , Nicholas Bellinger References: <20170504225102.8931-1-bart.vanassche@sandisk.com> <20170504225102.8931-4-bart.vanassche@sandisk.com> Cc: target-devel@vger.kernel.org, Christoph Hellwig , Andy Grover , David Disseldorp , stable@vger.kernel.org From: Hannes Reinecke Message-ID: Date: Fri, 5 May 2017 08:12:33 +0200 MIME-Version: 1.0 In-Reply-To: <20170504225102.8931-4-bart.vanassche@sandisk.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: On 05/05/2017 12:50 AM, Bart Van Assche wrote: > For several target drivers (e.g. ib_srpt and ib_isert) sleeping inside > transport_generic_free_cmd() causes RDMA completion processing to stall. > Hence only sleep inside this function if the (iSCSI) target driver > requires this. > > This patch avoids that messages similar to the following appear in the > kernel log: > > INFO: task kworker/u25:0:1013 blocked for more than 480 seconds. > Tainted: G W 4.10.0-rc7-dbg+ #3 > "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > kworker/u25:0 D 0 1013 2 0x00000000 > Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] > Call Trace: > __schedule+0x2da/0xb00 > schedule+0x38/0x90 > schedule_timeout+0x2fe/0x640 > wait_for_completion+0xfe/0x160 > transport_generic_free_cmd+0x2e/0x80 [target_core_mod] > srpt_send_done+0x59/0x9f [ib_srpt] > __ib_process_cq+0x4b/0xd0 [ib_core] > ib_cq_poll_work+0x1b/0x60 [ib_core] > process_one_work+0x208/0x6a0 > worker_thread+0x49/0x4a0 > kthread+0x107/0x140 > ret_from_fork+0x2e/0x40 > > Signed-off-by: Bart Van Assche > Cc: Hannes Reinecke > Cc: Christoph Hellwig > Cc: Andy Grover > Cc: David Disseldorp > Cc: > --- > drivers/target/target_core_transport.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.com +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg GF: F. Imend�rffer, J. Smithard, D. Upmanyu, G. Norton HRB 21284 (AG N�rnberg)