Re: CVS commit: src/sys

2013-01-30 Thread Izumi Tsutsui
> >> Log Message:
> >> make vmem(9) ready to be used early during bootstrap to replace extent(9)
> >> pass memory for vmem structs into the initialization function and
> >> do away with the static pool of vmem structs.
> >> remove special bootstrapping of the quantum cache pools of the 
> >> kmem_va_arena
> >> as memory for pool_caches is allocated via pool_allocator_meta which is
> >> fully operational at this point.
> > 
> > Is this change reviewed by vm guys (especailly yamt@)?
> No, there was some discussion about it with dyoung@ and skrll@
> There is no expected functional change to vm. It's all about how some
> vmem internal structs are allocated during bootstrap to make vmem usable
> earlier during bootstrap.

The previous vmem/kmem changes in the last year required
several MD changes in early VM initialization (port-m68k/45915 etc)
so I wonder how these changes are considered (or tested) for
each MD implementation which has many quirks.

> As always communication could have been better.

Posting design description to public list is also better.
(especially for poor Tier II ports)

Thanks,

---
Izumi Tsutsui


Re: CVS commit: src/sys

2013-01-30 Thread Lars Heidieker
On 2013-01-30 12:46, Izumi Tsutsui wrote:
>> Module Name: src
>> Committed By:para
>> Date:Tue Jan 29 21:26:25 UTC 2013
>>
>> Modified Files:
>>  src/sys/kern: subr_vmem.c
>>  src/sys/rump/librump/rumpkern: vm.c
>>  src/sys/sys: vmem.h vmem_impl.h
>>
>> Log Message:
>> make vmem(9) ready to be used early during bootstrap to replace extent(9)
>> pass memory for vmem structs into the initialization function and
>> do away with the static pool of vmem structs.
>> remove special bootstrapping of the quantum cache pools of the kmem_va_arena
>> as memory for pool_caches is allocated via pool_allocator_meta which is
>> fully operational at this point.
> 
> Is this change reviewed by vm guys (especailly yamt@)?
No, there was some discussion about it with dyoung@ and skrll@
There is no expected functional change to vm. It's all about how some
vmem internal structs are allocated during bootstrap to make vmem usable
earlier during bootstrap.
As always communication could have been better.
> If so it's much better to note it in the commit log.
sure.

--
Lars


Re: CVS commit: src/sys/kern

2013-01-30 Thread Warner Losh

On Jan 30, 2013, at 1:07 AM, David Laight wrote:

> On Tue, Jan 29, 2013 at 11:00:31PM +, Lars Heidieker wrote:
>> Module Name: src
>> Committed By:para
>> Date:Tue Jan 29 23:00:31 UTC 2013
>> 
>> Modified Files:
>>  src/sys/kern: kern_sysctl.c
>> 
>> Log Message:
>> fix the sysctl_setup_func typedef
> 
> -typedef void (*sysctl_setup_func)(struct sysctllog **);
> +typedef void sysctl_setup_func(struct sysctllog **);
> 
> IIRC you are only supposed to be able to typedef pointers to functions.

It is totally legal, and has been for three decades or so...

> The extra level of indirection (that caused the horrid casting)
> is elsewhere.
> (I wasn't at all sure the previous 'fix' was right.)
> 
>   David
> 
> -- 
> David Laight: da...@l8s.co.uk



Re: CVS commit: src/sys

2013-01-30 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: para
> Date: Tue Jan 29 21:26:25 UTC 2013
> 
> Modified Files:
>   src/sys/kern: subr_vmem.c
>   src/sys/rump/librump/rumpkern: vm.c
>   src/sys/sys: vmem.h vmem_impl.h
> 
> Log Message:
> make vmem(9) ready to be used early during bootstrap to replace extent(9)
> pass memory for vmem structs into the initialization function and
> do away with the static pool of vmem structs.
> remove special bootstrapping of the quantum cache pools of the kmem_va_arena
> as memory for pool_caches is allocated via pool_allocator_meta which is
> fully operational at this point.

Is this change reviewed by vm guys (especailly yamt@)?
If so it's much better to note it in the commit log.

---
Izumi Tsutsui


Re: CVS commit: src/sys/kern

2013-01-30 Thread Valeriy E. Ushakov
On Wed, Jan 30, 2013 at 09:36:56 +, Martin Husemann wrote:

> On Wed, Jan 30, 2013 at 08:07:14AM +, David Laight wrote:
> > On Tue, Jan 29, 2013 at 11:00:31PM +, Lars Heidieker wrote:
> > > Module Name:  src
> > > Committed By: para
> > > Date: Tue Jan 29 23:00:31 UTC 2013
> > > 
> > > Modified Files:
> > >   src/sys/kern: kern_sysctl.c
> > > 
> > > Log Message:
> > > fix the sysctl_setup_func typedef
> > 
> > -typedef void (*sysctl_setup_func)(struct sysctllog **);
> > +typedef void sysctl_setup_func(struct sysctllog **);
> > 
> > IIRC you are only supposed to be able to typedef pointers to functions.
> 
> You can use typdef for a function instead of a function pointer, but then
> you can only declare args/variables as sysctl_setup_func*.
> 
> This does not look like an improvement to me.

__link_set* macros add that extra "pointer to":

#define __link_set_decl(set, ptype) \
extern ptype * const __start_link_set_##set[] __dso_hidden; \
extern ptype * const __stop_link_set_##set[] __dso_hidden   \

-uwe


Re: CVS commit: src/sys/kern

2013-01-30 Thread Martin Husemann
On Wed, Jan 30, 2013 at 08:07:14AM +, David Laight wrote:
> On Tue, Jan 29, 2013 at 11:00:31PM +, Lars Heidieker wrote:
> > Module Name:src
> > Committed By:   para
> > Date:   Tue Jan 29 23:00:31 UTC 2013
> > 
> > Modified Files:
> > src/sys/kern: kern_sysctl.c
> > 
> > Log Message:
> > fix the sysctl_setup_func typedef
> 
> -typedef void (*sysctl_setup_func)(struct sysctllog **);
> +typedef void sysctl_setup_func(struct sysctllog **);
> 
> IIRC you are only supposed to be able to typedef pointers to functions.

You can use typdef for a function instead of a function pointer, but then
you can only declare args/variables as sysctl_setup_func*.

This does not look like an improvement to me.

Martin