From owner-svn-src-head@freebsd.org Fri Apr 15 23:15:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39BFEB101AB for ; Fri, 15 Apr 2016 23:15:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09F3C1653 for ; Fri, 15 Apr 2016 23:15:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ig0-x236.google.com with SMTP id g8so36449158igr.0 for ; Fri, 15 Apr 2016 16:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=O49mhmXD6/B/jEMVJs3A+JvkawOSrwt6LhvmJWws/TQ=; b=IcRE9b8Wq608a+Z8ukTkMbP1F10gGnbvRUSkLcZC3AGf130zaTW7Qjl7+z8R/e0mlP ijsUQdz7PnGUSqAxXsLnYJx2Il+rf4gBDDRZgTvspwX4H7DE3fzCVA2QNyul+EEdQAL4 dfnzqyoNRup2stsFdOTMmXSB16tJDgATfPaKvB3nLp0Ge0LCyTNxOPuHMOV4BYHekp2v DyrCoK8P9/4xwbozWLVk2VntHgK7cfLl6mbSQY4BfjiqX0wCIim4pVcxOANvOgyP+lzo xJc3vUWSjQ8NyeOwYk0d+N50n9ynymgQfDQUiTosSXmLvgmo0v3/3C8O5vovHkPJfRPv zHEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=O49mhmXD6/B/jEMVJs3A+JvkawOSrwt6LhvmJWws/TQ=; b=Gb0DA3KkVwUafO5MTkCH9f8Fqv0/4UXvQXVz5oRlb/TCEqN1bofHm1bHfH4l3Iz6aC rSstVMd7K2pUjre7WmM52ZiR6c0Wt4m/K3lf/pVLZHdB2V5vFgmyT1sf3sC31Mb2Ij+v AY5//dAFwP0U/7ug1MpPvI0Wq6OVashZ6968Abp7hVtXwGA7lD8O/8/AsCsAfVAx73Ex 3rqAh/n9Bdmm6RytpFuMsIID/4uyge/CGcfz5vznQiAMPU8uytL5nEvly/CmAJ1Y7l2g MMyx4dBw3JHj0Ov1NWG4e9zHErsCJ5TBVWncrOUO/GXpY1NNkUsZzEfn970qkDUvKaPS 40bw== X-Gm-Message-State: AOPr4FVhkIWwQH8qG0M4X5SLpsJMDVACaqiJ1Mb9HWlHZwbyObVVCD+PLa2WbqtQIY8itHmOw5UMxSE10Qn6aQ== MIME-Version: 1.0 X-Received: by 10.50.67.113 with SMTP id m17mr7527406igt.52.1460762119228; Fri, 15 Apr 2016 16:15:19 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.79.104.197 with HTTP; Fri, 15 Apr 2016 16:15:19 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201604142213.u3EMDklN061064@repo.freebsd.org> <65ACB63B-ACDF-4552-BDA9-40FB028EB0D6@bsdimp.com> Date: Fri, 15 Apr 2016 17:15:19 -0600 X-Google-Sender-Auth: Ez80FeEPv3mM4ig8VF63JQo6IXc Message-ID: Subject: Re: svn commit: r298011 - head/sys/cam/ata From: Warner Losh To: Dmitry Morozovsky Cc: Ronald Klop , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 23:15:20 -0000 On Fri, Apr 15, 2016 at 3:45 PM, Dmitry Morozovsky 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 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 > 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 *** > ------------------------------------------------------------------------ >