Re: CVS commit: src/sys

2009-11-19 Thread Mindaugas Rasiukevicius
Hello,

Forgot to comment on this after your commit, but here we go..

David Young  wrote:
> > > 'options SPLDEBUG' adds instrumentation to spllower() and splraise() as
> > > well as routines to start/stop debugging and to record IPL transitions:
> > > spldebug_start(), spldebug_stop(), spldebug_raise(), spldebug_lower().
> > 
> > this seems too ad-hoc to me.
> 
> If you have suggestions for providing a comparable function that is less
> ad-hoc, let me know.
> 
> > - please don't put MD code like this in kern/.  IPL_ values can't be
> >   compared with >= in MI code.  return_address.9 is in man.i386.

I agree with yamt that it should not belong to sys/kern.  Also, that it is
quite ad-hoc.  Perhaps it was better to teach LOCKDEBUG to do IPL tracking,
since most cases are via mutex(9) and in future there should not be many
direct spl() calls?

In fact, I am not convinced that such IPL tracking is very useful - we have
reduced amount of IPLs, which is much simpler model than we used to have, and
the problem you were recently debugging was miss-interpretation of certain
spin-mutex behaviour.

Also, since it tracks IPL and not direct spl() calls, it should have rather
been IPLDEBUG option, not SPLDEBUG. :)

> > - can you explain "cpu_index(ci) > MAXCPUS" and "cpu_index(ci) >=
> > MAXCPUS" ?
> 
> Typo.

These cannot happen.  Should be KASSERTs, at least.  I think same with
if (ipl >= IPL_HIGH) check.  Also, this code adds arrays of MAXCPUS size.
While it is not a problem at the moment, in the long term we should not
depend on MAXCPUS, or perhaps even look for a way to remove it.

-- 
Mindaugas


Re: CVS commit: src/sys/arch/i386/stand

2009-11-19 Thread Christoph Egger
David Laight wrote:
> Module Name:  src
> Committed By: dsl
> Date: Thu Nov 19 22:10:03 UTC 2009
> 
> Modified Files:
>   src/sys/arch/i386/stand/lib: message.S
>   src/sys/arch/i386/stand/mbr: mbr.S
> 
> Log Message:
> Move code for outputting directly to the serial port into message.S
> Allows it to be enabled for other parts of the boot sequence.

Will you fix boot(8) to make xen boot again ?

Christoph



Re: CVS commit: src

2009-11-19 Thread Jason Thorpe

On Nov 18, 2009, at 2:28 PM, Thomas E. Spanjaard wrote:

> Jason Thorpe wrote:
>> On Nov 18, 2009, at 12:40 PM, David Young wrote:
>> 
>>> I see.  I will describe spllower(9) and splraise(9) in an i386 page,
>>> instead.
>> 
>> They should not be documented at all.  They are not interfaces that are 
>> meant to be used in any user-serviceable way.
> 
> Section 9 isn't about "user-serviceable" interfaces anyway, unless the
> user is a kernel developer, in which case it is relevant :).

No, it's not.  spllower() and splraise() are not really part of the kernel API. 
 They are implementation details that can be described with comments in code.

-- thorpej