Linux The SSDs-with-Linux thread.

vishalrao

Global Moral Police
Level J
Just a quick post with an update of my SSD experience with Linux - not too good :(

See: http://www.techenclave.com/storage-solutions/is-it-worth-buying-ssd-now-156035-4.html#post1381308

On a sad note, Linux distros seem to log errors in the kernel dmesg output and an Intel X25M "postville 80gb" user report no such issues. I'm hoping its an overall IndiLinx issue rather than just a Crucial issue or *shock* just an issue with my particular disk because it causes the occassional long freeze, hard hangs and also that partition ext4 journal corruption! I've posted on Ubuntu forums/bug tracker and also the Crucial forums and will update this thread when I have further info.

Windows 7 RC has been working smoothly since the start though, seeing the write speed boost with the new firmware.

Anyone else out here using SSDs with Linux can report your experiences to check whether its a Linux/IndiLinx issue or just my problem?

( Original show-off post: http://www.techenclave.com/show-off/the-winchester-killer-154619.html?highlight=winchester )
 
Vishalji I think you are the only one who is running Linux on SSDs right now. :P

Actually I just upgraded from the stock 160GB 5400rpm drive in my Acer 5920 laptop to a spanking new 320GB WD Scorpio Black 7200rpm drive. And boy! Is it an upgrade or what? Paired with my 4GB Transcend RAM kit (2X 2GB PC2 6400), my laptop is running faster than ever before.

I was torn between going for a SSD, but the high(er) cost kept me from going in for it. Now seeing the jump in performance with this new drive, I really wonder what it would be like to run Ubuntu on a SSD.
 
Since very few people use it, support is not that much.SSDs are too costly. this would change with time.

So I guess you have to wait:P
 
yea heh. btw latest update is that its either just a problem with my disk (or my brand/model or possibly indilinx in general) because other linux users (intel and kingston at least) reporting it works fine for them... just waiting for more confirmation from other crucial/indilinx users on ubuntu/crucial forums...

WOOHOO FIXED!!!

OK I think I know what's happening and I've fixed my issue!

I should have figured this out sooner but the problem is/was NCQ not SMART.

I did a web search for "failed command READ FPDMA QUEUED" and saw some references to NCQ, SSDs and all that jazz.

So all I need to do is pass the linux kernel boot paramter along with the existing (unrelated) parameters "quiet splash" like:

Code:
quiet splash libata.force=noncq

Intel does NCQ support right for sure. And OCZ is apparently blacklisted already in the code it looks like that is why the above folks dont get this error.

Searched around for the source code location and the place to backlist in linux kernel (.32 series) libata source would be drivers/ata/libata-core.c around line 4252 with the existing OCZ ata_blacklist_entry item:

Code:
{ "CRUCIAL_CT128M225", NULL, ATA_HORKAGE_NONCQ },

This blacklist just the 128 GB model which I have, I'm guessing the 64 and 256 models also need blacklisting with their own ID strings. I guess you pass NULL for the firmware version string so it blacklists all of them.

I will post this info on the Crucial.com forums and also on the bug and see what happens from there.

Not sure if this should be fixed by blacklisting these Crucial M225 models in the libata linux kernel source or it should be fixed by Crucial in perhaps a new model and/or BIOS update.

I hope Ubuntu devs might get this into the .32 kernel released with Lucid to avoid headaches for other Crucial SSD users.
 
doh. i spammed everybody EXCEPT lkml directly with this info :D let me see if anyone will take notice - first i have to check existing .33 source to see if its not already there and can simply be backported to .32 kernel series...

update: sent the following email to lkml, if they make that change then it will be like my first (indirect pseudo) patch to the linux kernel :ohyeah:

see LKML: Vishal Rao: libATA blacklist Crucial/Micron SSD M225 models due to NCQ errors?
 
Gaurish said:
^^^

Great. DO most this workaround at upstream at well. send a mail to lkml

OK after some futzing around (previous email was likely ignored because its not following protocol), sent a 3-line patch to LKML (and kernel Serial ATA subsystem maintainer Jeff Garzik) and got a (not so friendly) response from da man Alan Cox himself :D

See:

LKML: Vishal Rao: [PATCH] ata: Disable NCQ for Crucial M225 brand SSDs

LKML: Alan Cox: Re: [PATCH] ata: Disable NCQ for Crucial M225 brand SSDs

LKML: Vishal Rao: Re: [PATCH] ata: Disable NCQ for Crucial M225 brand SSDs

Also blogged about it: Linux kernel ATA dmesg errors with Crucial M225 SSD | veracity

Kernel source uploaded to my Ubuntu Launchpad PPA, this is my third attempt at upload and build (was having some ABI-hash-check failures) lets see if it worked on not in about a couple of hours or so...
 
vishalrao said:
OK after some futzing around (previous email was likely ignored because its not following protocol), sent a 3-line patch to LKML (and kernel Serial ATA subsystem maintainer Jeff Garzik) and got a (not so friendly) response from da man Alan Cox himself :D

See:
LKML: Vishal Rao: [PATCH] ata: Disable NCQ for Crucial M225 brand SSDs
LKML: Alan Cox: Re: [PATCH] ata: Disable NCQ for Crucial M225 brand SSDs
LKML: Vishal Rao: Re: [PATCH] ata: Disable NCQ for Crucial M225 brand SSDs

Also blogged about it: Linux kernel ATA dmesg errors with Crucial M225 SSD | veracity

Kernel source uploaded to my Ubuntu Launchpad PPA, this is my third attempt at upload and build (was having some ABI-hash-check failures) lets see if it worked on not in about a couple of hours or so...
I hope your patch gets accepted. then you can brag about Linux Kernel has your code included:ohyeah:

btw, the person that replied to you is "The" Alan Cox :D
 
haha, yes, i know who he is (thats what i meant by "da man") - have been following his posts for years now :D

actually i was surprised to see his response because even though he is/was considered linus' "right hand man" he recently had some controversy about maintaining some part of the kernel (was it TTY/consoles?) and i thot he quit for a regular job ...
 
vishalrao said:
h

actually i was surprised to see his response because even though he is/was considered linus' "right hand man" he recently had some controversy about maintaining some part of the kernel (was it TTY/consoles?) and i thot he quit for a regular job ...

He did leave after a argument with Linus, that's the reason, even I got surprised to see that is still active.
 
Pasting this link for reference: Tuning Solid State Drives in Linux | cptl.org

Using the following since apparently Lucid has "discard" option backported now for TRIM support with the -19 kernel which I'm just updating to confirm :)

Code:
/dev/sda1 / ext4 discard,noatime,defaults

echo 1 > /proc/sys/vm/swappiness

echo noop > /sys/block/sda/queue/scheduler

So its discard, noatime, noop and swappiness=1 for me, no journal-disable nor tmpfs...
 
Back
Top