Re: Merging fails reading /dev/uba1

From: Pete Zaitcev
Date: Mon Feb 21 2005 - 19:43:59 EST


On Mon, 21 Feb 2005 12:00:48 -0800 (PST), Linus Torvalds <torvalds@xxxxxxxx> wrote:

> That said, I'm surprised that the difference in performance is _that_
> large. Regardless of whether the disk blocksize is 512 bytes or 4096
> bytes, you should be getting IO merging - it might use more CPU time, but
> the actual IO should still be done in much larger blocks.

I am surprised too. Jens says "ub effectively disables merging by setting
max hw/phys segment limit of 1." But surely this ought not to be a problem
for reads within the same page.

> int size = 4096;
> ioctl(fd, BLKBSZSET, &size);

Thank you for the tip. This works fine, 4KB I/O is restored for dd.
However, I still have this problem with people who use ub to read CF sticks
from their cameras, mounted as FAT or VFAT. I verified that the effect of
this ioctl disappears at mount time, just as you said.

I'll think what I can do about it.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/