I'd tried the same commands with a manually compiled 2.6.36 kernel. With this
kernel I got zero values. It seems that there were changes in 2.6.3[3-6]
kernels which had fixed the issue.
Furthermore
/sys/block/sda/queue/discard_zeroes_data,
/sys/block/sda/queue/discard_max_entry and
/sys/block/sda/queue/discard_granularity
are not present with 2.6.32-27, but with 2.6.36.
The discard zero indication feature were added with following commit (2.6.33
kernel series): http://kerneltrap.org/mailarchive/git-commits-
head/2009/12/8/16006
[Max entry and granularity were annotated here:
http://www.spinics.net/lists/linux-scsi/msg40360.html and
http://www.spinics.net/lists/dm-devel/msg12155.html
(http://android.git.kernel.org/?p=kernel/common.git;a=commitdiff;h=86b37281411cf1e9bc0a6b54 06c45edb7bd9ea5d)]
Available should be all three attributes in 2.6.33.
Maybe this could explain the difference between 2.6.32-27 and generic kernel
2.6.36. Eventually SandForce devices did not return zero blocks after discard
and the ATA Trim works properly with my drive...
mount:
/dev/sda1 on / type ext4 (rw,noatime,nodiratime,errors=remount-ro,discard)
...
SSD capabilities:
hdparm -I /dev/sda
...
* Data Set Management TRIM supported
* Deterministic read data after TRIM
...
sysfs queue directory:
ls -la /sys/block/sda/queue/
insgesamt 0
drwxr-xr-x 3 root root 0 16. Nov 19:55 .
drwxr-xr-x 9 root root 0 16. Nov 19:55 ..
-r--r--r-- 1 root root 4096 16. Nov 20:49 hw_sector_size
drwxr-xr-x 2 root root 0 16. Nov 20:49 iosched
-rw-r--r-- 1 root root 4096 16. Nov 20:49 iostats
-r--r--r-- 1 root root 4096 16. Nov 20:49 logical_block_size
-r--r--r-- 1 root root 4096 16. Nov 20:49 max_hw_sectors_kb
-rw-r--r-- 1 root root 4096 16. Nov 20:49 max_sectors_kb
-r--r--r-- 1 root root 4096 16. Nov 20:49 minimum_io_size
-rw-r--r-- 1 root root 4096 16. Nov 20:49 nomerges
-rw-r--r-- 1 root root 4096 16. Nov 20:49 nr_requests
-r--r--r-- 1 root root 4096 16. Nov 20:49 optimal_io_size
-r--r--r-- 1 root root 4096 16. Nov 20:49 physical_block_size
-rw-r--r-- 1 root root 4096 16. Nov 20:49 read_ahead_kb
-rw-r--r-- 1 root root 4096 16. Nov 20:49 rotational
-rw-r--r-- 1 root root 4096 16. Nov 20:49 rq_affinity
-rw-r--r-- 1 root root 4096 16. Nov 19:55 scheduler
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201011162102.57929.bs.net@gmx.de">http://lists.debian.org/201011162102.57929.bs.net@gmx.de