Hi Frank,

Yes, it seems we might not get a correct zoneid in kernel or interrupt context
as you pointed out here. In our project, the listener should be initialized
at boot time hopefully before the userland processes start, but in practice
it seems hard according to others' e-mails including yours. Then we'd like to
consider a solution further anyway.

Thanks for answering my question.

-Eiji

> >>> getzoneid() can return a correct value even if it's called in a taskq 
> >>> thread
> >>> (kernel context) and/or in an interrupt handler (interrupt context)?
> >>
> >> I suppose so, look its not doing anything earth shattering:
> >>
> >>    2496 getzoneid(void)
> >>    2497 {
> >>    2498    return (curproc->p_zone->zone_id);
> >>    2499 }
> >>
> >> no locking involved, no allocations done, nothing considered
> >> harmfull in an interrupt context or taskq thread.
> >>
> >> only question is to what proc your taskq/interrupt thread will bind to.
> 
> and not only are interrupt threads bound to p0, taskq threads
> created using taskq_create() are also bound to p0.
> 
> so for taskq that'd be only valid if you'd use taskq_create_proc()
> with something not being p0.
> 
> ---
> frankB
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to