sane-project-website/old-archive/1999-07/0038.html

94 wiersze
4.2 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Mon Jul 5 19:08:38 1999 PDT" -->
<!-- sent="Mon, 05 Jul 1999 22:13:30 -0400" -->
<!-- name="Douglas Gilbert" -->
<!-- email="dgilbert@interlog.com" -->
<!-- subject="Re: mustek aha1520B problems" -->
<!-- id="" -->
<!-- inreplyto="mustek aha1520B problems" -->
<title>sane-devel: Re: mustek aha1520B problems</title>
<h1>Re: mustek aha1520B problems</h1>
<b>Douglas Gilbert</b> (<a href="mailto:dgilbert@interlog.com"><i>dgilbert@interlog.com</i></a>)<br>
<i>Mon, 05 Jul 1999 22:13:30 -0400</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#38">[ date ]</a><a href="index.html#38">[ thread ]</a><a href="subject.html#38">[ subject ]</a><a href="author.html#38">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0039.html">Brian B.: "once more on the aha152x problem"</a>
<li> <b>Previous message:</b> <a href="0037.html">Juergen Scherer: "Microtek V600"</a>
<li> <b>Maybe in reply to:</b> <a href="0006.html">aanderson =: "mustek aha1520B problems"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
"aanderson = (A.N. Anderson - Idaho Research Software)" wrote:<br>
<i>&gt; </i><br>
<i>&gt; &gt;Douglas Gilbert &lt;<a href="mailto:dgilbert@interlog.com">dgilbert@interlog.com</a>&gt; responded:</i><br>
<i>&gt; &gt;</i><br>
<i>&gt; &gt;Did the bigger buffers improve performance and lessen</i><br>
<i>&gt; &gt;the following problems?</i><br>
<i>&gt; &gt;</i><br>
<i>&gt; </i><br>
<i>&gt; To be honest I didn't see any difference, which is why I think</i><br>
<i>&gt; think there are problems with the driver. The performance wasnt</i><br>
<i>&gt; bad in either case, tho, except for the hangups and crashes, the</i><br>
<i>&gt; latter of which typically occurred on large scans where improvement</i><br>
<i>&gt; might have been more apparent. I was careful to get the buffer logistics</i><br>
<i>&gt; right, altho I am suspicious that it seemed to crash more often with</i><br>
<i>&gt; the large buffers..</i><br>
<p>
Yes with the old driver bigger buffers<br>
increased the probability of not being able to<br>
find memory which led to an oops.<br>
<p>
[snip]<br>
<i>&gt; &gt;</i><br>
<i>&gt; &gt;Time taken to DMA/block_move data to and from the SCSI device</i><br>
<i>&gt; &gt;and any polling that the aha152x driver does will _not_</i><br>
<i>&gt; &gt;show on a command prefixed with "time ".</i><br>
<i>&gt; &gt;</i><br>
<i>&gt; I assumed the polling should show up under 'sys', but that there</i><br>
<i>&gt; should still be lots of idle time between scsi commands.</i><br>
<i>&gt; What concerned me more was that it seemed to keep on polling even after</i><br>
<i>&gt; the scan stopped.</i><br>
<p>
I should explain this a little more in reference to<br>
the Linux sg driver. If data is being read from <br>
the scanner it is first transferred to "dma"<br>
kernel buffers then it is transferred from there to<br>
the user buffer. This double handling is why this<br>
approach is sometimes called indirect IO. The time<br>
to do the first transfer is not registered against<br>
the user (and is often done under interrupt<br>
privilege). The second transfer (into the user space)<br>
will show up as 'sys' time as you predicted.<br>
<p>
Before people jump on me about the double handling,<br>
it is not easy to implement direct IO under Linux<br>
and only one driver that I am aware of does it: bttv.<br>
The memory that you allocate for the direct DMA<br>
transfer needs to be locked down while the transfer<br>
is pending, this means not swapping out that part<br>
of the app and not allowing it to be killed<br>
amongst other things. Besides, Linus doesn't like<br>
direct IO.<br>
<p>
[snip]<br>
<p>
Doug Gilbert<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0039.html">Brian B.: "once more on the aha152x problem"</a>
<li> <b>Previous message:</b> <a href="0037.html">Juergen Scherer: "Microtek V600"</a>
<li> <b>Maybe in reply to:</b> <a href="0006.html">aanderson =: "mustek aha1520B problems"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>