lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 1 May 2012 19:26:34 +0200
From:	Andi Shyti <andi.shyti@...il.com>
To:	"Stephen M. Cameron" <scameron@...rdog.cce.hp.com>
Cc:	james.bottomley@...senpartnership.com, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, stephenmcameron@...il.com,
	thenzl@...hat.com, akpm@...ux-foundation.org,
	mikem@...rdog.cce.hp.com
Subject: Re: [PATCH 07/17] hpsa: do not give up retry of driver cmds after
 only 3 retries

Hi,

> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -1380,17 +1380,24 @@ static void hpsa_scsi_do_simple_cmd_core_if_no_lockup(struct ctlr_info *h,
>  	}
>  }
>  
> +#define MAX_DRIVER_CMD_RETRIES 25
>  static void hpsa_scsi_do_simple_cmd_with_retry(struct ctlr_info *h,
>  	struct CommandList *c, int data_direction)
>  {
> -	int retry_count = 0;
> +	int backoff_time = 10, retry_count = 0;
>  
>  	do {
>  		memset(c->err_info, 0, sizeof(*c->err_info));
>  		hpsa_scsi_do_simple_cmd_core(h, c);
>  		retry_count++;
> +		if (retry_count > 3) {
> +			msleep(backoff_time);

for 10ms isn't it better to avoid using msleep?

Andi

> +			if (backoff_time < 1000)
> +				backoff_time *= 2;
> +		}
>  	} while ((check_for_unit_attention(h, c) ||
> -			check_for_busy(h, c)) && retry_count <= 3);
> +			check_for_busy(h, c)) &&
> +			retry_count <= MAX_DRIVER_CMD_RETRIES);
>  	hpsa_pci_unmap(h->pdev, c, 1, data_direction);
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ