From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965445AbXCSXJO (ORCPT ); Mon, 19 Mar 2007 19:09:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965417AbXCSXJO (ORCPT ); Mon, 19 Mar 2007 19:09:14 -0400 Received: from mail0.lsil.com ([147.145.40.20]:47085 "EHLO mail0.lsil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965407AbXCSXJN convert rfc822-to-8bit (ORCPT ); Mon, 19 Mar 2007 19:09:13 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: [PATCH] scsi: megaraid_sas - throttle io if cmds are in riskof being timed-out Date: Mon, 19 Mar 2007 17:08:54 -0600 Message-ID: <0631C836DBF79F42B5A60C8C8D4E82299C15B2@NAMAIL2.ad.lsil.com> In-Reply-To: <1174083775.3519.54.camel@mulgrave.il.steeleye.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] scsi: megaraid_sas - throttle io if cmds are in riskof being timed-out Thread-Index: AcdoGaj66VETsNluSn+qXWuizMyCrgCYcWig From: "Patro, Sumant" To: "James Bottomley" Cc: , , , "Kolli, Neela" , "Yang, Bo" X-OriginalArrivalTime: 19 Mar 2007 23:08:55.0844 (UTC) FILETIME=[91876640:01C76A7B] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Thank you James. I will submit new patch that will throttle (if required) from eh_timed_out call back. Regards, Sumant -----Original Message----- From: James Bottomley [mailto:James.Bottomley@SteelEye.com] Sent: Friday, March 16, 2007 3:23 PM To: Patro, Sumant Cc: akpm@osdl.org; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Kolli, Neela; Yang, Bo Subject: Re: [PATCH] scsi: megaraid_sas - throttle io if cmds are in riskof being timed-out On Thu, 2007-03-01 at 13:29 -0800, Sumant Patro wrote: > Driver to throttle IO to reduce risk of OS timing out cmds. > > Implemented a circular queue to keep track of pending OS cmds in FW. > This queue is periodically (every 10 sec) checked by a timer routine. > If there is any cmd that is in risk of getting timed-out by the OS, > the host->can_queue is reduced to 16 and MEGASAS_FW_BUSY flag is set. > The host->can_queue will be restored to default value when the > following two conditions are met : 5 secs has elapsed and the # of > outstanding cmds in FW is less than 17. > Also increased the per cmd timeout to 120*HZ from 90*HZ. OK, this is still not nice. What you need to be doing is intercepting the timeout before it fires (and quiesces the machine). Currently the eh_timed_out() callback is only exposed to transport classes, I'll put it back into the host template and then you can use it. James