# Re: Backtracking in color scanning

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sun, 7 Sep 1997 09:06:37 +0200 (MET DST)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Rogier Wolff: "Re: SANE and Mustek MFC-600S"
- Previous message: Jim McBeath: "UMAX on Sparc/Solaris 2.5"
- In reply to: David Mosberger-Tang: "Re: Backtracking in color scanning"
- Next in thread: Mathias Weigt: "Re: Backtracking in color scanning"

David Mosberger-Tang wrote:
>
> >>>>> On Mon, 1 Sep 1997 13:55:42 +0200 (MET DST), R.E.Wolff@BitWizard.nl (Rogier Wolff) said:
>
> Rogier> We could try to issue the next "read" AS FAST AS POSSIBLE,
> Rogier> discarding the data just read. This probably requires some
> Rogier> serious hacking.
>
> As of sane-0.62, this is already what's happening for Linux. That's
> the reason I introduced the asynchronous scsi interface to SANE. I'm
> sure it would be possible to shave off a few cycles here and there,
> but control-flow wise, the right thing is happening. If somebody gets
> serious about this, I'd recommend to first find out how much slack one
> has with issueing the next "read data" command. E.g., modify the
> backend to not transfer any data at all to the frontend and see
> whether that helps. Once you get to the point where no backtracking
> occurs, you can start inserting delays until backtracking starts
> occuring again. At that point, you should have a pretty good idea of
> what should be and can be done.

The way I understand the Linux sg device,

you issue the read-data command, write system call
the low level driver transfers somewhere: read system call
the data to the kernel-buffer.
when done: transfer data to user-space read completes
This is the first opportunity
to issue the next "write call"
with the next "read-data"
command.

At that moment there already has been a kernel->user copy. The time
involved could already be enough, and disabeling that would require
a few lines of change in the kernel.

Roger.

P.S. David: I remember replying to messages posted by you last week,
and they went to the list. Nowadays they would go to you
personally....

    --
    ** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ **
    Florida -- A 39 year old construction worker woke up this morning when a
    109-car freigt train drove over him. According to the police the man was
    drunk. The man himself claims he slipped while walking the dog. 080897

    --
    Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
    To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com

     Next message: Rogier Wolff: "Re: SANE and Mustek MFC-600S"
     Previous message: Jim McBeath: "UMAX on Sparc/Solaris 2.5"
     In reply to: David Mosberger-Tang: "Re: Backtracking in color scanning"

     Next in thread: Mathias Weigt: "Re: Backtracking in color scanning"