From owner-freebsd-drivers@FreeBSD.ORG Tue Nov 19 19:20:30 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F350A4B6 for ; Tue, 19 Nov 2013 19:20:29 +0000 (UTC) Received: from am1outboundpool.messaging.microsoft.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 54FE625B2 for ; Tue, 19 Nov 2013 19:20:28 +0000 (UTC) Received: from mail107-am1-R.bigfish.com (10.3.201.245) by AM1EHSOBE026.bigfish.com (10.3.207.148) with Microsoft SMTP Server id 14.1.225.22; Tue, 19 Nov 2013 19:20:26 +0000 Received: from mail107-am1 (localhost [127.0.0.1]) by mail107-am1-R.bigfish.com (Postfix) with ESMTP id 3F50C1000AB for ; Tue, 19 Nov 2013 19:20:26 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.240.101; KIP:(null); UIP:(null); IPV:NLI; H:BL2PRD0510HT001.namprd05.prod.outlook.com; RD:none; EFVD:NLI X-SpamScore: 5 X-BigFish: VPS5(z5c5oz1b0aLc85fhzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h1d1ah1d2ah1fc6hzz18c673hz2fh109h2a8h839hd24hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1bceh224fh1d07h1d0ch1d2eh1d3fh1dc1h1de9h1dfeh1dffh1e1dh1fe8h1ff5h20f0h2216h22d0h9a9j1155h) Received-SPF: pass (mail107-am1: domain of juniper.net designates 157.56.240.101 as permitted sender) client-ip=157.56.240.101; envelope-from=jelliott@juniper.net; helo=BL2PRD0510HT001.namprd05.prod.outlook.com ; .outlook.com ; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(69224002)(199002)(189002)(80022001)(46102001)(2656002)(31966008)(83322001)(74662001)(56776001)(66066001)(19580395003)(50986001)(65816001)(47446002)(74502001)(47976001)(54316002)(87936001)(81342001)(87266001)(74366001)(4396001)(47736001)(74316001)(49866001)(81816001)(81686001)(80976001)(81542001)(56816003)(76176001)(51856001)(76576001)(77982001)(79102001)(54356001)(76796001)(74876001)(76786001)(74706001)(15975445006)(76482001)(83072001)(53806001)(15202345003)(63696002)(77096001)(69226001)(59766001)(33646001)(85306002)(14773001)(24736002); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR05MB192; H:BY2PR05MB190.namprd05.prod.outlook.com; CLIP:66.129.239.12; FPR:; RD:InfoNoRecords; A:1; MX:1; LANG:en; Received: from mail107-am1 (localhost.localdomain [127.0.0.1]) by mail107-am1 (MessageSwitch) id 1384888823284139_16050; Tue, 19 Nov 2013 19:20:23 +0000 (UTC) Received: from AM1EHSMHS004.bigfish.com (unknown [10.3.201.230]) by mail107-am1.bigfish.com (Postfix) with ESMTP id 412DF380151 for ; Tue, 19 Nov 2013 19:20:23 +0000 (UTC) Received: from BL2PRD0510HT001.namprd05.prod.outlook.com (157.56.240.101) by AM1EHSMHS004.bigfish.com (10.3.207.104) with Microsoft SMTP Server (TLS) id 14.16.227.3; Tue, 19 Nov 2013 19:20:23 +0000 Received: from BY2PR05MB192.namprd05.prod.outlook.com (10.242.39.149) by BL2PRD0510HT001.namprd05.prod.outlook.com (10.255.100.36) with Microsoft SMTP Server (TLS) id 14.16.383.1; Tue, 19 Nov 2013 19:20:21 +0000 Received: from BY2PR05MB190.namprd05.prod.outlook.com (10.242.39.139) by BY2PR05MB192.namprd05.prod.outlook.com (10.242.39.149) with Microsoft SMTP Server (TLS) id 15.0.820.5; Tue, 19 Nov 2013 19:20:19 +0000 Received: from BY2PR05MB190.namprd05.prod.outlook.com ([169.254.7.215]) by BY2PR05MB190.namprd05.prod.outlook.com ([169.254.7.229]) with mapi id 15.00.0820.005; Tue, 19 Nov 2013 19:20:18 +0000 From: Jay Elliott To: "freebsd-drivers@freebsd.org" Subject: usage of the standby immediate command in the ATA driver Thread-Topic: usage of the standby immediate command in the ATA driver Thread-Index: Ac7lXGFKyOPB1j98Sy6U2b+jbA3SCw== Date: Tue, 19 Nov 2013 19:20:18 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [66.129.239.12] x-forefront-prvs: 0035B15214 MIME-Version: 1.0 X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.16 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2013 19:20:30 -0000 Hi freebsd-drivers, I'm looking into some issues regarding filesystem corruption with my employ= er's FreeBSD6-based kernel. We've consulted with the vendor that supplies = our SSDs, and they've told us to make sure that our ATA driver is sending t= he ATA_STANDBY_IMMEDIATE command to the drive during shutdown after sending= the ATA_FLUSHCACHE command. I've looked into the FreeBSD9.2-version of th= e ata driver to see if this behavior has been changed, but as far as I can = tell it also does not send the ATA_STANDBY_IMMEDATE command from ad_shutdow= n. Does anybody know if this is intentional? I'm inclined to trust newer vers= ions of FreeBSD more than my hardware vendor, but I want to make sure this = isn't a mistake. Also, does anybody know if this behavior has changed in FreeBSD 10? I've b= een looking into it myself, but the new version of the ATA driver has chang= ed a lot from the 9.2 version and I'm having some difficulties understandin= g it. Thanks for all your help, Jay From owner-freebsd-drivers@FreeBSD.ORG Tue Nov 19 19:36:41 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F025E77F for ; Tue, 19 Nov 2013 19:36:41 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6BFA26A1 for ; Tue, 19 Nov 2013 19:36:41 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rAJJaeEp067201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Nov 2013 11:36:40 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rAJJaeTO067200; Tue, 19 Nov 2013 11:36:40 -0800 (PST) (envelope-from jmg) Date: Tue, 19 Nov 2013 11:36:40 -0800 From: John-Mark Gurney To: Jay Elliott Subject: Re: usage of the standby immediate command in the ATA driver Message-ID: <20131119193640.GF2279@funkthat.com> Mail-Followup-To: Jay Elliott , "freebsd-drivers@freebsd.org" References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 19 Nov 2013 11:36:41 -0800 (PST) Cc: "freebsd-drivers@freebsd.org" X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2013 19:36:42 -0000 Jay Elliott wrote this message on Tue, Nov 19, 2013 at 19:20 +0000: > Hi freebsd-drivers, > > I'm looking into some issues regarding filesystem corruption with my employer's FreeBSD6-based kernel. We've consulted with the vendor that supplies our SSDs, and they've told us to make sure that our ATA driver is sending the ATA_STANDBY_IMMEDIATE command to the drive during shutdown after sending the ATA_FLUSHCACHE command. I've looked into the FreeBSD9.2-version of the ata driver to see if this behavior has been changed, but as far as I can tell it also does not send the ATA_STANDBY_IMMEDATE command from ad_shutdown. It shouldn't be necessary... The FLUSHCACHE command is documented as (from T13/1532D Volume 1 Revision 4 Page 111, section 6.13.8): This command is used by the host to request the device to flush the write cache. If there is data in the write cache, that data shall be written to the media. The BSY bit shall remain set to one until all data has been successfully written or an error occurs. If your SSD isn't writing out all the data upon completion of the _FLUSHCACHE command, you will also run into issues w/ file system corruption if/when your server looses power at the wrong moment... this would be especially bad for ZFS... An issue w/ issuing the STANDBY IMMEDIATE command is that not all drives support it, so we'd have to add the code to detect if a drive supports it before it's use... Also, it's only description in the specification is: This command causes the device to immediately enter the Standby mode. STANDBY IMMEDIATE says nothing about making sure data is on stable storage or anything... I'd recommend you tell your SSD vendor to fix their firmware or switch to a different vendor... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-drivers@FreeBSD.ORG Wed Nov 20 09:36:09 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E171B50 for ; Wed, 20 Nov 2013 09:36:09 +0000 (UTC) Received: from mx1.providna.com.ua (mx1.providna.com.ua [77.222.137.42]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 31ACE2AD9 for ; Wed, 20 Nov 2013 09:36:07 +0000 (UTC) Received: from localhost (locahost.providna.com.ua [127.0.0.1]) by kv-relay-01.providna.corp.loc (Providna) with ESMTP id 9C9EE5C126 for ; Wed, 20 Nov 2013 11:08:26 +0200 (EET) Received: from ws (checkmail-01.providna.corp.loc [172.17.48.4]) by kv-relay-01.providna.corp.loc (Providna) with ESMTP id 8F3145C0D6 for ; Wed, 20 Nov 2013 11:08:26 +0200 (EET) Received: from 172.17.28.0 [172.17.28.101] by ws - Websense Email Security (6.1.0); Wed, 20 Nov 2013 11:08:27 +0200 Received: from EXMB.providna.Corp.loc ([fe80::eccf:3248:19f8:3b69]) by EXCA01-01.providna.Corp.loc ([::1]) with mapi; Wed, 20 Nov 2013 11:08:24 +0200 From: =?windows-1251?B?0PPk5e3q7iDR5fDjs+kgz+Di6+7i6Pf=?= To: "'freebsd-drivers@freebsd.org'" Date: Wed, 20 Nov 2013 11:07:55 +0200 Subject: cpufreq - dev.cpu.0.freq not present in the system Thread-Topic: cpufreq - dev.cpu.0.freq not present in the system Thread-Index: Ac7l0BJRo4tnmef7R2Ktx0CPWt+reA== Message-ID: Accept-Language: ru-RU, uk-UA Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: ru-RU, uk-UA x-tm-as-product-ver: SMEX-10.2.0.1135-7.000.1014-20304.002 x-tm-as-result: No--39.469900-8.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No MIME-Version: 1.0 X-SEF-Processed: 6_1_0_100__2013_11_20_11_08_27 X-Virus-Scanned: ClamAV using ClamSMTP Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.16 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2013 09:36:09 -0000 Hello please help to solve the problem of lack of =93dev.cpu.0.freq=94 on my syst= em. Server =3D =93HP DL320G3=94 System =3D FreeBSD 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 = 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERI= C amd64 # sysctl -a | grep dev | grep freq device cpufreq dev.cpu.0.freq_levels: 3591/-1 3142/-1 2693/-1 2244/-1 1795/-1 1346/-1 897/= -1 448/-1 dev.p4tcc.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1= 2500/-1 1250/-1 dev.p4tcc.1.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1= 2500/-1 1250/-1 dev.cpufreq.0.%driver: cpufreq dev.cpufreq.0.%parent: cpu0 dev.cpufreq.1.%driver: cpufreq dev.cpufreq.1.%parent: cpu1 # kldstat -vv | grep cpu 32 cpu/acpi_perf 105 cpu/ichss 23 acpi/cpu 461 cpu/p4tcc 460 cpu/hwpstate 459 cpu/est 458 cpu/powernow 418 legacy/cpu 36 cpu/acpi_throttle 384 cpu/cpufreq # dmesg =85 est0: on cpu0 est: CPU supports Enhanced Speedstep, but is not recognized. est: cpu_vendor GenuineIntel, msr 122d0000122d device_attach: est0 attach returned 6 p4tcc0: on cpu0 est1: on cpu1 est: CPU supports Enhanced Speedstep, but is not recognized. est: cpu_vendor GenuineIntel, msr 122d0000122d device_attach: est1 attach returned 6 p4tcc1: on cpu1 =85 # powerd -v powerd: unable to determine AC line status powerd: error reading current CPU frequency: Device not configured powerd: error reading current CPU frequency: Device not configured CPU frequency is below user-defined minimum; changing frequency to 448 MHz powerd: error setting CPU freq 448: Device not configured powerd: error reading current CPU frequency: Device not configured powerd: error reading current CPU frequency: Device not configured powerd: error reading current CPU frequency: Device not configured powerd: error reading current CPU frequency: Device not configured powerd: error reading current CPU frequency: Device not configured powerd: error reading current CPU frequency: Device not configured powerd: error reading current CPU frequency: Device not configured in previous versions, such as "FreeBSD-7.3-RELEASE-amd64" everything works = and is present =93dev.cpu.0.freq=94: # sysctl dev.cpu.0.freq dev.cpu.0.freq: 3591 Thanks in advance for your reply and help. ________________________________ =CF=F0=C0=D2 =AB=D1=CA =AB=CF=D0=CE=C2=B2=C4=CD=C0=BB =C0=E4=F0=E5=F1=E0 =E3=EE=EB=EE=E2=ED=EE=E3=EE =EE=F4=B3=F1=F3: =E1=F3=EB= =FC=E2. =D2. =D8=E5=E2=F7=E5=ED=EA=E0, 37/122, =EC. =CA=E8=BF=E2, 01032, = =D3=EA=F0=E0=BF=ED=E0 =DE=F0=E8=E4=E8=F7=ED=E0 =E0=E4=F0=E5=F1=E0: =CF=EE=E2=B3=F2=F0=EE=F4=EB=EE= =F2=F1=FC=EA=E8=E9 =EF=F0-=F2, 25, =EC. =CA=E8=BF=E2, 03049, =D3=EA=F0=E0= =BF=ED=E0 =CA=EE=ED=F2=E0=EA=F2-=F6=E5=ED=F2=F0: 0-800-30-10-30 (=E1=E5=E7=EA=EE=F8= =F2=EE=E2=ED=EE =E7=B3 =F1=F2=E0=F6=B3=EE=ED=E0=F0=ED=E8=F5 =F2=E5=EB=E5=F4= =EE=ED=B3=E2 =F3 =EC=E5=E6=E0=F5 =D3=EA=F0=E0=BF=ED=E8) http://providna.ua =CE=C1=CC=C5=C6=C5=CD=CD=DF =C2=B2=C4=CF=CE=C2=B2=C4=C0=CB=DC=CD=CE=D1=D2= =B2 =C4=E0=ED=E8=E9 =EB=E8=F1=F2 =EC=EE=E6=E5 =EC=B3=F1=F2=E8=F2=E8 =EA=EE=ED= =F4=B3=E4=E5=ED=F6=B3=E9=ED=F3 =B3=ED=F4=EE=F0=EC=E0=F6=B3=FE. =DF=EA=F9=EE= =E4=E0=ED=E8=E9 =EB=E8=F1=F2 =EF=EE=F2=F0=E0=EF=E8=E2 =E4=EE =C2=E0=F1 =EF= =EE=EC=E8=EB=EA=EE=E2=EE, =E1=F3=E4=FC =EB=E0=F1=EA=E0, =EF=EE=E2=B3=E4=EE= =EC=F2=E5 =EF=F0=EE =F6=E5 =E2=B3=E4=EF=F0=E0=E2=ED=E8=EA=E0. =C1=F3=E4=FC-= =FF=EA=E5 =F0=EE=E7=EF=EE=E2=F1=FE=E4=E6=E5=ED=ED=FF =E7=EC=B3=F1=F2=F3 =E4= =E0=ED=EE=E3=EE =EB=E8=F1=F2=E0 =F2=F0=E5=F2=B3=EC =EE=F1=EE=E1=E0=EC, =F9= =EE =E2=EA=EB=FE=F7=E0=BA =E4=F0=F3=EA, =E7=E1=E5=F0=B3=E3=E0=ED=ED=FF, =EF= =F3=E1=EB=B3=EA=E0=F6=B3=FE =F2=E0 =EA=EE=EF=B3=FE=E2=E0=ED=ED=FF, =E7=E0= =E1=EE=F0=EE=ED=E5=ED=EE. =CF=F0=C0=D2 =AB=D1=CA =AB=CF=D0=CE=C2=B2=C4=CD= =C0=BB =ED=E5 =ED=E5=F1=E5 =E2=B3=E4=EF=EE=E2=B3=E4=E0=EB=FC=ED=EE=F1=F2=B3= =E7=E0 =E1=F3=E4=FC-=FF=EA=E5 =ED=E5=F1=E0=ED=EA=F6=B3=EE=ED=EE=E2=E0=ED= =E5 =E2=E8=EA=EE=F0=E8=F1=F2=E0=ED=ED=FF =E2=B3=E4=EE=EC=EE=F1=F2=E5=E9, = =F9=EE =EC=B3=F1=F2=FF=F2=FC=F1=FF =E2 =EB=E8=F1=F2=B3.