Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 1996 18:05:11 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        hackers@freebsd.org, msmith@atrad.adelaide.edu.au
Subject:   Re: Odd hang in device driver...
Message-ID:  <199607100835.SAA22914@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199607092229.IAA07742@godzilla.zeta.org.au> from "Bruce Evans" at Jul 10, 96 08:29:54 am

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans stands accused of saying:
> 
> >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.

Foo!  I've been an application programmer too long; stack size limits
never ocurred to me.  I moved the copy buffers out into the device
structure, but it sounds like uiomove will renmder that unnecessary.

> 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.

Understood - but I wasn't sure how much state was kept in the uio
structure, and reading the code didn't make it terribly clear.  Thanks!

> Bruce

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and      (GSM mobile) 0411-222-496       [[
]] realtime instrument control          (ph/fax)  +61-8-267-3039        [[
]] Collector of old Unix hardware.      "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607100835.SAA22914>