Date: 26 Jun 99 01:59:48 PDT From: Jesus Monroy <jesus.monroy@usa.net> To: Daniel J.OConnor <darius@dons.net.au> Cc: hackers@freebsd.org, Ville-Pertti Keinonen <will@iki.fi> Subject: Re: [Re: [Re: coarse vs fine-grained locking in SMP systems]] Message-ID: <19990626085948.25145.qmail@nwcst277.netaddress.usa.net>
next in thread | raw e-mail | index | archive | help
"Daniel J. O'Connor" <darius@dons.net.au> wrote: > On 26-Jun-99 Jesus Monroy wrote: > > > An approach like that can't possibly be sufficient if code has been= > > > written with the assumption that only interrupt-like events or > > > blocking calls can change things from under it. There is quite = > > > a bit of code in FreeBSD that relies on this. > > > > > Can you elaborate on this a bit more? I think I missing > > some of the finer points on what you are saying. > > = > > I work on interrupt driven device drivers and I'm trying > > to see how this ties in. > = > = > The reason is that if kernel code is written to not protect against > reentrancy then it will have race conditions in SMP. > = > The splXXX() macros are used in drivers to protect against code = > reentrancy when an interrupt occurs. Usually they are around = > routines which modify a data structure which can also be = > modified by the drivers interrupt handler. > = Still not getting. I'm aware of 'race conditions' and splxxx() macros. I've written and have a working driver under *BSD. = So, I guess I need to ask a more specific question. The statement was made that code would not port easily in a now lost part of the discussion. I agree with that. The part I'm lost on is "can change things from under it". From under what? I assume the statement means "it" as being the code or driver. So the question begs, what things can = change? *..Certainly Hardware interfaces can't change. = *..Buffer, locks and flags should be under it's direct = control, so I see no issues there. *..The code itself will not change. *..Timing and commit issue, beyond immediate buffers are beyond the control of the driver. There is a possiblity that link lists would change and alter data flow, but that is expected. So there is either a mental block going on or I must be missing something obvious. Mind you I'm not trying to start an arguement, just trying to figure out what was said and how it relates to my work. Perhaps it does not relate? = --- "I'd rather pay for my freedom than live in a bitmapped, = pop-up-happy dungeon like NT." http://www.performancecomputing.com/features/9809of1.shtml ____________________________________________________________________ Get free e-mail and a permanent address at http://www.netaddress.com/?N=3D= 1 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990626085948.25145.qmail>