From: Alberto Mattea <alberto@mattea.info>
To: linux-kernel@vger.kernel.org
Subject: sata_nv silently ignores discard (TRIM) command?
Date: Fri, 14 Jan 2011 18:50:24 +0100 [thread overview]
Message-ID: <201101141850.25252@alby> (raw)
Hello all.
I'm testing linux 2.6.37 final with a Crucial RealSSD C300 (256GB).
The chipset is a nforce 570 (M2N32-SLI Deluxe); lspci:
IDE interface [0101]: nVidia Corporation MCP55 SATA Controller [10de:037f]
(rev a2) (prog-if 85 [Master SecO PriO])
Subsystem: ASUSTeK Computer Inc. Device [1043:cb84]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0 (750ns min, 250ns max)
Interrupt: pin C routed to IRQ 21
Region 0: I/O ports at f200 [size=8]
Region 1: I/O ports at f100 [size=4]
Region 2: I/O ports at f000 [size=8]
Region 3: I/O ports at ef00 [size=4]
Region 4: I/O ports at ee00 [size=16]
Region 5: Memory at fe02b000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [b0] MSI: Enable- Count=1/4 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [cc] HyperTransport: MSI Mapping Enable+ Fixed+
Kernel driver in use: sata_nv
Kernel modules: sata_nv
On the device there is a single ext4 partition, mounted with -o discard.
Dmesg:
EXT4-fs (sda1): re-mounted. Opts: errors=remount-
ro,discard,data=writeback,commit=0
To test whether TRIM is working, I did the following:
# dd if=/dev/urandom of=tempfile count=100 bs=512k oflag=direct
# hdparm --fibmap tempfile
(File begins at 66090496)
# hdparm --read-sector 66090496 /dev/sda
(Random data)
# rm tempfile
# sync
# hdparm --read-sector 66090496 /dev/sda
Now, if I'm correct after a successful TRIM the last command should output all
zeroes, but exactly the same random data is reported instead. However, there
is nothing in dmesg about TRIM failing. Does sata_nv support TRIM on the 570?
Thanks
Alberto
next reply other threads:[~2011-01-14 17:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 17:50 Alberto Mattea [this message]
2011-01-14 18:32 ` sata_nv silently ignores discard (TRIM) command? Jeff Moyer
2011-01-14 18:36 ` Alberto Mattea
2011-01-14 18:57 ` Jeff Moyer
2011-01-14 19:00 ` Alberto Mattea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201101141850.25252@alby \
--to=alberto@mattea.info \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.