From owner-freebsd-hackers@FreeBSD.ORG Thu May 21 18:50:08 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45C754C2 for ; Thu, 21 May 2015 18:50:08 +0000 (UTC) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (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 D94451747 for ; Thu, 21 May 2015 18:50:07 +0000 (UTC) Received: by wizk4 with SMTP id k4so24781366wiz.1 for ; Thu, 21 May 2015 11:50:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=KqsgXa6//WGyzni4xD+dWl9FBvh9kbCx/W2TvrzYMdU=; b=e0wPPCo3RxvSc0183HPXhMfjKZpv3L5dKYyiQULby3ZQ6hCmxbNj+hscZcS79a2fDp ZXPmadxXYT9h8X6TOuN/peV3F0fr3ZnK4t8f5HJmWSEs6458oEVashDvH2IOAEDQ/BIl 6w9a/quHpMNkB3WpOpqv3mvqiCjNncGtTWdlSoXuHo+O3Bu4JRGUaFsctCxSoobgDLx5 SHNNMEYPFcQOrV2fjOnQWMvFhnf58Jb0/rYViV1GPymxPaLdYi4YnXQlk+O3YxRmnmix BkmVS4duNosqEPpjhh5nNLzP50dAb303MdidrNRjTikQUdMMVGqjVL557OBIN21hJTKR jB5A== X-Gm-Message-State: ALoCoQlS9mT+egoegPcuV6uCbKwlLmchB4QfKQ9e8TxnKA0cKPXLlIhd06LvtxJzQnorXhn2c9d+ X-Received: by 10.180.198.10 with SMTP id iy10mr301118wic.16.1432234200515; Thu, 21 May 2015 11:50:00 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id ng5sm3894881wic.24.2015.05.21.11.49.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2015 11:49:59 -0700 (PDT) Message-ID: <555E28D1.2070600@multiplay.co.uk> Date: Thu, 21 May 2015 19:49:53 +0100 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: Botched NCQ on SSD - cannot disable? References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 18:50:08 -0000 We make extensive use of 840 EVO's attached to LSI controllers and never had an issue. What controller are you using? On 21/05/2015 19:42, Neffi wrote: > I was discussing this issue in freenode/#freebsd and I was recommended to > shoot an email to you fellows about it. > > I've got an Samsung 840 EVO SSD (model MZ-7TE250BW), which uses Samsung's > own controller from what I can gather. I had issues of mass data corruption > when used under Linux, and several programs crashing unexpectedly when used > under FreeBSD. I've gone through 2 drives under warranty with the same > issue before customer service suggested to disable drive queuing. > > After some research it seems as though this drive (and several other common > SSDs) report that they support NCQ, but in fact are botched and will have > all sorts of problems with NCQ enabled ranging from poor performance, to > I/O stalls to data corruption. > > Sure enough the logs on Linux spit out something along the lines of: > >> ata1: exception Emask 0x0 SAct 0xf SErr 0x0 action 0x10 frozen >> ata1.00: failed command: READ FPDMA QUEUED > This happens several times when used on Linux, in the few hours leading up > to total filesystem corruption. > > The recommendation in the Linux world is to disable NCQ on these drives, > for which there is an easy boot-time tunable for it. This fixes the issue. > No more data corruption. > > There doesn't seem to be a tunable for this anywhere on FreeBSD. > camcontrol(8) mentions setting the tags used, but only between some > hardcoded limits, with a default of 2 -- not sufficient to disable NCQ on > the drive. It looks like presently the only option is to manually patch the > quirks for this drive in the kernel and recompile before I can even install > the system to the drive. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"