Bug 105861
Summary: | lookahead is reflected in cache mode page as DRA but cannot be set through it | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | Tom Yan (tom.ty89) |
Component: | Serial ATA | Assignee: | Tejun Heo (tj) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.2.2 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Tom Yan
2015-10-13 02:41:18 UTC
Actually DRA is only reflected after WCE is touched: [tom@localhost ~]$ sudo smartctl --get all /dev/sda smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.2.3-1-ARCH] (local build) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org AAM feature is: Unavailable APM level is: 254 (maximum performance) Rd look-ahead is: Enabled Write cache is: Enabled ATA Security is: Disabled, NOT FROZEN [SEC1] [tom@localhost ~]$ sudo sdparm -p ca --long /dev/sda /dev/sda: ATA INTEL SSDSC2BW24 DC32 Direct access device specific parameters: WP=0 DPOFUA=0 Caching (SBC) [ca] mode page: IC 0 [cha: n, def: 0] Initiator control ABPF 0 [cha: n, def: 0] Abort pre-fetch CAP 0 [cha: n, def: 0] Caching analysis permitted DISC 0 [cha: n, def: 0] Discontinuity SIZE 0 [cha: n, def: 0] Size enable WCE 1 [cha: y, def: 1] Write cache enable MF 0 [cha: n, def: 0] Multiplication factor RCD 0 [cha: n, def: 0] Read cache disable DRRP 0 [cha: n, def: 0] Demand read retention priority WRP 0 [cha: n, def: 0] Write retention priority DPTL 0 [cha: n, def: 0] Disable pre-fetch transfer length MIPF 0 [cha: n, def: 0] Minimum pre-fetch MAPF 0 [cha: n, def: 0] Maximum pre-fetch MAPFC 0 [cha: n, def: 0] Maximum pre-fetch ceiling FSW 0 [cha: n, def: 0] Force sequential write LBCSS 0 [cha: n, def: 0] Logical block cache segment size DRA 0 [cha: n, def: 0] Disable read ahead SYNC_PROG 0 [cha: n, def: 0] Synchronous cache progress indication NV_DIS 0 [cha: n, def: 0] Non-volatile cache disable NCS 0 [cha: n, def: 0] Number of cache segments CSS 0 [cha: n, def: 0] Cache segment size [tom@localhost ~]$ sudo smartctl --set lookahead,off /dev/sda smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.2.3-1-ARCH] (local build) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF ENABLE/DISABLE COMMANDS SECTION === Read look-ahead disabled [tom@localhost ~]$ sudo sdparm -p ca --long /dev/sda /dev/sda: ATA INTEL SSDSC2BW24 DC32 Direct access device specific parameters: WP=0 DPOFUA=0 Caching (SBC) [ca] mode page: IC 0 [cha: n, def: 0] Initiator control ABPF 0 [cha: n, def: 0] Abort pre-fetch CAP 0 [cha: n, def: 0] Caching analysis permitted DISC 0 [cha: n, def: 0] Discontinuity SIZE 0 [cha: n, def: 0] Size enable WCE 1 [cha: y, def: 1] Write cache enable MF 0 [cha: n, def: 0] Multiplication factor RCD 0 [cha: n, def: 0] Read cache disable DRRP 0 [cha: n, def: 0] Demand read retention priority WRP 0 [cha: n, def: 0] Write retention priority DPTL 0 [cha: n, def: 0] Disable pre-fetch transfer length MIPF 0 [cha: n, def: 0] Minimum pre-fetch MAPF 0 [cha: n, def: 0] Maximum pre-fetch MAPFC 0 [cha: n, def: 0] Maximum pre-fetch ceiling FSW 0 [cha: n, def: 0] Force sequential write LBCSS 0 [cha: n, def: 0] Logical block cache segment size DRA 0 [cha: n, def: 0] Disable read ahead SYNC_PROG 0 [cha: n, def: 0] Synchronous cache progress indication NV_DIS 0 [cha: n, def: 0] Non-volatile cache disable NCS 0 [cha: n, def: 0] Number of cache segments CSS 0 [cha: n, def: 0] Cache segment size [tom@localhost ~]$ sudo smartctl --set wcache,on /dev/sda smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.2.3-1-ARCH] (local build) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF ENABLE/DISABLE COMMANDS SECTION === Write cache enabled [tom@localhost ~]$ sudo sdparm -p ca --long /dev/sda /dev/sda: ATA INTEL SSDSC2BW24 DC32 Direct access device specific parameters: WP=0 DPOFUA=0 Caching (SBC) [ca] mode page: IC 0 [cha: n, def: 0] Initiator control ABPF 0 [cha: n, def: 0] Abort pre-fetch CAP 0 [cha: n, def: 0] Caching analysis permitted DISC 0 [cha: n, def: 0] Discontinuity SIZE 0 [cha: n, def: 0] Size enable WCE 1 [cha: y, def: 1] Write cache enable MF 0 [cha: n, def: 0] Multiplication factor RCD 0 [cha: n, def: 0] Read cache disable DRRP 0 [cha: n, def: 0] Demand read retention priority WRP 0 [cha: n, def: 0] Write retention priority DPTL 0 [cha: n, def: 0] Disable pre-fetch transfer length MIPF 0 [cha: n, def: 0] Minimum pre-fetch MAPF 0 [cha: n, def: 0] Maximum pre-fetch MAPFC 0 [cha: n, def: 0] Maximum pre-fetch ceiling FSW 0 [cha: n, def: 0] Force sequential write LBCSS 0 [cha: n, def: 0] Logical block cache segment size DRA 1 [cha: n, def: 1] Disable read ahead SYNC_PROG 0 [cha: n, def: 0] Synchronous cache progress indication NV_DIS 0 [cha: n, def: 0] Non-volatile cache disable NCS 0 [cha: n, def: 0] Number of cache segments CSS 0 [cha: n, def: 0] Cache segment size Or even more clearly: [tom@localhost ~]$ sudo smartctl --set lookahead,off /dev/sdb smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.5.1-1-ARCH] (local build) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF ENABLE/DISABLE COMMANDS SECTION === Read look-ahead disabled [tom@localhost ~]$ sudo sdparm --get=DRA /dev/sdb /dev/sdb: ATA INTEL SSDSC2BW24 DC32 DRA 0 [cha: n, def: 0] [tom@localhost ~]$ sudo smartctl --set wcache,on /dev/sdb smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.5.1-1-ARCH] (local build) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF ENABLE/DISABLE COMMANDS SECTION === Write cache enabled [tom@localhost ~]$ sudo sdparm --get=DRA /dev/sdb /dev/sdb: ATA INTEL SSDSC2BW24 DC32 DRA 1 [cha: n, def: 1] [tom@localhost ~]$ sudo smartctl --set lookahead,on /dev/sdb smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.5.1-1-ARCH] (local build) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF ENABLE/DISABLE COMMANDS SECTION === Read look-ahead enabled [tom@localhost ~]$ sudo sdparm --get=DRA /dev/sdb /dev/sdb: ATA INTEL SSDSC2BW24 DC32 DRA 1 [cha: n, def: 1] [tom@localhost ~]$ sudo smartctl --set wcache,on /dev/sdb smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.5.1-1-ARCH] (local build) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF ENABLE/DISABLE COMMANDS SECTION === Write cache enabled [tom@localhost ~]$ sudo sdparm --get=DRA /dev/sdb /dev/sdb: ATA INTEL SSDSC2BW24 DC32 DRA 0 [cha: n, def: 0] Commit 0c12735e8abf ("libata-scsi: fix SET FEATURES "filtering" for ata_msense_caching()") applied to libata/for-4.8 |