Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Apr 2016 17:15:19 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        Ronald Klop <ronald-lists@klop.ws>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, src-committers <src-committers@freebsd.org>, Warner Losh <imp@freebsd.org>
Subject:   Re: svn commit: r298011 - head/sys/cam/ata
Message-ID:  <CANCZdfrPrkKf8wX7O%2BkQm1y3iQYTzhJgufLmLS_BBLwWRvp9fw@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.1604160044230.76365@woozle.rinet.ru>
References:  <201604142213.u3EMDklN061064@repo.freebsd.org> <op.yfyvn9epkndu52@sjakie.klop.ws> <65ACB63B-ACDF-4552-BDA9-40FB028EB0D6@bsdimp.com> <alpine.BSF.2.00.1604160044230.76365@woozle.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 15, 2016 at 3:45 PM, Dmitry Morozovsky <marck@rinet.ru> wrote:

> On Fri, 15 Apr 2016, Warner Losh wrote:
>
> > A shorter timeout dramatically cuts the length of time that the
> > queue has to be frozen for error recovery. This allows one,
> > in theory, to recover the system more quickly after a drive
> > goes off into the weeds.
>
> May be make some more generic changes?  Could we detect SSD vs spinning
> disk vs
> unknown and set timeouts accordigly to the nature of the underlying device?


I suppose we could, but keep in mind that this code is part of what helps
us at work
to more quickly detect and recover from spinning disk failure. The 60s
value has
always been nuts since even the largest caches on the slowest drives can be
flushed
in under a second. If there are different defaults for the different drives
types and
performance profiles, this is almost certainly not going to be one of the
ones that
would be different.

Warner


> >
> > Warner
> >
> >
> > > On Apr 15, 2016, at 9:23 AM, Ronald Klop <ronald-lists@klop.ws> wrote:
> > >
> > > Hello,
> > >
> > > Out of curiosity, what are these big problems? Broken device or other
> things (timeouts/triggers/full queues) going on in the kernel?
> > >
> > > Regards,
> > > Ronald.
> > >
> > >
> > > On Fri, 15 Apr 2016 00:13:46 +0200, Warner Losh <imp@freebsd.org>
> wrote:
> > >
> > >> Author: imp
> > >> Date: Thu Apr 14 22:13:46 2016
> > >> New Revision: 298011
> > >> URL: https://svnweb.freebsd.org/changeset/base/298011
> > >> erLog:
> > >>  Add a comment about why the timeout for flush was lowered to 5s.
> > >>
> > >> Modified:
> > >>  head/sys/cam/ata/ata_da.c
> > >>
> > >> Modified: head/sys/cam/ata/ata_da.c
> > >>
> ==============================================================================
> > >> --- head/sys/cam/ata/ata_da.c      Thu Apr 14 22:13:44 2016
> (r298010)
> > >> +++ head/sys/cam/ata/ata_da.c      Thu Apr 14 22:13:46 2016
> (r298011)
> > >> @@ -912,6 +912,11 @@ adadump(void *arg, void *virtual, vm_off
> > >>    if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
> > >>            xpt_setup_ccb(&ccb.ccb_h, periph->path,
> CAM_PRIORITY_NORMAL);
> > >> +          /*
> > >> +           * Tell the drive to flush its intenral cache. if we
> > >> +           * can't flush in 5s we have big problems. No need to
> > >> +           * wait the default 60s to detect problems.
> > >> +           */
> > >>            ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
> > >>            cam_fill_ataio(&ccb.ataio,
> > >>                                0,
> > >> _______________________________________________
> > >> svn-src-all@freebsd.org mailing list
> > >> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> > >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org
> "
> >
> >
>
> --
> Sincerely,
> D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
> [ FreeBSD committer:                                 marck@FreeBSD.org ]
> ------------------------------------------------------------------------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
> ------------------------------------------------------------------------
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrPrkKf8wX7O%2BkQm1y3iQYTzhJgufLmLS_BBLwWRvp9fw>