Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NCQ Send/Recv error e SATA III come SATA II su Samsung 840 E
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Mon May 19, 2014 12:36 pm    Post subject: NCQ Send/Recv error e SATA III come SATA II su Samsung 840 E Reply with quote

Salve ragazzi, questo e' un post generico e non riguarda un errore in particolare. Ho dato uno sguardo all'output di dmesg ed ho riscontrato alcuni errori relativi all'interfaccia sata:

http://bpaste.net/show/287467/

Se qualcuno vede qualcosa di strano puo' gentilmente dirmelo?
_________________
I'm not stupid, only mentally free...


Last edited by Realnot on Thu May 22, 2014 6:52 am; edited 2 times in total
Back to top
View user's profile Send private message
kikko
n00b
n00b


Joined: 29 Apr 2014
Posts: 39
Location: Milan, IT

PostPosted: Mon May 19, 2014 7:22 pm    Post subject: Reply with quote

Realnot
forse non è nulla, ma l'errore 10B8B sembra indicare problemi con il cablaggio (Google? Già fatto, ho trovato tutto qui http://lime-technology.com/wiki/index.php/The_Analysis_of_Drive_Issues#Drive_Interface_Issues ;) )

Fammi sapere se ti è servito a qualcosa :P
Ciao
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Tue May 20, 2014 5:03 pm    Post subject: Reply with quote

Ciao Kikko,

Prima di tutto grazie per la risposta e secondo il link mi e' stato molto utile, infatti era un problema di cablaggio. Una volta sostituiti i cavi sata http://amzn.to/R4T2ZH con un paio che ho trovato in casa gli errori al boot sono scomparsi. Rimane qualche errore relativo all'interfaccia pero'

venus realnot # dmesg | grep Err:

[    0.859333] xhci_hcd 0000:00:14.0:   Host System Error Interrupts disabled
[    0.859347] xhci_hcd 0000:00:14.0:   No Host System Error
[    0.862512] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.863078] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.863973] ata2.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.864886] ata3.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.870565] ata3.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.871492] ata2.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)


venus realnot # dmesg | grep ata:

[    0.000000] BIOS-e820: [mem 0x00000000da3db000-0x00000000da3e6fff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000da3f4000-0x00000000da3f8fff] ACPI data
[    0.000000] ACPI: SSDT 00000000da3e4d78 00386 (v01 SataRe SataTabl 00001000 INTL 20091112)
[    0.000000] Memory: 16318872K/16689864K available (7994K kernel code, 707K rwdata, 2788K rodata, 948K init, 992K bss, 370992K reserved)
[    0.193689] _OSC request data:1 8 0
[    0.193720] _OSC request data:1 1f 0
[    0.203410] libata version 3.00 loaded.
[    0.555917] ata1: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36100 irq 41
[    0.555939] ata2: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36180 irq 41
[    0.555961] ata3: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36200 irq 41
[    0.555979] ata4: DUMMY
[    0.555986] ata5: DUMMY
[    0.555994] ata6: DUMMY
[    0.860370] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    0.860387] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.860403] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.862483] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.862485] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.862487] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.862512] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.862708] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.862709] ata1.00: ATA-9: Samsung SSD 840 EVO 120GB, EXT0BB0Q, max UDMA/133
[    0.862710] ata1.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.863053] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.863054] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.863056] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.863078] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.863250] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.863252] ata1.00: configured for UDMA/133
[    0.863843] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.863845] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.863846] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.863973] ata2.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.864671] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.864672] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.864674] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.864886] ata3.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.867018] ata3.00: ATAPI: TSSTcorp DVD-ROM SN-108BB, D100, max UDMA/100
[    0.867924] ata2.00: ATA-8: WDC WD7500BPKX-00HPJT0, 01.01A01, max UDMA/133
[    0.867925] ata2.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.870358] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.870359] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.870360] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.870565] ata3.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.871359] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.871360] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.871362] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.871492] ata2.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.872703] ata3.00: configured for UDMA/100
[    0.874945] ata2.00: configured for UDMA/133
[    0.981490] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    0.984135] Write protecting the kernel read-only data: 12288k
[    1.991226] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


Ancora devo capire come risolverli. Ho anche emerso hdparm ed ho provato a testare il link sia dell'SSD Samsung 840 da 120 GB sia del WD WD7500BPKX.

SSD Samsung 840 120GB = venus realnot # hdparm -t /dev/sda:


/dev/sda:
 Timing buffered disk reads: 624 MB in  3.01 seconds = 207.07 MB/sec


WD Black 7200 rpm 750GB = venus realnot # hdparm -t /dev/sdb:


/dev/sdb:
 Timing buffered disk reads: 308 MB in  3.02 seconds = 102.10 MB/sec
v


La velocita' del WD dovrebbe essere nella norma, ma l'SSD e' molto lento, ho letto che il valore _nominale_ del disco dovrebbe essere di circa 540 MB/s. I valori che ottengo io sono veramente bassi. Qualche idea?
_________________
I'm not stupid, only mentally free...


Last edited by Realnot on Tue May 20, 2014 6:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
sabayonino
Apprentice
Apprentice


Joined: 03 Jan 2012
Posts: 255

PostPosted: Tue May 20, 2014 5:43 pm    Post subject: Reply with quote

ciao.

per quanto riguarda hdparm , l'utility è (era ? ) studiata appositamente per dischi meccanici (IDE/SATA)

la sua controparte per periferiche SCSI (SATA include) dovrebbe essere valida , ma SSD ha un funzionamento completamente diverso da un dispositivo meccanico :roll: per cui non so quanto attendibile possa essere quel risultato

per quanto riguarda l'errore sembra che ACPI abbia problemi nel gestire la periferica (ACPI è installato correttamente ? runlevel etc ? )

molto probabilmente (bada il condizionale) per il modulo xHCI (per la gestione periferiche USB3.0) non caricato correttamente nel kernel

qualcosa del tipo :
Code:
zcat /proc/config.gz | grep XHCI
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PLATFORM=m


Code:
lsmod | grep xhci
xhci_hcd               72912  0
usbcore               114832  10 uhci_hcd,usb_storage,hid_sony,ohci_hcd,ohci_pci,ehci_hcd,ehci_pci,usbhid,xhci_hcd,sl811_hcd

_________________
BOINC ed il calcolo distribuito
Back to top
View user's profile Send private message
kikko
n00b
n00b


Joined: 29 Apr 2014
Posts: 39
Location: Milan, IT

PostPosted: Tue May 20, 2014 8:48 pm    Post subject: Reply with quote

Ciao Realnot
più che per l'ACPI NOP, sembra che ci sia un altro errore da non sottovalutare:
Quote:
Code:
ata1.00: failed to get NCQ Send/Recv Log Emask 0x1

qualcuno (qui, precisamente: http://forums.gentoo.org/viewtopic-p-7479792.html) sostiene che si tratti di un problema di firmware, presente su alcuni SSD Samsung, che può portare perdite di dati o peggio (nel thread viene indicato un workaround, comunque)
Back to top
View user's profile Send private message
sabayonino
Apprentice
Apprentice


Joined: 03 Jan 2012
Posts: 255

PostPosted: Tue May 20, 2014 9:29 pm    Post subject: Reply with quote

uhm ... perchè l'NCQ sia "funzionale" occorre che ,oltre al modulo , nel bios le periferiche Sata ,siano impostate in AHCI (e non IDE)
(qundo mi capitano portatili tra le mani , è la prima cosa che controllo :lol: anche senza SSD )

controlla.

PS: per il modulo AHCI ; il supporto è nativo quindi se non ci hai messo le mani il modulo dovrebbe già esserci
Code:
zcat /proc/config | grep AHCI
CONFIG_SATA_AHCI=y
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_ACARD_AHCI is not set


[edit] nei parametri del kernel (anche al boot) è possibile passare :
Quote:
libata.force= [LIBATA] Force configurations. The format is comma
separated list of "[ID:]VAL" where ID is
PORT[.DEVICE]. PORT and DEVICE are decimal numbers
matching port, link or device. Basically, it matches
the ATA ID string printed on console by libata. If
the whole ID part is omitted, the last PORT and DEVICE
values are used. If ID hasn't been specified yet, the
configuration applies to all ports, links and devices.

If only DEVICE is omitted, the parameter applies to
the port and all links and devices behind it. DEVICE
number of 0 either selects the first device or the
first fan-out link behind PMP device. It does not
select the host link. DEVICE number of 15 selects the
host link and device attached to it.

The VAL specifies the configuration to force. As long
as there's no ambiguity shortcut notation is allowed.
For example, both 1.5 and 1.5G would work for 1.5Gbps.
The following configurations can be forced.

* Cable type: 40c, 80c, short40c, unk, ign or sata.
Any ID with matching PORT is used.

* SATA link speed limit: 1.5Gbps or 3.0Gbps.

* Transfer mode: pio[0-7], mwdma[0-4] and udma[0-7].
udma[/][16,25,33,44,66,100,133] notation is also
allowed.

* [no]ncq: Turn on or off NCQ.


Disabilitare
Code:
libata.force=noncq



Abilitare
Code:
libata.force=ncq

https://www.kernel.org/doc/Documentation/kernel-parameters.txt
_________________
BOINC ed il calcolo distribuito
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Wed May 21, 2014 9:35 am    Post subject: Reply with quote

Questa macchina non e' un portatile ma un desktop (Optiplex 7010 SFF). Dal quel che vedo in giro il problema relativo all'NCQ deriva principalmente dal power menagment del link sata. Nel BIOS e' impostato l'AHCI ed ho passato "libata.force=ncq" come parametro del kernel in grub.

nano -w /etc/default/grub:

...
# Append parameters to the linux kernel command line
GRUB_CMDLINE_LINUX="libata.force=ncq"
...


Quindi ho rigenerato il file di configurazione
Code:
grub2-mkconfig -o /boot/grub/grub.cfg


ed installato il grub nell'SSD
Code:
grub2-install /dev/sda


Al reboot continua a darmi lo stesso errore. Ho trovato questo post: http://forums.gentoo.org/viewtopic-p-7537566.html pero' da quel che ho capito non hanno risolto i problemi.

Per quanto riguarda la gestione delle periferiche USB 3.0, lsmod non mi ritorna nulla, ma l'HCD e' abilitato:

venus boot # cat /usr/src/linux/.config | grep XHCI:

CONFIG_USB_XHCI_HCD=y


venus realnot # dmesg | grep ata:

[    0.000000] Command line: BOOT_IMAGE=/kernel-3.12.13-gentoo root=/dev/sda2 ro libata.force=ncq
[    0.000000] BIOS-e820: [mem 0x00000000da3db000-0x00000000da3e6fff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000da3f4000-0x00000000da3f8fff] ACPI data
[    0.000000] ACPI: SSDT 00000000da3e4d78 00386 (v01 SataRe SataTabl 00001000 INTL 20091112)
[    0.000000] Kernel command line: BOOT_IMAGE=/kernel-3.12.13-gentoo root=/dev/sda2 ro libata.force=ncq
[    0.000000] Memory: 16318860K/16689864K available (8088K kernel code, 713K rwdata, 2808K rodata, 956K init, 988K bss, 371004K reserved)
[    0.193634] _OSC request data:1 8 0
[    0.193664] _OSC request data:1 1f 0
[    0.203347] libata version 3.00 loaded.
[    0.523168] ata1: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36100 irq 41
[    0.523197] ata2: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36180 irq 41
[    0.523225] ata3: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36200 irq 41
[    0.523249] ata4: DUMMY
[    0.523258] ata5: DUMMY
[    0.523267] ata6: DUMMY
[    0.828110] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    0.830106] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.830122] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.832225] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.832226] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.832227] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.832247] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.832337] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.832338] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.832339] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.832404] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.832405] ata1.00: ATA-9: Samsung SSD 840 EVO 120GB, EXT0BB0Q, max UDMA/133
[    0.832406] ata1.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.832664] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.832665] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.832666] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.832683] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.832850] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.832851] ata1.00: configured for UDMA/133
[    0.834049] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.834050] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.834051] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.834183] ata2.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.834470] ata3.00: ATAPI: TSSTcorp DVD-ROM SN-108BB, D100, max UDMA/100
[    0.837302] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.837303] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.837304] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.837517] ata3.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.838140] ata2.00: ATA-8: WDC WD7500BPKX-00HPJT0, 01.01A01, max UDMA/133
[    0.838141] ata2.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.839645] ata3.00: configured for UDMA/100
[    0.842057] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[    0.842058] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[    0.842059] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[    0.842187] ata2.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    0.845840] ata2.00: configured for UDMA/133
[    0.961614] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    0.964793] Write protecting the kernel read-only data: 12288k
[    1.077217] xhci_hcd 0000:00:14.0: xhci_hub_status_data: stopping port polling.
[    1.723514] xhci_hcd 0000:00:14.0: xhci_hub_status_data: stopping port polling.
[    1.797394] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[   13.240990] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[   13.241165] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[   13.241167] ata1.00: configured for UDMA/133
[   13.242815] ata1: EH complete
[   13.351463] ata2.00: configured for UDMA/133
[   13.351468] ata2: EH complete

_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
sabayonino
Apprentice
Apprentice


Joined: 03 Jan 2012
Posts: 255

PostPosted: Wed May 21, 2014 11:14 am    Post subject: Reply with quote

si lo avevo capito che era un fisso , ho scritto "portatile" perchè quelli mi capitano tra le mani e spesso hanno (avevano :twisted: ) IDE impostato e WinXP...

all'atto pratico noti "mancanze" da parte del drive ?

cercando trovo spesso discussioni che portano allo stesso risultato (firmware ,acpi ... kernel datati etc)
_________________
BOINC ed il calcolo distribuito
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Wed May 21, 2014 11:36 am    Post subject: Reply with quote

No, l'SSD sembra una scheggia', la fase di boostrap impieghera' circa 3 secondi dalla scelta dell'immagine da avviare al grub fino all login di kdm dove impiega altri 4 secondi una volta inserita la password. Pero' essendo un SSD non vedo differenza tra letture a 200 MB/s e letture a 500 MB/s, non ci sono i dati, ma solo la partizione di root e la /boot che riesede su una partizione separata. Un conto e' leggere centinaia di GB un altro e' caricare solo la root. Ovviamente mi scoccia il fatto che ci siano dei problemi, vorrei sistemarli in modo che i device lavorino correttamente.

Da Samsung http://bit.ly/1kokzAY wrote:
NCQ

AHCI also affects the ability of Samsung’s SSDs to reach their maximum Random QD32 performance. This is because AHCI is required for Native Command Queuing (NCQ) to function. Because SSDs enjoy extremely fast speeds, storage is no longer the bottleneck of a PC system. NCQ helps an SSD deal with situations where it finds latency on the host, a phenomenon unheard of with traditional HDDs. Additionally, NCQ allows the SSD controller to process commands in parallel, improving performance and reducing latency.


Da libata su Wikipedia https://ata.wiki.kernel.org/index.php/Libata_FAQ wrote:
Enabling, disabling and checking NCQ

How do I enable NCQ? How do I disable NCQ? How do I know if NCQ is enabled? Why are only 31 tags used, rather than 32?
Linux NCQ (SATA native command queueing) support is enabled automatically, if your SATA drive supports it. At boot, you will see a line in dmesg (or kernel log) like
ata2.00: ATA-7, max UDMA/133, 321672960 sectors: LBA48 NCQ (depth 31/32)
If the line containing the sector count and maximum UDMA speed does not mention NCQ, your drive does not support it.
If NCQ is present but disabled, you may see "depth 0":
ata2.00: ATA-7, max UDMA/133, 321672960 sectors: LBA48 NCQ (depth 0/32)
You may disable NCQ, and use normal READ/WRITE DMA commands, by setting the queue depth to 1:
$ echo 1 > /sys/block/sdX/device/queue_depth
Enabling NCQ, if supported, is the same:
$ echo 31 > /sys/block/sdX/device/queue_depth
Both the host controller and device constrain the number of NCQ commands that can be outstanding. The SATA specification maximum is 32 tags. Most devices support 32 tags, but the standard permits devices to support less. Similarly, most host controllers support 32 tags.
However, the ATA standard has a design flaw. The NCQ tag is presumed to be a 32-bit bitmap (32-bit dword). If all 32 tags are asserted, this produces a value (0xffffffff) that is the same value returned by reading a hardware register after the hardware has been hot-unplugged, or suffers a major failure. Thus, to distinguish this condition, libata artificially limits all NCQ configurations to 31 tags rather than 32.


Checking NCQ - venus realnot # dmesg | grep LBA48:

[    0.832406] ata1.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.838141] ata2.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA


venus realnot # cat /sys/block/sda/device/queue_depth:

31


venus realnot # dmesg | grep BOOT_IMAGE:

[    0.000000] Command line: BOOT_IMAGE=/kernel-3.12.13-gentoo root=/dev/sda2 ro libata.force=ncq
[    0.000000] Kernel command line: BOOT_IMAGE=/kernel-3.12.13-gentoo root=/dev/sda2 ro libata.force=ncq


Update:

Non so se puo' essere d'aiuto, ma questo e' il mio .config http://bpaste.net/show/290599/
_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
sabayonino
Apprentice
Apprentice


Joined: 03 Jan 2012
Posts: 255

PostPosted: Wed May 21, 2014 12:14 pm    Post subject: Reply with quote

uhm ...


ho dus ssd della serie Samsung 830 . e sono come orologi "sfisseri" :D (nememno i Vertex4 segnano alcun problema)

kernel 3.13.9/3.14.4 Gentoo e Sabayon 3.13.9


per l'840 (Pro ?? ) : http://www.samsung.com/us/pdf/memory-storage/840PRO_25_SATA_III_Spec.pdf

però ho trovato questo : http://www.hwmaster.com/2012/12/01/problemi-al-firmware-degli-ssd-samsung-840-pro-e-840/ (due anni fa)

puoi controllare il firmware anche con smartmontools (oltre ad effettuare dei test sul disco)
Code:
# emerge sys-apps/smartmontools



Esempio
Quote:
smartctl --all /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-sabayon] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Samsung based SSDs
Device Model: SAMSUNG SSD 830 Series
Serial Number: S0VZNEAC801178
LU WWN Device Id: 5 002538 043584d30
Firmware Version: CXM03B1Q
User Capacity: 256,060,514,304 bytes [256 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2 T13/2015-D revision 2
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Wed May 21 14:12:00 2014 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x02) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 1020) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 17) minutes.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 4213
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 752
177 Wear_Leveling_Count 0x0013 094 094 000 Pre-fail Always - 198
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0
187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 066 045 000 Old_age Always - 34
195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 0
199 CRC_Error_Count 0x003e 253 253 000 Old_age Always - 0
235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 214
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 20783383423

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.





Gsmartcontrol è l'utility di smartmontools con interfaccia grafica.
_________________
BOINC ed il calcolo distribuito
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Wed May 21, 2014 3:17 pm    Post subject: Reply with quote

Ho letto che poteva essere un problema di interfaccia, ho aggiornato il BIOS dalla versione A05 alla versiona A16 (tutto e' andato liscio). Avevo anche sbagliato a passare il parametro libata.noacpi, dimenticandomi di settarlo = a 1. Questo nei parametri del kernel (nella documentazione ufficiale non c'e')

Code:
libata.noacpi   [LIBATA] Disables use of ACPI in libata suspend/resume
         when set.
         Format: <int>


Invece di libata.noacpi=

Uno non si aspetta di inserire un valore in quel caso. Comunque ora, facendo un dmesg ottengo:

venus realnot # dmesg | grep ata:

[    0.000000] Command line: BOOT_IMAGE=/kernel-3.12.13-gentoo root=/dev/sda2 ro libata.force=ncq libata.noacpi=1
[    0.000000] BIOS-e820: [mem 0x00000000d7fb4000-0x00000000d7ffffff] ACPI data
[    0.000000] ACPI: SSDT 00000000d7ffde68 00415 (v01 SataRe SataTabl 00001000 INTL 20091112)
[    0.000000] Kernel command line: BOOT_IMAGE=/kernel-3.12.13-gentoo root=/dev/sda2 ro libata.force=ncq libata.noacpi=1
[    0.000000] Memory: 16322824K/16693824K available (7977K kernel code, 699K rwdata, 2748K rodata, 952K init, 988K bss, 371000K reserved)
[    0.200706] libata version 3.00 loaded.
[    0.524652] ata1: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36100 irq 41
[    0.524681] ata2: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36180 irq 41
[    0.524708] ata3: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36200 irq 41
[    0.524732] ata4: DUMMY
[    0.524741] ata5: DUMMY
[    0.524751] ata6: DUMMY
[    0.829664] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    0.829681] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.831546] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.831546] ata1.00: ATA-9: Samsung SSD 840 EVO 120GB, EXT0BB0Q, max UDMA/133
[    0.831547] ata1.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.831665] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.831723] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[    0.831725] ata1.00: configured for UDMA/133
[    0.835570] ata2.00: ATA-8: WDC WD7500BPKX-00HPJT0, 01.01A01, max UDMA/133
[    0.835571] ata2.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.838861] ata3.00: ATAPI: TSSTcorp DVD-ROM SN-108BB, D100, max UDMA/100
[    0.839579] ata2.00: configured for UDMA/133
[    0.841246] ata3.00: configured for UDMA/100
[    0.944268] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    0.947412] Write protecting the kernel read-only data: 12288k
[    2.338542] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[   11.095538] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[   11.095710] ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
[   11.095713] ata1.00: configured for UDMA/133
[   11.097379] ata1: EH complete
[   11.238906] ata2.00: configured for UDMA/133
[   11.238911] ata2: EH complete


Il problema e' questo:

venus realnot # dmesg | grep SATA:

[    0.519534] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x7 impl SATA mode
[    0.524652] ata1: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36100 irq 41
[    0.524681] ata2: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36180 irq 41
[    0.524708] ata3: SATA max UDMA/133 abar m2048@0xf7c36000 port 0xf7c36200 irq 41
[    0.829664] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    0.829681] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.831665] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)


Il lettore DVD ottiene un link a 1.5 GB/s e va bene, ma ATA1 e ATA2 (quindi i connettori sata 0 e 1) sono link a 6.0 GB's, ma per qualche ragione sembra andara in fallback a 3 GB/s (non ho ancora capito cosa vuol dire SStatus 133 SControl 300).

hdparm mi conferma che l'interfaccia sata e' a 6 GB/s

venus realnot # hdparm -I /dev/sdb |grep -E "Model|speed":
                                                                                           
        Model Number:       WDC WD7500BPKX-00HPJT0                 
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Gen3 signaling speed (6.0Gb/s)


venus realnot # hdparm -I /dev/sda |grep -E "Model|speed":
                                                                                                     
        Model Number:       Samsung SSD 840 EVO 120GB               
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Gen3 signaling speed (6.0Gb/s)


Il chipset e' della serie 7 non 6 (che sembra essere affetta da un bug relativo all'interfaccia)

venus realnot # lspci:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)                                                         
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)                                       
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)                                               
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)                                                                     
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)                                         
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)                                         
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)                                         
00:1f.0 ISA bridge: Intel Corporation Q77 Express Chipset LPC Controller (rev 04)                                                                             
00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)                                     
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04) 


per quanto riguarda NCQ ancora niente. Non credo sia un problema di firmware del disco (possibile che firmware diversi di dischi diversi abbiano lo stesso bug?) l'SSD e' un 840 normale, non PRO. dicono che chi la dura la vince.. chissa'
_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Wed May 21, 2014 3:40 pm    Post subject: Reply with quote

Guarda le prestazioni dello stesso SSD https://wiki.archlinux.org/index.php/SSD_Benchmarking#SAMSUNG_840_120GB

E guarda le mie:

venus realnot # hdparm -Tt /dev/sda:


/dev/sda:
 Timing cached reads:   26316 MB in  2.00 seconds = 13172.45 MB/sec
 Timing buffered disk reads: 702 MB in  3.00 seconds = 233.65 MB/sec


venus realnot # dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc:

1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 13.3207 s, 80.6 MB/s


Il firmware e' il seguente

venus realnot # smartctl --all /dev/sda | grep -i firmware:

Firmware Version: EXT0BB0Q


A questo indirizzo ci sono tutte le specifiche: http://bpaste.net/show/290865/

UPDATE 1:

Ho appena fatto qualcosa che non si dovrebbe fare mai: aggiornare il firmware dell'SSD. Vado sul sito della samsung http://www.samsung.com/global/business/semiconductor/samsungssd/downloads.html a cercare una nuova revision e trovo il firmware EXT0BB6Q. Formatto la pendrive, unetbotin e via (con l'ISO dal sito). Mentre sta aggiornando il Firmware mi dice che c'e' un errore e che il firmware che ho inserito non e' corretto. La macchina fa il reboot ed all'avvia non esiste piu' il disco, nemmeno dal BIOS si vede. Ho subito pensato:"sono fottuto". Vado a smadonnare sul forumo della Samsung, ritorno qui, accendo il computer e tutto funziona correttamente. Lancio uno smartclt --all http://bpaste.net/show/290947/ e vedo che ora il disco usa il nuovo firmware. Faccio un test per vedere la velocita'

venus realnot # hdparm -Tt /dev/sda:


/dev/sda:
 Timing cached reads:   26238 MB in  2.00 seconds = 13133.52 MB/sec
 Timing buffered disk reads: 984 MB in  3.00 seconds = 327.63 MB/sec


Vedo che c'e' un netto miglioramento, ma sono ancora lontano dai 500 MB/s
_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
sabayonino
Apprentice
Apprentice


Joined: 03 Jan 2012
Posts: 255

PostPosted: Wed May 21, 2014 5:48 pm    Post subject: Reply with quote

8) l'aggiornamento dei firmware e dei bios è sempre molto delicato ... non vorrei esser stato nei tuoi panni 8O

non ricordo se hai provato anche a sostituire il cavo SATA

stai utilizzando (o semplicemente riciclando)un cavo SATA che potrebbe dare "problemi" ?
(anche se l'interfaccia dovrebbe essere la stessa, quello che cambia è il controller)




:roll:
_________________
BOINC ed il calcolo distribuito
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Wed May 21, 2014 6:27 pm    Post subject: Reply with quote

Si', ho provato a sostituirlo, ed infatti aveva risolto alcuni problemi iniziali, come aveva suggerito Kikko. Ora sto usando i cavi sata originali di Dell (sul cavo c'e' pure scritto 6 GB/s).
_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Wed May 21, 2014 6:51 pm    Post subject: Reply with quote

Sto tizio ha il mio stesso disco con lo stesso firmware: https://wiki.archlinux.org/index.php/SSD_Benchmarking#SAMSUNG_840_evo_128GB

In SATA II va come me in SATA III, come faccio a sapere se il disco sia effettivamente in SATA 2 o 3?
_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
sabayonino
Apprentice
Apprentice


Joined: 03 Jan 2012
Posts: 255

PostPosted: Wed May 21, 2014 6:51 pm    Post subject: Reply with quote

8O e cambiando porta ?

da ATA1--> ATA2 ?

riprova col test/dmesg e compagnia bella

a mali estremi , estremi rimedi ... provare il dosco se ne hai la possibilità o su un'altra scheda madre

o su un PC portatile utilizzando una Live :roll:

sempre con i medesimi test/controlli etc ...

:roll: si voglia mai che alla mobo stia indigesto quel SSD :twisted:
_________________
BOINC ed il calcolo distribuito
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 117
Location: Ferrara

PostPosted: Wed May 21, 2014 8:00 pm    Post subject: Reply with quote

Ora non riesco, ma tra un mesetto mi arrivano 4x Dell Optiplex 9020, stessa configurazione solo che hanno il i7-4770 invece del i7-3770 poi provo a vedere. Grazie per il tuo tempo :)
_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum