Re: [PATCH 2.6.22-rc7] libata: quirk IOMEGA ZIP 250 ATAPI FLOPPY

2007-07-05 Thread Alan Cox
 but IDE simply ignores the error and continues to operate in MWDMA
 mode, so I guess we can remove the 'temporary fix' comment or add
 another quirk type - ATA_HORKAGE_SETXFER_MAY_FAIL - and use it.

Should we warn in these cases ? Or issue a new identify and check the
mode activated ?

Alan
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/2] 2.6.22-rc7: known regressions

2007-07-05 Thread Linus Torvalds


On Wed, 4 Jul 2007, David Woodhouse wrote:
 
 Oh, and here's another one for you. My Bluetooth mouse just stopped
 working and hidd is deadlocked...

Looks like it is stuck on hidp_session_sem.

Nothing after 2.6.21 seems to have even touched that semaphore usage, and 
in fact there's not a whole lot of changes to the hidp code at all (and 
none of them look even remotely interesting). 

So I suspect it's something lower down in the bluetooth stack, or it's a 
long-standing problem that you are somehow able to trigger more easily 
now. Is it consistent?

Can you showo the traces for the _other_ processes that are in bluetooth 
functions? Because there should be other processes there, holding that 
hidp_session_sem rwsem.

[ Alternatively, there is some process that doesn't release it in an error 
  case, but that is definitely not a regression if so: the changes to 
  net/bluetooth/hidp/core.c since 2.6.21 really are trivial. ]

IOW, more info needed, I think.

Linus

---
 hidd  D 1FE27798  5940  1695  1 (NOTLB)
 Call Trace:
 [ef3ddb70] [0004] 0x4 (unreliable)
 [ef3ddc30] [c0008e7c] __switch_to+0x50/0x68
 [ef3ddc50] [c02d5998] schedule+0x3cc/0x480
 [ef3ddc80] [c0137a20] rwsem_down_failed_common+0x1c4/0x1f4
 [ef3ddcb0] [c02d7454] rwsem_down_write_failed+0x28/0x40
 [ef3ddce0] [c004ff60] down_write+0x50/0x64
 [ef3ddd00] [f27f2068] hidp_add_connection+0x168/0x75c [hidp]
 [ef3ddd40] [f27f2e44] hidp_sock_ioctl+0x140/0x414 [hidp]
 [ef3ddeb0] [c024da6c] sock_ioctl+0x248/0x284
 [ef3dded0] [c00ab02c] do_ioctl+0x38/0x84
 [ef3ddee0] [c00ab448] vfs_ioctl+0x3d0/0x404
 [ef3ddf10] [c00ab4e4] sys_ioctl+0x68/0x98
 
 -- 
 dwmw2
 
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/2] 2.6.22-rc7: known regressions

2007-07-05 Thread David Woodhouse
On Thu, 2007-07-05 at 09:28 -0700, Linus Torvalds wrote:
 
 On Wed, 4 Jul 2007, David Woodhouse wrote:
  
  Oh, and here's another one for you. My Bluetooth mouse just stopped
  working and hidd is deadlocked...
 
 Looks like it is stuck on hidp_session_sem.
 
 Nothing after 2.6.21 seems to have even touched that semaphore usage, and 
 in fact there's not a whole lot of changes to the hidp code at all (and 
 none of them look even remotely interesting). 
 
 So I suspect it's something lower down in the bluetooth stack, or it's a 
 long-standing problem that you are somehow able to trigger more easily 
 now. Is it consistent?

It happened twice before I gave up on my 2.6.22-rc7 test kernel and went
back to something earlier. I suppose I should double-check that it
wasn't my slab changes, but I really don't think that's it.

 Can you showo the traces for the _other_ processes that are in bluetooth 
 functions? Because there should be other processes there, holding that 
 hidp_session_sem rwsem.

There was nothing, apart from a later 'hidd -l' which got stuck on the
same semaphore. I have an hcidump of it happening, at
http://david.woodhou.se/hidd-lockup-dump.txt -- it doesn't seem
particularly enlightening though. There's just a disconnection and
reconnect, as happens quite frequently with this mouse, and then we're
deadlocked. I'll build with hidp debugging.

-- 
dwmw2

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: libata ignore_hpa=1 doesn't wok on SATA ?

2007-07-05 Thread Chuck Ebbert
On 07/04/2007 08:00 PM, yong Jung wrote:
 Hi,
 .
 I would like to see the whole disk area and erase the
 hpa area in my desktop.
 At first I tried setmax.c program but it didn't work
 on SATA at least.
 So I upgraeded it to FC7 and added libata
 ignore_hpa=1 option on boot command and
 /etc/modprobe.conf. 
 This option was accepted but still the kernel couldn't
 see the whole disk area even after reboot.

That's libata.ignore_hpa=1

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/2] 2.6.22-rc7: known regressions

2007-07-05 Thread David Woodhouse
On Thu, 2007-07-05 at 09:28 -0700, Linus Torvalds wrote:
 
 On Wed, 4 Jul 2007, David Woodhouse wrote:
  
  Oh, and here's another one for you. My Bluetooth mouse just stopped
  working and hidd is deadlocked...
 
 Looks like it is stuck on hidp_session_sem.

Oh, I suck. I failed to noticed that it had oopsed earlier, in slab
debugging. I shall look at my 'obviously correct' slab patch a little
harder, now that I'm not distracted by the fireworks.

-- 
dwmw2

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [1/2] 2.6.22-rc7: known regressions

2007-07-05 Thread Linus Torvalds

Looks input-related..

On Thu, 5 Jul 2007, David Woodhouse wrote:
 
 Hm, it's not something new. It's an oops I saw occasionally in 2.6.21-rc
 too, whenever we had CONFIG_SYSFS_DEPRECATED set.
 
  Unable to handle kernel paging request for data at address 0x6b6b6b6b

Ok, that 0x6b is obviously the kfree() poisoning, ie it looks like a 
use-after-free problem with a pointer being loaded from a structure that 
had been free'd-

And the trace seems to be (ignore the unreliable one):

  NIP [c001870c] strlen+0x4/0x18
  LR [c0134fec] kobject_get_path+0x34/0xc4
  Call Trace:
  [eed5be90] [c01d5124] class_uevent+0xac/0x1bc
  [eed5bed0] [c01357e4] kobject_uevent_env+0x23c/0x460
  [eed5bf20] [c01d485c] class_device_del+0x178/0x1a0
  [eed5bf40] [c01d489c] class_device_unregister+0x18/0x30
  [eed5bf60] [c021f820] input_unregister_device+0xf4/0x130
  [eed5bf70] [c0242f4c] hidinput_disconnect+0x2c/0x60
  [eed5bf90] [f27f2bac] hidp_session+0x550/0x584 [hidp]
  [eed5bff0] [c0013e28] kernel_thread+0x44/0x60

Where we have a few missing functions due to inlining, ie the real 
sequence seems to be:

class_device_del -
  kobject_uevent_env -
class_uevent -
  kobject_get_path -
get_kobj_path_length -
  parent = kobj;
  do {
strlen(parent-k_name /* kobject_name(parent) */);
parent = parent-parent;
  } while (parent);

so either the kobj or one of it's parents had already been freed when it 
was unregistered due to the disconnect.

I'm not seeing any reference counting or other protection for the device 
(input) on hid-inputs list. But I don't know the code. Dmitry? Jiri?

Linus
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 0/4] SATA power savings patches (ALPM)

2007-07-05 Thread Kristen Carlson Accardi
Hi Jeff,
Here's the most recent patches for ALPM.  These are also located at:
http://www.kernel.org/pub/linux/kernel/people/kristen/patches/SATA/alpm

These patches implement Aggressive Link Power management for AHCI 
controllers.  This feature is described in detail in the AHCI 1.x spec.
It provides power savings of anywhere from .5-1.5 Watts depending on
the system when it is enabled.  (a graph demonstrating power savings
of this patch along with other power patches is located at 
http://www.linuxpowertop.org/results.php for your enjoyment).

This patch is changed from the previous version in that it incorporates all
the feedback I've gotten on the patches to date.  It changes the default
of the ahci driver to be max_performance rather than min_power, so userspace
will need to explicitly enable alpm via the sysfs interface when it deems
it an appropriate time to do this.  In addition, the patch was changed to
allow either HIPM or DIPM as a prerequisite for enabling ALPM, rather than 
just using HIPM.

Thanks,
Kristen
-- 
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 1/4] Store interrupt value

2007-07-05 Thread Kristen Carlson Accardi
Use a stored value for which interrupts to enable.  Changing this allows
us to selectively turn off certain interrupts later and have them 
stay off.

Signed-off-by:  Kristen Carlson Accardi [EMAIL PROTECTED]

Index: 2.6-git/drivers/ata/ahci.c
===
--- 2.6-git.orig/drivers/ata/ahci.c
+++ 2.6-git/drivers/ata/ahci.c
@@ -211,6 +211,7 @@ struct ahci_port_priv {
unsigned intncq_saw_d2h:1;
unsigned intncq_saw_dmas:1;
unsigned intncq_saw_sdb:1;
+   u32 intr_mask;  /* interrupts to enable */
 };
 
 static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg);
@@ -1408,6 +1409,7 @@ static void ahci_thaw(struct ata_port *a
void __iomem *mmio = ap-host-iomap[AHCI_PCI_BAR];
void __iomem *port_mmio = ahci_port_base(ap);
u32 tmp;
+   struct ahci_port_priv *pp = ap-private_data;
 
/* clear IRQ */
tmp = readl(port_mmio + PORT_IRQ_STAT);
@@ -1415,7 +1417,7 @@ static void ahci_thaw(struct ata_port *a
writel(1  ap-port_no, mmio + HOST_IRQ_STAT);
 
/* turn IRQ back on */
-   writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK);
+   writel(pp-intr_mask, port_mmio + PORT_IRQ_MASK);
 }
 
 static void ahci_error_handler(struct ata_port *ap)
@@ -1571,6 +1573,12 @@ static int ahci_port_start(struct ata_po
pp-cmd_tbl = mem;
pp-cmd_tbl_dma = mem_dma;
 
+   /*
+* Save off initial list of interrupts to be enabled.
+* This could be changed later
+*/
+   pp-intr_mask = DEF_PORT_IRQ;
+
ap-private_data = pp;
 
/* power up port */

-- 
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 3/4] Enable link power management for ata drivers

2007-07-05 Thread Kristen Carlson Accardi
libata drivers can define a function (enable_pm) that will
perform hardware specific actions to enable whatever power
management policy the user set up from the scsi sysfs 
interface if the driver supports it.  This power management 
policy will be activated after all disks have been 
enumerated and intialized.  Drivers should also define
disable_pm, which will turn off link power management, but
not change link power management policy.

Signed-off-by:  Kristen Carlson Accardi [EMAIL PROTECTED]
Index: 2.6-git/drivers/ata/libata-scsi.c
===
--- 2.6-git.orig/drivers/ata/libata-scsi.c
+++ 2.6-git/drivers/ata/libata-scsi.c
@@ -2905,6 +2905,51 @@ void ata_scsi_simulate(struct ata_device
}
 }
 
+int ata_scsi_set_link_pm_policy(struct Scsi_Host *shost,
+   enum scsi_host_link_pm policy)
+{
+   struct ata_port *ap = ata_shost_to_port(shost);
+   int rc = -EINVAL;
+   int i;
+
+   /*
+* make sure no broken devices are on this port,
+* and that all devices support interface power
+* management
+*/
+   for (i = 0; i  ATA_MAX_DEVICES; i++) {
+   struct ata_device *dev = ap-device[i];
+
+   /* only check drives which exist */
+   if (!ata_dev_enabled(dev))
+   continue;
+
+   /*
+* do we need to handle the case where we've hotplugged
+* a broken drive (since hotplug and ALPM are mutually
+* exclusive) ?
+*
+* If so, if we detect a broken drive on a port with
+* alpm already enabled, then we should reset the policy
+* to off for the entire port.
+*/
+   if ((dev-horkage  ATA_HORKAGE_ALPM) ||
+   !(dev-flags  ATA_DFLAG_IPM)) {
+   ata_dev_printk(dev, KERN_ERR,
+   Unable to set Link PM policy\n);
+   ap-pm_policy = SHOST_MAX_PERFORMANCE;
+   }
+   }
+
+   if (ap-ops-enable_pm)
+   rc = ap-ops-enable_pm(ap, policy);
+
+   if (!rc)
+   shost-shost_link_pm_policy = ap-pm_policy;
+   return rc;
+}
+EXPORT_SYMBOL_GPL(ata_scsi_set_link_pm_policy);
+
 int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
 {
int i, rc;
@@ -2927,7 +2972,7 @@ int ata_scsi_add_hosts(struct ata_host *
shost-max_lun = 1;
shost-max_channel = 1;
shost-max_cmd_len = 16;
-
+   shost-shost_link_pm_policy = ap-pm_policy;
rc = scsi_add_host(ap-scsi_host, ap-host-dev);
if (rc)
goto err_add;
Index: 2.6-git/include/linux/libata.h
===
--- 2.6-git.orig/include/linux/libata.h
+++ 2.6-git/include/linux/libata.h
@@ -136,6 +136,7 @@ enum {
ATA_DFLAG_CDB_INTR  = (1  2), /* device asserts INTRQ when ready 
for CDB */
ATA_DFLAG_NCQ   = (1  3), /* device supports NCQ */
ATA_DFLAG_FLUSH_EXT = (1  4), /* do FLUSH_EXT instead of FLUSH */
+   ATA_DFLAG_IPM   = (1  6), /* device supports interface PM */
ATA_DFLAG_CFG_MASK  = (1  8) - 1,
 
ATA_DFLAG_PIO   = (1  8), /* device limited to PIO mode */
@@ -298,6 +299,7 @@ enum {
ATA_HORKAGE_NODMA   = (1  1), /* DMA problems */
ATA_HORKAGE_NONCQ   = (1  2), /* Don't use NCQ */
ATA_HORKAGE_MAX_SEC_128 = (1  3), /* Limit max sects to 128 */
+   ATA_HORKAGE_ALPM= (1  4), /* ALPM problems */
 };
 
 enum hsm_task_states {
@@ -546,6 +548,7 @@ struct ata_port {
 
pm_message_tpm_mesg;
int *pm_result;
+   enum scsi_host_link_pm  pm_policy;
 
void*private_data;
 
@@ -605,7 +608,8 @@ struct ata_port_operations {
 
int (*port_suspend) (struct ata_port *ap, pm_message_t mesg);
int (*port_resume) (struct ata_port *ap);
-
+   int (*enable_pm) (struct ata_port *ap, enum scsi_host_link_pm policy);
+   int (*disable_pm) (struct ata_port *ap);
int (*port_start) (struct ata_port *ap);
void (*port_stop) (struct ata_port *ap);
 
@@ -811,7 +815,7 @@ extern int ata_cable_40wire(struct ata_p
 extern int ata_cable_80wire(struct ata_port *ap);
 extern int ata_cable_sata(struct ata_port *ap);
 extern int ata_cable_unknown(struct ata_port *ap);
-
+extern int ata_scsi_set_link_pm_policy(struct Scsi_Host *shost, enum 
scsi_host_link_pm);
 /*
  * Timing helpers
  */
Index: 2.6-git/drivers/ata/libata-core.c
===
--- 2.6-git.orig/drivers/ata/libata-core.c
+++ 2.6-git/drivers/ata/libata-core.c
@@ -2021,6 +2021,9 @@ int ata_dev_configure(struct ata_device 
if 

[patch 4/4] Enable Aggressive Link Power management for AHCI controllers.

2007-07-05 Thread Kristen Carlson Accardi
This patch will set the correct bits to turn on Aggressive
Link Power Management (ALPM) for the ahci driver.  This
will cause the controller and disk to negotiate a lower
power state for the link when there is no activity (see
the AHCI 1.x spec for details).  This feature is mutually
exclusive with Hot Plug, so when ALPM is enabled, Hot Plug
is disabled.  ALPM will be enabled by default, but it is
settable via the scsi host syfs interface.  Possible 
settings for this feature are:

Setting Effect
--
min_power   ALPM is enabled, and link set to enter 
lowest power state (SLUMBER) when idle
Hot plug not allowed.

max_performance ALPM is disabled, Hot Plug is allowed

medium_powerALPM is enabled, and link set to enter
second lowest power state (PARTIAL) when
idle.  Hot plug not allowed.

Signed-off-by:  Kristen Carlson Accardi [EMAIL PROTECTED]

Index: 2.6-git/drivers/ata/ahci.c
===
--- 2.6-git.orig/drivers/ata/ahci.c
+++ 2.6-git/drivers/ata/ahci.c
@@ -48,6 +48,9 @@
 #define DRV_NAME   ahci
 #define DRV_VERSION2.2
 
+static int ahci_enable_alpm(struct ata_port *ap,
+   enum scsi_host_link_pm policy);
+static int ahci_disable_alpm(struct ata_port *ap);
 
 enum {
AHCI_PCI_BAR= 5,
@@ -97,6 +100,7 @@ enum {
/* HOST_CAP bits */
HOST_CAP_SSC= (1  14), /* Slumber capable */
HOST_CAP_CLO= (1  24), /* Command List Override support */
+   HOST_CAP_ALPM   = (1  26), /* Aggressive Link PM support */
HOST_CAP_SSS= (1  27), /* Staggered Spin-up */
HOST_CAP_NCQ= (1  30), /* Native Command Queueing */
HOST_CAP_64 = (1  31), /* PCI DAC (64-bit DMA) support */
@@ -151,6 +155,8 @@ enum {
  PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS,
 
/* PORT_CMD bits */
+   PORT_CMD_ASP= (1  27), /* Aggressive Slumber/Partial */
+   PORT_CMD_ALPE   = (1  26), /* Aggressive Link PM enable */
PORT_CMD_ATAPI  = (1  24), /* Device is ATAPI */
PORT_CMD_LIST_ON= (1  15), /* cmd list DMA engine running */
PORT_CMD_FIS_ON = (1  14), /* FIS DMA engine running */
@@ -171,6 +177,7 @@ enum {
AHCI_FLAG_HONOR_PI  = (1  26), /* honor PORTS_IMPL */
AHCI_FLAG_IGN_SERR_INTERNAL = (1  27), /* ignore SERR_INTERNAL */
AHCI_FLAG_32BIT_ONLY= (1  28), /* force 32bit */
+   AHCI_FLAG_NO_HOTPLUG= (1  29), /* ignore PxSERR.DIAG.N */
 
AHCI_FLAG_COMMON= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
  ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
@@ -253,6 +260,7 @@ static struct scsi_host_template ahci_sh
.slave_configure= ata_scsi_slave_config,
.slave_destroy  = ata_scsi_slave_destroy,
.bios_param = ata_std_bios_param,
+   .set_link_pm_policy = ata_scsi_set_link_pm_policy,
 };
 
 static const struct ata_port_operations ahci_ops = {
@@ -284,6 +292,8 @@ static const struct ata_port_operations 
.port_suspend   = ahci_port_suspend,
.port_resume= ahci_port_resume,
 #endif
+   .enable_pm  = ahci_enable_alpm,
+   .disable_pm = ahci_disable_alpm,
 
.port_start = ahci_port_start,
.port_stop  = ahci_port_stop,
@@ -719,6 +729,156 @@ static void ahci_power_up(struct ata_por
writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD);
 }
 
+static int ahci_disable_alpm(struct ata_port *ap)
+{
+   void __iomem *port_mmio = ahci_port_base(ap);
+   u32 cmd, scontrol;
+   struct ahci_port_priv *pp = ap-private_data;
+
+   /*
+* disable Interface Power Management State Transitions
+* This is accomplished by setting bits 8:11 of the
+* SATA Control register
+*/
+   scontrol = readl(port_mmio + PORT_SCR_CTL);
+   scontrol |= (0x3  8);
+   writel(scontrol, port_mmio + PORT_SCR_CTL);
+
+   /* get the existing command bits */
+   cmd = readl(port_mmio + PORT_CMD);
+
+   /* disable ALPM and ASP */
+   cmd = ~PORT_CMD_ASP;
+   cmd = ~PORT_CMD_ALPE;
+
+   /* force the interface back to active */
+   cmd |= PORT_CMD_ICC_ACTIVE;
+
+   /* write out new cmd value */
+   writel(cmd, port_mmio + PORT_CMD);
+   cmd = readl(port_mmio + PORT_CMD);
+
+   /* wait 10ms to be sure we've come out of any low power state */
+   msleep(10);
+
+   /* clear out any PhyRdy stuff from interrupt status */
+   writel(PORT_IRQ_PHYRDY, port_mmio + PORT_IRQ_STAT);
+
+   /* go ahead and clean out PhyRdy Change from Serror too */
+   ahci_scr_write(ap, 

Re: [patch 2.6.22-rc6] ATA: add a PCI ID for Intel Santa Rosa PATA controller

2007-07-05 Thread Alan Cox
 Maybe Alan or someone from Intel can answer that and thus tell us how to
 move forward; it would be really nice to get the patch that started this
 thread (it got posted by Chuck again today) could go into 2.6.22, but I
 assume the time runs away...

Folks should be back Monday I suspect. Its the US indepenence day (or
from UK perspective 'they day the terrorists won' 8) 

I don't have suitable systems to hand to test this and investigate
further.

Alan
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SATA RAID5 speed drop of 100 MB/s

2007-07-05 Thread Phillip Susi

Michael Tokarev wrote:

Single Seagate 74Gb SCSI drive (10KRPM)

BlkSz Trd linRd rndRd linWr  rndWr  linR/W rndR/W
   4k   1  66.4   0.5   0.6   0.5   0.6/ 0.6   0.4/ 0.2
2 0.6 0.6  0.5/ 0.1
4 0.7 0.6  0.6/ 0.2
  16k   1  84.8   2.0   2.5   1.9   2.5/ 2.5   1.6/ 0.6
2 2.3 2.1  2.0/ 0.6
4 2.7 2.5  2.3/ 0.6
  64k   1  84.8   7.4   9.3   7.2   9.4/ 9.3   5.8/ 2.2
2 8.6 7.9  7.3/ 2.1
4 9.9 9.1  8.1/ 2.2
 128k   1  84.8  13.6  16.7  12.9  16.9/16.6  10.6/ 3.9
215.614.4 13.5/ 3.2
417.916.4 15.7/ 2.7
 512k   1  84.9  34.0  41.9  33.3  29.0/27.1  22.4/13.2
236.934.5 30.7/ 8.1
440.538.1 33.2/ 8.3
1024k   1  83.1  36.0  55.8  34.6  28.2/27.6  20.3/19.4
245.244.1 36.4/ 9.9
448.147.6 40.7/ 7.1



snip


The only thing I don't understand is why with larger I/O block
size we see write speed drop with multiple threads.


Huh?  Your data table does not show larger block size dropping write 
speed.  47.6  38.1  16.4.



And in contrast to the above, here's another test run, now
with Seagate SATA ST3250620AS (desktop class) 250GB
7200RPM drive:

BlkSz Trd linRd rndRd linWr rndWr   linR/WrndR/W
   4k   1  47.5   0.3   0.5   0.3   0.3/ 0.3   0.1/ 0.1
2 0.3 0.3  0.2/ 0.1
4 0.3 0.3  0.2/ 0.2
  16k   1  78.4   1.1   1.8   1.1   0.9/ 0.9   0.6/ 0.6
2 1.2 1.1  0.6/ 0.6
4 1.3 1.2  0.6/ 0.6
  64k   1  78.4   4.3   6.7   4.0   3.5/ 3.5   2.1/ 2.2
2 4.5 4.1  2.2/ 2.3
4 4.7 4.2  2.3/ 2.4
 128k   1  78.4   8.0  12.6   7.2   6.2/ 6.2   3.9/ 3.8
2 8.2 7.3  4.1/ 4.0
4 8.7 7.7  4.3/ 4.3
 512k   1  78.5  23.1  34.0  20.3  17.1/17.1  11.3/10.7
223.520.6 11.3/11.4
424.721.3 11.6/11.8
1024k   1  78.4  34.1  33.5  24.6  19.6/19.5  16.0/12.7
233.324.6 15.4/13.8
434.325.0 14.7/15.0

Here, the (total) I/O speed does not depend on the number
of threads.  From which I conclude that the drive does
not reorder/optimize commands internally, even if NCQ is
enabled (queue depth is 32).


While the difference does not appear to be as pronounced as with the WD 
drive, the data does show more threads give more total IO.  4.7  4.5  
4.3 in the 64k rndRd test, and the other tests show an increase with 
more threads as well.



-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 3/4] Enable link power management for ata drivers

2007-07-05 Thread Andrew Morton
On Thu, 5 Jul 2007 13:05:30 -0700
Kristen Carlson Accardi [EMAIL PROTECTED] wrote:

 + ATA_DFLAG_IPM   = (1  6), /* device supports interface PM */
   ATA_DFLAG_CFG_MASK  = (1  8) - 1,

I had to bump this to (17), so we've run out.
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 3/4] Enable link power management for ata drivers

2007-07-05 Thread Andrew Morton
On Thu, 5 Jul 2007 15:33:34 -0700
Andrew Morton [EMAIL PROTECTED] wrote:

 On Thu, 5 Jul 2007 13:05:30 -0700
 Kristen Carlson Accardi [EMAIL PROTECTED] wrote:
 
  +   ATA_DFLAG_IPM   = (1  6), /* device supports interface PM */
  ATA_DFLAG_CFG_MASK  = (1  8) - 1,
 
 I had to bump this to (17), so we've run out.

err, no, we've more than run out because you AN patches took the last one.


I guess we can bump ATA_DFLAG_CFG_MASK up to 12, like this?

--- 
a/include/linux/libata.h~ata-ahci-alpm-enable-link-power-management-for-ata-drivers
+++ a/include/linux/libata.h
@@ -140,11 +140,12 @@ enum {
ATA_DFLAG_ACPI_PENDING  = (1  5), /* ACPI resume action pending */
ATA_DFLAG_ACPI_FAILED   = (1  6), /* ACPI on devcfg has failed */
ATA_DFLAG_AN= (1  7), /* device supports Async 
notification */
-   ATA_DFLAG_CFG_MASK  = (1  8) - 1,
+   ATA_DFLAG_IPM   = (1  8), /* device supports interface PM */
+   ATA_DFLAG_CFG_MASK  = (1  12) - 1,
 
-   ATA_DFLAG_PIO   = (1  8), /* device limited to PIO mode */
-   ATA_DFLAG_NCQ_OFF   = (1  9), /* device limited to non-NCQ mode */
-   ATA_DFLAG_SPUNDOWN  = (1  10), /* XXX: for spindown_compat */
+   ATA_DFLAG_PIO   = (1  12), /* device limited to PIO mode */
+   ATA_DFLAG_NCQ_OFF   = (1  13), /* device limited to non-NCQ mode 
*/
+   ATA_DFLAG_SPUNDOWN  = (1  14), /* XXX: for spindown_compat */
ATA_DFLAG_INIT_MASK = (1  16) - 1,
 
ATA_DFLAG_DETACH= (1  16),


-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2.6.22-rc7] libata: fix assigned IRQ reporting

2007-07-05 Thread Francois Romieu
Tejun Heo [EMAIL PROTECTED] :
[...]
 Apparently, I'm more confused than you are.  My master was at 872aad45
 but my index was at rc7.  Can you please force checkout the head and
 re-test?  I've tested both native and legacy modes and it's fixed here.

I have done a forced checkout + mrproper before rebuild and there is no
difference.

Complete dmesg is attached.

-- 
Ueimor


dmesg-20070705.gz
Description: GNU Zip compressed data


Re: [patch 3/4] Enable link power management for ata drivers

2007-07-05 Thread Andrew Morton
On Thu, 05 Jul 2007 20:02:08 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:

 May I assume that I may delete the patches from Kristen, and assume that 
 you will resend an updated version of her AN and ALPM patches to me?
 

Sure.  But I have a sneaking feeling that Kristen sneaks sneaky fixes into
her patches without telling me, so I won't be 100% confident about their
uptodateness (hint).


-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 3/4] Enable link power management for ata drivers

2007-07-05 Thread Jeff Garzik

Andrew Morton wrote:

On Thu, 5 Jul 2007 13:05:30 -0700
Kristen Carlson Accardi [EMAIL PROTECTED] wrote:


+   ATA_DFLAG_IPM   = (1  6), /* device supports interface PM */
ATA_DFLAG_CFG_MASK  = (1  8) - 1,


I had to bump this to (17), so we've run out.


You can shuffle the numbers a bit, as long as the masks (*_MASK) stay 
correct for their purpose


Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 3/4] Enable link power management for ata drivers

2007-07-05 Thread Jeff Garzik

Andrew Morton wrote:

I guess we can bump ATA_DFLAG_CFG_MASK up to 12, like this?


Yep

Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: + git-libata-all-fix.patch added to -mm tree

2007-07-05 Thread Jeff Garzik

[EMAIL PROTECTED] wrote:

The patch titled
 git-libata-all-fix
has been added to the -mm tree.  Its filename is
 git-libata-all-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

--
Subject: git-libata-all-fix
From: Andrew Morton [EMAIL PROTECTED]

drivers/ata/libata-core.c:4253: error: redefinition of 'ata_fill_sg_dumb'
drivers/ata/libata-core.c:4191: error: previous definition of 
'ata_fill_sg_dumb' was here
drivers/ata/libata-core.c:4375: error: redefinition of 'ata_dumb_qc_prep'
drivers/ata/libata-core.c:4358: error: previous definition of 
'ata_dumb_qc_prep' was here

Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---

 drivers/ata/libata-core.c |   79 
 1 file changed, 79 deletions(-)


I think Tejun did something similar.

Alas, I only had time to concentrate on 2.6.22-rc before I left for July 
4th.  That left libata-dev.git in a minorly broken state, for everything 
other than #master and #upstream-fixes.  I should have that cleaned up 
in the next day or so.  My apologies.


Whee, bleeding edge...

Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/15] ide: add PIO masks

2007-07-05 Thread Jeff Garzik

Sergei Shtylyov wrote:

Hello.

Bartlomiej Zolnierkiewicz wrote:


* Add ATA_PIO[0-6] defines to linux/ata.h.



* Add -pio_mask field to ide_pci_device_t and ide_hwif_t.



* Add PIO masks to host drivers.


   Hm, the next logical step would be to use the mask constants in
linux/ata.h for the drivers' DMA caps too...


Certainly it is my hope to have share-able stuff in linux/ata.h that we 
all can use.  With ata_* (or ATA_*) prefix of course :)


Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Possible data corruption sata_sil24?

2007-07-05 Thread David Shaw
Hi everyone,

I'm having a problem with data corruption using devmapper on a SATA
disk using sata_sil24.  I've done some work tracking it down, and
hopefully you folks can point me further in the right direction.

The kernel I'm using is 2.6.21-1.3228.fc7 (i.e. Fedora 7).  LVM2 is
lvm2-2.02.24-1.fc7.  The dmsetup and libdevmapper is
device-mapper-1.02.17-7.fc7.

The original setup that showed the problem is this:

Starting with two 500GB SATA drives (interface card uses a Silicon
3124 chipset), /dev/sdd and /dev/sde.  I partitioned each into two
250GB chunks (250*1000*1000*1000, not 250*1024*1024*1024), and set up
two RAID 1 sets such that /dev/md0 is /dev/sdd1+/dev/sde1 and /dev/md2
is /dev/sdd2+/dev/sde2.  I then created a volume group (storage) on
top of /dev/md0 and /dev/md1.  Finally, I allocated two logical
volumes on top of that: one is -L300GB and two is -L100GB.

mke2fs -j -m0 on /dev/storage/one and /dev/storage/two, and it would
seem everything was fine, but after copying data to the two volumes,
they would fail a fsck in pretty dramatic fashion (dozens of errors
indicating pretty severe filesystem corruption).

I'll skip all the steps I tried when reducing this down to a simple
reproducible test case, but the end result is this:

1) Take a 500GB disk (as before, it's SATA plugged into a card using
   the sata_sil24 driver)

2) echo 0 482344960 linear 8:32 0 | dmsetup create one
   echo 0 209715200 linear 8:32 482345000 | dmsetup create two

3) mke2fs -j -m0 /dev/mapper/one
   mke2fs -j -m0 /dev/mapper/two
   mount /dev/mapper/one /one
   mount /dev/mapper/two /two

4) cd /one ; \
   for i in `seq 0 3`; do dd if=/dev/zero bs=4K count=1M of=$i; done ; \
   cd ; \
   umount /one

   cd /two ; \
   for i in `seq 0 3`; do dd if=/dev/zero bs=4K count=1M of=$i; done ; \
   cd ; \
   umount /two

5) fsck -f /dev/mapper/one
   fsck -f /dev/mapper/two

Both filesystems return many errors on fsck.  This is very repeatable.

Note that this simplified reproduction case uses only the device
mapper: RAID is not involved, nor is LVM.  dmsetup table says:

two: 0 209715200 linear 8:32 482345000
one: 0 482344960 linear 8:32 0

Just to be sure, I have run memtest86+ on the machine and badblocks on
the disk.  Both came up clean.  Partitioning the disk and mke2fs-ing
the partitions directly (i.e. no device-mapper), works fine.  It's
only when using the device-mapper does the corruption happen.  There
is nothing of interest logged in /var/log/messages or dmesg (I see the
usual messages around 'mount', but that's it).

Any suggestions?  Many thanks,

David
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html