* sata_nv silently ignores discard (TRIM) command?
@ 2011-01-14 17:50 Alberto Mattea
2011-01-14 18:32 ` Jeff Moyer
0 siblings, 1 reply; 5+ messages in thread
From: Alberto Mattea @ 2011-01-14 17:50 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sata_nv silently ignores discard (TRIM) command?
2011-01-14 17:50 sata_nv silently ignores discard (TRIM) command? Alberto Mattea
@ 2011-01-14 18:32 ` Jeff Moyer
2011-01-14 18:36 ` Alberto Mattea
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Moyer @ 2011-01-14 18:32 UTC (permalink / raw)
To: Alberto Mattea; +Cc: linux-kernel
Alberto Mattea <alberto@mattea.info> writes:
> 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?
What does 'cat /sys/block/sda/queue/discard_zeroes_data' say?
Cheers,
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sata_nv silently ignores discard (TRIM) command?
2011-01-14 18:32 ` Jeff Moyer
@ 2011-01-14 18:36 ` Alberto Mattea
2011-01-14 18:57 ` Jeff Moyer
0 siblings, 1 reply; 5+ messages in thread
From: Alberto Mattea @ 2011-01-14 18:36 UTC (permalink / raw)
To: linux-kernel
In data venerdì 14 gennaio 2011 19:32:45, Jeff Moyer ha scritto:
>
> What does 'cat /sys/block/sda/queue/discard_zeroes_data' say?
>
> Cheers,
> Jeff
Hi Jeff, it says 0. So I assume it's not working?
Thanks
Alberto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sata_nv silently ignores discard (TRIM) command?
2011-01-14 18:36 ` Alberto Mattea
@ 2011-01-14 18:57 ` Jeff Moyer
2011-01-14 19:00 ` Alberto Mattea
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Moyer @ 2011-01-14 18:57 UTC (permalink / raw)
To: Alberto Mattea; +Cc: linux-kernel
Alberto Mattea <alberto@mattea.info> writes:
> In data venerdì 14 gennaio 2011 19:32:45, Jeff Moyer ha scritto:
>>
>> What does 'cat /sys/block/sda/queue/discard_zeroes_data' say?
>>
>> Cheers,
>> Jeff
> Hi Jeff, it says 0. So I assume it's not working?
That means that discarded blocks are not zeroed. The trim was likely
processed just fine.
Cheers,
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sata_nv silently ignores discard (TRIM) command?
2011-01-14 18:57 ` Jeff Moyer
@ 2011-01-14 19:00 ` Alberto Mattea
0 siblings, 0 replies; 5+ messages in thread
From: Alberto Mattea @ 2011-01-14 19:00 UTC (permalink / raw)
To: linux-kernel
>
> That means that discarded blocks are not zeroed. The trim was likely
> processed just fine.
>
> Cheers,
> Jeff
Thanks a lot! I was already worrying about changing motherboard.
Bye
Alberto
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-14 19:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 17:50 sata_nv silently ignores discard (TRIM) command? Alberto Mattea
2011-01-14 18:32 ` Jeff Moyer
2011-01-14 18:36 ` Alberto Mattea
2011-01-14 18:57 ` Jeff Moyer
2011-01-14 19:00 ` Alberto Mattea
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox