Re: [RFC][PATCH] libata: enable SATA disk fua detection on default

2012-09-09 Thread Arvydas Sidorenko
 Meanwhile there already has a number of SATA disks that have supported
 this feature.  So I think maybe we can enable it.

 Regards,
 Zheng

Blindly enabling FUA by default in my opinion is not a good idea at all.
I believe the focus should be on detecting FUA support on the device
instead, which the kernel at this point cannot reliably do (is it possible?).

This patch introduced regression: https://lkml.org/lkml/2012/8/27/66

Arvydas
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH] libata: enable SATA disk fua detection on default

2012-09-09 Thread Jeff Garzik

On 09/09/2012 04:34 PM, Arvydas Sidorenko wrote:

Meanwhile there already has a number of SATA disks that have supported
this feature.  So I think maybe we can enable it.

Regards,
Zheng


Blindly enabling FUA by default in my opinion is not a good idea at all.
I believe the focus should be on detecting FUA support on the device
instead, which the kernel at this point cannot reliably do (is it possible?).


Premature assumptions.  It is entirely possible that FUA is detected 
accurately, but the software is missing a flush somewhere that FUA 
requires, if disks are to be used in FUA mode.


The filesystem and the block layer must properly generate and order 
their I/Os based on the FUA enablement bits that appear in the block 
layer after libata discovers the SATA FUA feature.


Jeff




--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Enabling FUA for SATA drives (was Re: [RFC][PATCH] libata: enable SATA disk fua detection on default)

2012-08-17 Thread Jeff Garzik

On 05/07/2012 11:24 PM, Zheng Liu wrote:

From: Zheng Liu wenqing...@taobao.com

Currently, SATA disk fua detection is disabled on default because most of
devices don't support this feature at that time.  With the development of
technology, more and more SATA disks support this feature.  So now we can enable
this detection on default.

Although fua detection is defined as a kernel module parameter, it is too hard
to set its value because it must be loaded and set before system starts up.
That needs to modify initrd file.  So it is inconvenient for administrator who
needs to manage a huge number of servers.

CC: Jeff Garzik j...@garzik.org
Signed-off-by: Zheng Liu wenqing...@taobao.com
---
  drivers/ata/libata-core.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 23763a1..3627251 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -133,9 +133,9 @@ int atapi_passthru16 = 1;
  module_param(atapi_passthru16, int, 0444);
  MODULE_PARM_DESC(atapi_passthru16, Enable ATA_16 passthru for ATAPI devices 
(0=off, 1=on [default]));

-int libata_fua = 0;
+int libata_fua = 1;
  module_param_named(fua, libata_fua, int, 0444);
-MODULE_PARM_DESC(fua, FUA support (0=off [default], 1=on));
+MODULE_PARM_DESC(fua, FUA support (0=off, 1=on [default]));


Applied.  Let's see how far down the rabbit hole we go ;-)

The FUA decision, as previously indicated, was based on early SATA 
drives, and perhaps better ones are available now.  Only testing will 
tell, at this point.


The larger questions, raised by Christoph and others remain unaddressed 
(though perhaps we can start addressing them now, with this patch):


* what is smart flushing policy for ATA devices with FUA?

* ATA NCQ's flush is not queued

* ATA NCQ always had the FUA bit...

* ...but mixing ATA NCQ FUA and !FUA in a queue is not fully supported 
by the existing code


and probably a few other details I forgot :)

Jeff







--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html