Henning Meier-Geinitz wrote:
>
> Hi,
>
> On Thu, Jun 29, 2000 at 12:13:23AM +0200, Oliver Rauch wrote:
> > Henning Meier-Geinitz wrote:
> >
> > > Same here. I looked at the scanning times when the backend does nothing but
> > > getting data from the scanner and ignoring it. There was no big change in
> > > scanning time (about 5 %). With the original SCSI adapter the Mustek
> > > scanners are about twice as slow as with Windows despite large (4 MB) SCSI
> > > buffers and tweaking the Linux SCSI driver.
> >
> > 4 MB images are not the problem of the umax backend.
>
> I am not talking about image size but about SCSI buffer size. With most
> Mustek scanners and the Mustek SCSI adapters the scan stops after each read
> command and backtracking occurs. So I am trying to scan with large buffers.
> Standard is 1 MB at the moment. The scan speed is dependant from the
> resolution and image with (but not from length).
Henning,
Some info on Linux sg buffer sizes. DMA (used by most but not the very low
end SCSI adapters) requires continuous buffers. ["continuous" seen from the
PCI/ISA bus.] Linux actively discourages drivers taking big continuous
buffers. So sg takes 32 KB chunks (controlled by the SG_SCATTER_SZ define
in sg.h) and builds a scatter gather list. The adapter dictates the maximum
number of the scatter gather list elements which is further limited to
255 elements. So that makes the maximum size of sg's reserve buffer
(or any single command) just under 8 Megabytes. You can double
SG_SCATTER_SZ, rebuild sg and perhaps get that number up to just under
16 Megabytes.
Another consideration is that adapters using the ISA bus can only
use the bottom 16 Megabytes of memory on a machine. ISA sound
cards and just normal OS processes tend to eat up that lower 16
MB so it is unlikely sg will always be successful grabbing large
amounts of that low memory. This is not a problem with PCI based
adapters (normally: some early PCI cards didn't use the full 32
bit address space).
Doug Gilbert
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Fri Jun 30 2000 - 16:45:31 PDT