Date: Wed, 10 Jul 1996 08:29:54 +1000 From: Bruce Evans <bde@zeta.org.au> To: hackers@freebsd.org, msmith@atrad.adelaide.edu.au Subject: Re: Odd hang in device driver... Message-ID: <199607092229.IAA07742@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>I'm seeing a 'Panic: double fault' hang that has me wondering about >the save size of auto data on the kernel stack. I have a function I'll >call 'fooread()' - it's a device driver read function. The kernel stack is about 7K. It has to hold sometimes deeply nested system calls and up to about 10 levels of nested interrupts and traps. It may already be too small for some (extremely rare) worst cases. Don't put large buffers on it. ttwrite() is careful to use only a 100 byte buffer. >To handle some serious application latency problems (not easily curable 8( ) >I recently upped the receive buffer from 1K to 4K, and have subsequently >started seeing these double-fault hangs. What has me wondering about 1K was already dangerously large. >And as an aside which would help me avoid the double copy altogether, is >it fair to say that : > uiomove(buf, a, uio); > uiomove(buf + a, b, uio); >would have the same effect as > uiomove(buf, a + b, uio); >ie. is it possible to call uiomove more than once in a read/write function? Yes, at least provided (a + b) < (residual count before first uiomove). uiomove() just copies the data and advances the pointer and reduces the residual count in the uio struct. This is too complicated to do directly because the user buffers may be split up. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607092229.IAA07742>