sane-project-website/old-archive/1997-08/0118.html

142 wiersze
6.4 KiB
HTML

<!-- received="Mon Sep 1 05:47:00 1997 MST" -->
<!-- sent="Mon, 1 Sep 1997 13:55:42 +0200 (MET DST)" -->
<!-- name="Rogier Wolff" -->
<!-- email="R.E.Wolff@BitWizard.nl" -->
<!-- subject="Re: Backtracking in color scanning" -->
<!-- id="199709011155.NAA01530@cave.BitWizard.nl" -->
<!-- inreplyto="199709010633.IAA17068@informatik.uni-koblenz.de" -->
<title>sane-devel: Re: Backtracking in color scanning</title>
<h1>Re: Backtracking in color scanning</h1>
<b>Rogier Wolff</b> (<a href="mailto:R.E.Wolff@BitWizard.nl"><i>R.E.Wolff@BitWizard.nl</i></a>)<br>
<i>Mon, 1 Sep 1997 13:55:42 +0200 (MET DST)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#118">[ date ]</a><a href="index.html#118">[ thread ]</a><a href="subject.html#118">[ subject ]</a><a href="author.html#118">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0119.html">Jonathan A. Buzzard: "Re: umax-backend"</a>
<li> <b>Previous message:</b> <a href="0117.html">Rogier Wolff: "Re: umax-backend"</a>
<li> <b>In reply to:</b> <a href="0112.html">Rainer Krienke: "Re: Backtracking in color scanning"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0137.html">David Mosberger-Tang: "Re: Backtracking in color scanning"</a>
<li> <b>Reply:</b> <a href="0137.html">David Mosberger-Tang: "Re: Backtracking in color scanning"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Rainer Krienke wrote:<br>
<i>&gt; </i><br>
<i>&gt; | From <a href="mailto:fnevgeny@plasma-gate.weizmann.ac.il">fnevgeny@plasma-gate.weizmann.ac.il</a> Sun Aug 31 23:45:11 1997</i><br>
<i>&gt; | From: Evgeny Stambulchik &lt;<a href="mailto:fnevgeny@plasma-gate.weizmann.ac.il">fnevgeny@plasma-gate.weizmann.ac.il</a>&gt;</i><br>
<i>&gt; | Date: Mon, 1 Sep 1997 00:39:30 +0300 (IDT)</i><br>
<i>&gt; | To: <a href="mailto:krienke@informatik.uni-koblenz.de">krienke@informatik.uni-koblenz.de</a></i><br>
<i>&gt; | Subject: Re: Backtracking in color scanning</i><br>
<i>&gt; | MIME-Version: 1.0</i><br>
<i>&gt; | </i><br>
<i>&gt; | Rainer krienke &lt;<a href="mailto:krienke@mailhost.uni-koblenz.de">krienke@mailhost.uni-koblenz.de</a>&gt; wrote:</i><br>
<i>&gt; | &gt; </i><br>
<i>&gt; | &gt; I use sane0.62 with my mustek 1200spro (connected to an ADAPTEC 2940</i><br>
<i>&gt; | &gt; scsi adapter).</i><br>
<i>&gt; | </i><br>
<i>&gt; | Do you mean Paragon 1200SP Pro? How did you manage to make it work with </i><br>
<i>&gt; sane??</i><br>
<i>&gt; | </i><br>
<i>&gt; </i><br>
<i>&gt; Oh sorry I was "some letters" wrong. I did'nt mean 1200 Spro but mustek 1200 SP.</i><br>
<p>
<i>&gt; Because of the assumption of Roger (<a href="mailto:R.E.Wolff@BitWizard.nl">R.E.Wolff@BitWizard.nl</a> ) who</i><br>
<i>&gt; said the backtracking problem might be due to the kernel buffer that</i><br>
<i>&gt; has to be copied in user space, I thought that if this is true</i><br>
<i>&gt; something should change if I reduce the buffer from 127K to half the</i><br>
<p>
I just use a 1Mb buffer for my scanner. However I had to change a few<br>
lines in sg.c ...... Ah. I nowadays have the patch ready. Attached. <br>
<p>
Your "kernel data segment" does grow by a megabyte using this<br>
patch.... I'm going to submit a slightly more generic patch one<br>
day......<br>
<p>
Using half the size, or even a quarter (32k, default) doesn't help.<br>
<p>
We could try to issue the next "read" AS FAST AS POSSIBLE, discarding<br>
the data just read. This probably requires some serious hacking. <br>
<p>
<i>&gt; size. I recompiled sane and my kernel but the effect when scanning</i><br>
<i>&gt; colour images stayed the same. Moreover I think because of the fact</i><br>
<i>&gt; that other people (running Pentium 200 pro maschines) have the same</i><br>
<i>&gt; problem this cannot be due to lack of speed.</i><br>
<p>
A pentium PRO is not much faster on memory limited copies than a<br>
pentium. (Both use a 64bit main memory link.)<br>
<p>
<p>
Roger.<br>
<p>
--------------------------------------------------------------------------<br>
<p>
--- linux-2.0.28/include/scsi/sg.h Thu May 2 06:48:55 1996<br>
+++ linux-2.0.28.posix6/include/scsi/sg.h Thu Jan 23 00:10:40 1997<br>
@@ -36,6 +36,10 @@<br>
#define SG_MAX_QUEUE 4 /* maximum outstanding request, arbitrary, may be<br>
changed if sufficient DMA buffer room available */<br>
<br>
+#if 0<br>
#define SG_BIG_BUFF 32768<br>
+#else<br>
+#define SG_BIG_BUFF 0x100000<br>
+#endif<br>
<br>
#endif<br>
--- linux-2.0.28/drivers/scsi/sg.c Sun Sep 1 08:15:33 1996<br>
+++ linux-2.0.28.posix6/drivers/scsi/sg.c Thu Jan 23 00:12:52 1997<br>
@@ -39,7 +39,11 @@<br>
NULL, sg_attach, sg_detach};<br>
<br>
#ifdef SG_BIG_BUFF<br>
+#if SG_BIG_BUFF &lt; 0x10000<br>
static char *big_buff = NULL;<br>
+#else<br>
+static char big_buff[SG_BIG_BUFF];<br>
+#endif<br>
static struct wait_queue *big_wait; /* wait for buffer available */<br>
static int big_inuse=0;<br>
#endif<br>
@@ -565,8 +569,10 @@<br>
#endif<br>
<br>
#ifdef SG_BIG_BUFF<br>
+#if SG_BIG_BUFF &lt; 0x10000<br>
big_buff= (char *) scsi_init_malloc(SG_BIG_BUFF, GFP_ATOMIC | GFP_DMA);<br>
#endif<br>
+#endif<br>
<br>
scsi_generics = (struct scsi_generic *) <br>
scsi_init_malloc((sg_template.dev_noticed + SG_EXTRA_DEVS) <br>
@@ -648,8 +654,10 @@<br>
}<br>
sg_template.dev_max = 0;<br>
#ifdef SG_BIG_BUFF<br>
+#if SG_BIG_BUFF &lt; 0x10000<br>
if(big_buff != NULL)<br>
scsi_init_free(big_buff, SG_BIG_BUFF);<br>
+#endif<br>
#endif<br>
}<br>
#endif /* MODULE */<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
To unsubscribe: mail -s unsubscribe <a href="mailto:sane-devel-request@listserv.azstarnet.com">sane-devel-request@listserv.azstarnet.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0119.html">Jonathan A. Buzzard: "Re: umax-backend"</a>
<li> <b>Previous message:</b> <a href="0117.html">Rogier Wolff: "Re: umax-backend"</a>
<li> <b>In reply to:</b> <a href="0112.html">Rainer Krienke: "Re: Backtracking in color scanning"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0137.html">David Mosberger-Tang: "Re: Backtracking in color scanning"</a>
<li> <b>Reply:</b> <a href="0137.html">David Mosberger-Tang: "Re: Backtracking in color scanning"</a>
<!-- reply="end" -->
</ul>