hysteresis for CAM_RESRC_UNAVAIL

Scott Long scottl at samsco.org
Tue Sep 26 15:13:42 PDT 2006


mjacob at freebsd.org wrote:
> 
> This showed up on one of the lists- we just retrt BUSY and 
> CAM_RESRC_UNAVAIL right away.
> 
> Below is a patch where I added a half second delay between retries. Does 
> this seem okay and/or should it be longer delays as the timeout count 
> goes down? Should BUSY be included?
> 
> Index: cam_periph.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/cam/cam_periph.c,v
> retrieving revision 1.62
> diff -u -r1.62 cam_periph.c
> --- cam_periph.c    24 May 2006 15:22:21 -0000    1.62
> +++ cam_periph.c    26 Sep 2006 15:54:52 -0000
> @@ -1699,6 +1699,12 @@
>          }
>          break;
>      case CAM_RESRC_UNAVAIL:
> +        /*
> +         * Wait a half second for the resource shortage to abate.
> +         */
> +        relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT;
> +        timeout = 500;
> +        /* FALLTHROUGH */
>      case CAM_BUSY:
>          /* timeout??? */
>      default:

I think the intent here was to have some sort of an asynchronous 
"resource is now available" and "I'm no longer busy" mechanism, maybe 
via an AC_ message.  However, a think that the timeout that you're 
proposing is much better than the vacuum that is there now.

Scott


More information about the freebsd-scsi mailing list