kopia lustrzana https://gitlab.com/sane-project/website
145 wiersze
7.1 KiB
HTML
145 wiersze
7.1 KiB
HTML
<!-- received="Tue Jun 29 23:46:12 1999 PDT" -->
|
||
<!-- sent="Wed, 30 Jun 1999 08:46:58 +0200" -->
|
||
<!-- name="Rainer Krienke" -->
|
||
<!-- email="krienke@uni-koblenz.de" -->
|
||
<!-- subject="Re: problems increasing SG_BIG_BUFF" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="problems increasing SG_BIG_BUFF" -->
|
||
<title>sane-devel: Re: problems increasing SG_BIG_BUFF</title>
|
||
<h1>Re: problems increasing SG_BIG_BUFF</h1>
|
||
<b>Rainer Krienke</b> (<a href="mailto:krienke@uni-koblenz.de"><i>krienke@uni-koblenz.de</i></a>)<br>
|
||
<i>Wed, 30 Jun 1999 08:46:58 +0200</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#243">[ date ]</a><a href="index.html#243">[ thread ]</a><a href="subject.html#243">[ subject ]</a><a href="author.html#243">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0244.html">Kick Glorie: "Re: Problem with snapscan, aha1505, linux kernel 2.2.9"</a>
|
||
<li> <b>Previous message:</b> <a href="0242.html">Douglas Gilbert: "Re: Problem with snapscan, aha1505, linux kernel 2.2.9"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0047.html">Andreas Buesching: "problems increasing SG_BIG_BUFF"</a>
|
||
<!-- nextthread="start" -->
|
||
<li> <b>Next in thread:</b> <a href="0246.html">abel deuring: "Re: problems increasing SG_BIG_BUFF"</a>
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
Douglas Gilbert wrote:<br>
|
||
<i>> </i><br>
|
||
<i>> wrote:</i><br>
|
||
<i>> ></i><br>
|
||
<i>> > Hello Developers,</i><br>
|
||
<i>> ></i><br>
|
||
<i>> > my situation:</i><br>
|
||
<i>> > SuSE 6.1</i><br>
|
||
<i>> > new kernel 2.2.9</i><br>
|
||
<i>> > /usr/include/scsi is linked to /usr/src/linux/include/scsi</i><br>
|
||
<i>> </i><br>
|
||
<i>> Monty (cdparanoia author) has a nice way around the</i><br>
|
||
<i>> above directory problem:</i><br>
|
||
<i>> </i><br>
|
||
<i>> #include <linux/../scsi/sg.h></i><br>
|
||
<i>> #include <linux/../scsi/scsi.h></i><br>
|
||
<i>> </i><br>
|
||
<i>> [An elegant hack!]</i><br>
|
||
<i>> </i><br>
|
||
<i>> ></i><br>
|
||
<i>> > problem:</i><br>
|
||
<i>> > I tried to increase the generic-scsi buffer. The man-pages told me to change</i><br>
|
||
<i>> > SG_BIG_BUFF. the new kernel uses another define (SG_SCATTER_SZ), but there are</i><br>
|
||
<i>> > also these two lines:</i><br>
|
||
<i>> ></i><br>
|
||
<i>> > #define SG_BIG_BUFF SG_SCATTER_SZ /* for backward compatibility */</i><br>
|
||
<i>> > /* #define SG_BIG_BUFF (SG_SCATTER_SZ * 8) */ /* =256KB, if you want */</i><br>
|
||
<i>> ></i><br>
|
||
<i>> > So I increased SG_BIG_BUFF and compiled the kernel and sane again.</i><br>
|
||
<i>> > The result was: nothing. Some months ago when I used an older kernel (2.0.x),</i><br>
|
||
<i>> > there was an result: My scanner did not stop every 5mm to transfer the data (it</i><br>
|
||
<i>> > sounds horrible if it stops every 5mm).</i><br>
|
||
<i>> ></i><br>
|
||
<i>> > My question:</i><br>
|
||
<i>> > Can anybody help me? How to increase the buffer?</i><br>
|
||
<i>> ></i><br>
|
||
<i>> Andreas,</i><br>
|
||
<i>> You may like to try this ... go to</i><br>
|
||
<i>> <a href="http://www.torque.net/sg">http://www.torque.net/sg</a></i><br>
|
||
<i>> and download sg version 2.1.34 (you have version</i><br>
|
||
<i>> 2.1.32 in 2.2.9). In the new sg.h change the</i><br>
|
||
<i>> SG_DEF_RESERVED_SIZE to 262144 and try that.</i><br>
|
||
<i>> [This assumes that your SCSI adapter does scatter</i><br>
|
||
<i>> gather which even most ISA ones do.]</i><br>
|
||
<i>> </i><br>
|
||
<i>> While your at that web site you may be interested</i><br>
|
||
<i>> in the documentation's section on "SG_BIG_BUFF and</i><br>
|
||
<i>> friends".</i><br>
|
||
<i>> </i><br>
|
||
<i>> BTW 2.2.9-ac3 also contains the most recent sg</i><br>
|
||
<i>> driver.</i><br>
|
||
<i>> </i><br>
|
||
<i>> In the new sg driver SG_BIG_BUFF exists for backward</i><br>
|
||
<i>> compatibility (which doesn't extend to people</i><br>
|
||
<i>> changing it :-) ). Internally the sg driver takes</i><br>
|
||
<i>> no account of it. Some apps are fooled by it but not,</i><br>
|
||
<i>> it would seem, sane.</i><br>
|
||
<i>> </i><br>
|
||
<i>> Hopefully in the future the sane linux transport layer</i><br>
|
||
<i>> will use the SG_SET_RESERVED_BUFFER ioctl() and sane's</i><br>
|
||
<i>> documentation will stop recommending people hacking</i><br>
|
||
<i>> the sg.h header file. Under 2.2 with the original</i><br>
|
||
<i>> sg driver this is a very dangerous thing to do (ie</i><br>
|
||
<i>> greatly increases the probably of an ENOMEM induced</i><br>
|
||
<i>> oops, especially on modules).</i><br>
|
||
<i>> </i><br>
|
||
<i>> Doug Gilbert</i><br>
|
||
<i>> </i><br>
|
||
<i>> --</i><br>
|
||
<p>
|
||
I have nearly the same situation (kernel 2.2.10) and the same problems<br>
|
||
like Andreas Buesching. <br>
|
||
<p>
|
||
I changed the definition of SG_DEF_RESERVED_SIZE to the value mentioned<br>
|
||
above and basically it works but practically it is still unusable. I<br>
|
||
tried to scan a DINA4 page with 300DPI in color mode. This is, at least<br>
|
||
for me, a usual configuration for scanning pictures. The scan took about<br>
|
||
3 minutes and the scanner sounded really ill doing the backtracking all<br>
|
||
the time. <br>
|
||
<p>
|
||
Before I used the old sg driver with a patch that uses a static buffer<br>
|
||
of 1MBytes in size. This prevents the sg driver of beeing used as a<br>
|
||
module but has a really great effect in scanning time. To scan a DINA4<br>
|
||
page in 300 DPI color mode then takes only 45 seconds. Compared to the<br>
|
||
new sg driver this is about 4 times faster and after all it probably<br>
|
||
will be good for the scanner hardware itself as well (it needs do to<br>
|
||
backtracking only about 5 times compared to >20 times using the new<br>
|
||
driver).<br>
|
||
<p>
|
||
Wouldn<EFBFBD>t it be possible to include such a static buffer (optional) in<br>
|
||
the new sg driver as well? The best new driver doesn't help, if you<br>
|
||
actually cannot use it in real live and as you can see from the examples<br>
|
||
avove this is true for the current situation.<br>
|
||
<p>
|
||
Thanks<br>
|
||
Rainer<br>
|
||
<pre>
|
||
--
|
||
---------------------------------------------------------------------
|
||
Rainer Krienke <a href="mailto:krienke@uni-koblenz.de">krienke@uni-koblenz.de</a>
|
||
Universitaet Koblenz, <a href="http://www.uni-koblenz.de/~krienke">http://www.uni-koblenz.de/~krienke</a>
|
||
Rechenzentrum, Voice: +49 261 287 - 1312
|
||
Rheinau 1, 56075 Koblenz, Germany Fax: +49 261 287 - 1355
|
||
---------------------------------------------------------------------
|
||
<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="0244.html">Kick Glorie: "Re: Problem with snapscan, aha1505, linux kernel 2.2.9"</a>
|
||
<li> <b>Previous message:</b> <a href="0242.html">Douglas Gilbert: "Re: Problem with snapscan, aha1505, linux kernel 2.2.9"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0047.html">Andreas Buesching: "problems increasing SG_BIG_BUFF"</a>
|
||
<!-- nextthread="start" -->
|
||
<li> <b>Next in thread:</b> <a href="0246.html">abel deuring: "Re: problems increasing SG_BIG_BUFF"</a>
|
||
<!-- reply="end" -->
|
||
</ul>
|