panic caused by EVFILT_SIGNAL detaching in rfork()ed thread

2004-07-05 Thread Igor Sysoev
While development of my http server nginx I've got panics caused by detaching
of the EVFILT_SIGNAL event. The worker process starts two worker threads
created by rfork(RFPROC|RFTHREAD|RFMEM). Each thread opens kqueue and
adds the EVFILT_SIGNAL event. If the main thread of the worker process
exits abnormally (on 4.x) or simply exits (on 5.x) then kernel may panic:

panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x4
fault code  = supervisor read, page not present
instruction pointer = 0x8:0xc014bc96
stack pointer   = 0x10:0xd41d4dd4
frame pointer   = 0x10:0xd41d4dd4
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 396 (nginx)
interrupt mask  = none
trap number = 12
panic: page fault

[ skipped ]

(kgdb) bt
#0  dumpsys () at ../../kern/kern_shutdown.c:487
#1  0xc01496a3 in boot (howto=256) at ../../kern/kern_shutdown.c:316
#2  0xc0149ae1 in panic (fmt=0xc023734c "%s") at ../../kern/kern_shutdown.c:595
#3  0xc0200eb7 in trap_fatal (frame=0xd41d4d94, eva=4)
at ../../i386/i386/trap.c:974
#4  0xc0200b65 in trap_pfault (frame=0xd41d4d94, usermode=0, eva=4)
at ../../i386/i386/trap.c:867
#5  0xc020070b in trap (frame={tf_fs = -736296944, tf_es = -1072234480,
  tf_ds = -961150960, tf_edi = -736334656, tf_esi = 0,
  tf_ebp = -736277036, tf_isp = -736277056, tf_ebx = -736334592,
  tf_edx = 0, tf_ecx = -736549824, tf_eax = -736334592, tf_trapno = 12,
  tf_err = 0, tf_eip = -1072382826, tf_cs = 8, tf_eflags = 66055,
  tf_esp = -736277000, tf_ss = -1072429537}) at ../../i386/i386/trap.c:466
#6  0xc014bc96 in filt_sigdetach (kn=0xd41c6d00) at ../../kern/kern_sig.c:1741
#7  0xc014061f in kqueue_close (fp=0xc6dc1900, p=0xd4192440)
at ../../kern/kern_event.c:797
#8  0xc013f277 in fdrop (fp=0xc6dc1900, p=0xd4192440) at ../../sys/file.h:218
#9  0xc013f1bf in closef (fp=0xc6dc1900, p=0xd4192440)
at ../../kern/kern_descrip.c:1279
#10 0xc013edcc in fdfree (p=0xd4192440) at ../../kern/kern_descrip.c:1061
#11 0xc0141a89 in exit1 (p=0xd4192440, rv=9) at ../../kern/kern_exit.c:188
#12 0xc014b5de in sigexit (p=0xd4192440, sig=9) at ../../kern/kern_sig.c:1503
#13 0xc014b358 in postsig (sig=9) at ../../kern/kern_sig.c:1406
#14 0xc0201397 in syscall2 (frame={tf_fs = 47, tf_es = -1078001617,
  tf_ds = -1078001617, tf_edi = 134823956, tf_esi = 1,
  tf_ebp = -1077938752, tf_isp = -736276524, tf_ebx = 2, tf_edx = 12,
  tf_ecx = 134811400, tf_eax = 0, tf_trapno = 7, tf_err = 2,
  tf_eip = 672013132, tf_cs = 31, tf_eflags = 514, tf_esp = -1077938780,
  tf_ss = 47}) at ../../i386/i386/trap.c:197
#15 0xc01f42a5 in Xint0x80_syscall ()
#16 0x8055d18 in ?? ()
#17 0x80544b3 in ?? ()
#18 0x8055415 in ?? ()
#19 0x8054ed6 in ?? ()
#20 0x8049c02 in ?? ()
#21 0x8049976 in ?? ()
(kgdb) fr 6
#6  0xc014bc96 in filt_sigdetach (kn=0xd41c6d00) at ../../kern/kern_sig.c:1741
1741SLIST_REMOVE(&p->p_klist, kn, knote, kn_selnext);
(kgdb)  p *(*(struct knote *)0xd41c6d00)->kn_ptr.p_proc
$1 = {p_procq = {tqe_next = 0xd4191c20, tqe_prev = 0xc0279e50}, p_list = {
le_next = 0x0, le_prev = 0xc0279de4}, p_cred = 0x0, p_fd = 0xc6dc2500,
  p_stats = 0xd41eecd0, p_limit = 0xc6c6b500, p_upages_obj = 0xd41d9c60,
  p_procsig = 0x0, p_flag = 24838, p_stat = 5 '\005', p_pad1 = "\000\000",
  p_pid = 402, p_hash = {le_next = 0x0, le_prev = 0xc6a61e48}, p_pglist = {
le_next = 0x0, le_prev = 0xc6dac668}, p_pptr = 0xd4192c60, p_sibling = {
le_next = 0x0, le_prev = 0xd4192cb0}, p_children = {lh_first = 0x0},
  p_ithandle = {callout = 0x0}, p_oppid = 0, p_dupfd = 0, p_vmspace = 0x0,
  p_estcpu = 0, p_cpticks = 0, p_pctcpu = 13, p_wchan = 0x0,
  p_wmesg = 0xc021c35f "ttywai", p_swtime = 5, p_slptime = 0, p_realtimer = {
it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {tv_sec = 0,
  tv_usec = 0}}, p_runtime = 180692, p_uu = 31474, p_su = 149503,
  p_iu = 1, p_uticks = 4, p_sticks = 19, p_iticks = 0, p_traceflag = 0,
  p_tracep = 0x0, p_siglist = {__bits = {0, 0, 0, 0}}, p_textvp = 0x0,
  p_lock = 0 '\000', p_oncpu = 0 '\000', p_lastcpu = 0 '\000',
  p_rqindex = 6 '\006', p_locks = 0, p_simple_locks = 0, p_stops = 0,
  p_stype = 0, p_step = 0 '\000', p_pfsflags = 0 '\000', p_pad3 = "\000",
  p_retval = {0, 672525728}, p_sigiolst = {slh_first = 0x0}, p_sigparent = 20,
  p_oldsigmask = {__bits = {0, 0, 0, 0}}, p_sig = 0, p_code = 0, p_klist = {
slh_first = 0x0}, p_sigmask = {__bits = {0, 0, 0, 0}}, p_sigstk = {
ss_sp = 0x0, ss_size = 0, ss_flags = 4}, p_priority = 50 '2',
  p_usrpri = 50 '2', p_nice = 0 '\000',
  p_comm = "top\000\000\000ty\000sion\000\000\000", p_pgrp = 0x0,
  p_sysent = 0xc0241900, p_rtprio = {type = 1, prio = 0}, p_prison = 0x0,
  p_args = 0xc6b66e20, p_addr = 0xd41ee000, p_md = {md_regs = 0xd41f0fa8},
 

Re: Article on Sun's DTrace

2004-07-05 Thread David Schultz
On Wed, Jun 30, 2004, Bruce M Simpson wrote:
> This recently caught my eye:
> http://www.samag.com/documents/s=9171/sam0406h/0406h.htm
> 
> There are a number of good sounding suggestions in there.

DTrace is pure magic.  It would be well worth your time to install
Solaris 10 just to try out DTrace for a day.  Keep in mind,
however, that it took them several man-years to develop just for
sparc64 and x86, so we're not talking about a port of it any time
soon...
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Article on Sun's DTrace

2004-07-05 Thread Eitarou Kamo
HI Schultz and all,
(B
(BDavid Schultz wrote:
(B
(B> On Wed, Jun 30, 2004, Bruce M Simpson wrote:
(B>
(B>
(B>> This recently caught my eye:
(B>> http://www.samag.com/documents/s=9171/sam0406h/0406h.htm
(B>>
(B>> There are a number of good sounding suggestions in there.
(B>>
(B>
(B> DTrace is pure magic. It would be well worth your time to install
(B> Solaris 10 just to try out DTrace for a day. Keep in mind,
(B> however, that it took them several man-years to develop just for
(B> sparc64 and x86, so we're not talking about a port of it any time
(B> soon...
(B>
(B>
(BIs DTrace open source? I know presence of DTrace. But
(BSun's products usually aren't open source especially OS
(Bitself. Recently JS(Sun's COO and president) announced
(BSolaris might be open source in the near future. But he often
(Btells a lie, sorry this may be unsuitable, tells a something uncertain.
(B
(BEitarou
(B
(B
(B
(B-- 
(B
(B
(B***
(BEitarou Kamo
(B
(BTel. +81 75 7035997
(BFax  +81 75 7035997
(BVoIP   050 10585997(domestic only)
(Be$B!>(Bmail   [EMAIL PROTECTED]
(B
(BFor business:
(BFeel free to mail me(above), please.
(B
(BDonation   http://www.PayPal.Com
(B
(BGPG FingerPrint:
(B032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 
(B
(B
(B
(B
(B
(B
(B___
(B[EMAIL PROTECTED] mailing list
(Bhttp://lists.freebsd.org/mailman/listinfo/freebsd-hackers
(BTo unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Article on Sun's DTrace

2004-07-05 Thread Eitarou Kamo
Hi,
David Schultz wrote:
On Wed, Jun 30, 2004, Bruce M Simpson wrote:
 

This recently caught my eye:
http://www.samag.com/documents/s=9171/sam0406h/0406h.htm
There are a number of good sounding suggestions in there.
   

DTrace is pure magic.  It would be well worth your time to install
Solaris 10 just to try out DTrace for a day.  Keep in mind,
however, that it took them several man-years to develop just for
sparc64 and x86, so we're not talking about a port of it any time
soon...
 

See also,
http://www.sun.com/bigadmin/content/dtrace/
I haven't seen above well yet. But A article says that DTrace sounds
like 30,000 lines of debug print. I have written about 50 lines
of debug print in my 4.10-R kernel to chase my umass issue.
If the output of it exists on a trace log file, It may be one of
DTrace feature. I saw the some sort of debug print lines in the
kernel source of 4.10-R. If you enable them and gather the information
to a file, it may be nearly equal DTrace. But I can't warrant or guarantee
you the performance. DTrace may be a kinda elegant debug mode
kernel, I guess.
Eitarou
--
   
***
	Eitarou Kamo

Tel. +81 75 7035997
Fax  +81 75 7035997
VoIP   050 10585997(domestic only)
e-mail   [EMAIL PROTECTED]
For business:
Feel free to mail me(above), please.
Donation   http://www.PayPal.Com
GPG FingerPrint:
032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 


   


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Article on Sun's DTrace

2004-07-05 Thread Volker Stolz
In local.freebsd-hackers, you wrote:
> I haven't seen above well yet. But A article says that DTrace sounds
> like 30,000 lines of debug print. 

No, already the first article tells you that they use a VM with byte-code
for the C-like language "D". And it's not compiled into the kernel but
hooked in and removed on-the-fly.

Volker
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
Neu! Ändern Sie den Anfangstag Ihrer Woche
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: APM Patches

2004-07-05 Thread Niki Denev
M. Warner Losh writes:
In message: <[EMAIL PROTECTED]>
"Liam J. Foy" <[EMAIL PROTECTED]> writes:
: Hey guys,
: 
: 	Since it was decided (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html)
: we are going to stick with apm -l producing -1 and not 255 which is stated in the handbook would one 
: of you guys please commit:
: 
: --- /usr/src/usr.sbin/apm/apm.8	Thu Jun 24 17:32:55 2004
: +++ /liamfoy/apm.8	Thu Jun 24 17:32:27 2004
: @@ -106,7 +106,7 @@
:  state respectively.
:  .It Fl t
:  Display the estimated remaining battery lifetime in seconds.  If
: -it is unknown, 255 is displayed.
: +it is unknown, -1 is displayed.
:  .It Fl Z
:  Transition the system into standby mode.  This mode uses less power than
:  full power mode, but more than suspend mode.  Some laptops support
: 
: 
: 
: Another patch I would like you guys to review is this. Currently apm -t will output
: 0 when it cannot find a valid rate or the full battery time(as the comment mentions).
: I think it should return -1 (unknown) to reflect an error, which is stated in the man page.
: It should not return 0 since we do not have 0 seconds left, we have an unknown value
: remaining. Either that or the man page it edited. I believe the following patch should 
: be commited really.
: 
: The patch is:
: 
: --- /usr/src/sys/dev/acpica/acpi_cmbat.c	Sun Jul  4 20:41:43 2004
: +++ /home/liamfoy/acpi_cmbat.c	Sun Jul  4 20:39:14 2004
: @@ -536,7 +536,7 @@
:  	bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100;
:  	} else {
:  	/* Couldn't find valid rate and full battery time */
: -	bat[i]->min = 0;
: +	bat[i]->min = -1;
:  	}
:  	total_min += bat[i]->min;
:  	total_cap += bat[i]->cap;

I don't like this patch, since we use ->min later for math...
Warner
What about this ?
--- sys/dev/acpica/acpi_cmbat.c.origMon Jul  5 15:15:28 2004
+++ sys/dev/acpica/acpi_cmbat.c Mon Jul  5 16:37:02 2004
@@ -655,7 +655,7 @@
battinfo->state = ACPI_BATT_STAT_NOT_PRESENT;
} else {
battinfo->cap = sc->cap;
-   battinfo->min = sc->min;
+   battinfo->min = sc->min ? sc->min : -1;
battinfo->state = sc->bst.state;
}

--
Regards,
Niki


pgpBL1tX6Wh3X.pgp
Description: PGP signature


Re: Article on Sun's DTrace

2004-07-05 Thread Eitarou Kamo
Hi Volker and all,
Volker Stolz wrote:
In local.freebsd-hackers, you wrote:
 

I haven't seen above well yet. But A article says that DTrace sounds
like 30,000 lines of debug print. 
   

No, already the first article tells you that they use a VM with byte-code
for the C-like language "D". And it's not compiled into the kernel but
hooked in and removed on-the-fly.
Volker
 

I don't know langage "D" well. But my guess is that they trim the info
valuable from the debug print outputs. Sorry I haven't read the
articles compleately yet.
Eitarou
--
   
***
	Eitarou Kamo

Tel. +81 75 7035997
Fax  +81 75 7035997
VoIP   050 10585997(domestic only)
e-mail   [EMAIL PROTECTED]
For business:
Feel free to mail me(above), please.
Donation   http://www.PayPal.Com
GPG FingerPrint:
032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 


   


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Article on Sun's DTrace

2004-07-05 Thread Eitarou Kamo
Hi,
Eitarou Kamo wrote:

No, already the first article tells you that they use a VM with 
byte-code
for the C-like language "D". And it's not compiled into the kernel but
hooked in and removed on-the-fly.


I don't know langage "D" well. But my guess is that they trim the info
valuable from the debug print outputs. Sorry I haven't read the
articles compleately yet.
Eitarou
Again DTrace seems to observe the resources via system analyze tool
and command. But language "D" seems to be great enough to call C/C++
function or even assembler.
--
   
***
	Eitarou Kamo

Tel. +81 75 7035997
Fax  +81 75 7035997
VoIP   050 10585997(domestic only)
e-mail   [EMAIL PROTECTED]
For business:
Feel free to mail me(above), please.
Donation   http://www.PayPal.Com
GPG FingerPrint:
032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 


   


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: APM Patches

2004-07-05 Thread Liam J. Foy
On Mon, 05 Jul 2004 16:45:11 +0300
Niki Denev <[EMAIL PROTECTED]> wrote:

> M. Warner Losh writes:
> 
> > In message: <[EMAIL PROTECTED]>
> > "Liam J. Foy" <[EMAIL PROTECTED]> writes:
> > : Hey guys,
> > : 
> > :   Since it was decided 
> > (http://lists.freebsd.org/pipermail/freebsd-acpi/2004-June/000352.html)
> > : we are going to stick with apm -l producing -1 and not 255 which is stated in 
> > the handbook would one 
> > : of you guys please commit:
> > : 
> > : --- /usr/src/usr.sbin/apm/apm.8   Thu Jun 24 17:32:55 2004
> > : +++ /liamfoy/apm.8Thu Jun 24 17:32:27 2004
> > : @@ -106,7 +106,7 @@
> > :  state respectively.
> > :  .It Fl t
> > :  Display the estimated remaining battery lifetime in seconds.  If
> > : -it is unknown, 255 is displayed.
> > : +it is unknown, -1 is displayed.
> > :  .It Fl Z
> > :  Transition the system into standby mode.  This mode uses less power than
> > :  full power mode, but more than suspend mode.  Some laptops support
> > : 
> > : 
> > : 
> > : Another patch I would like you guys to review is this. Currently apm -t will 
> > output
> > : 0 when it cannot find a valid rate or the full battery time(as the comment 
> > mentions).
> > : I think it should return -1 (unknown) to reflect an error, which is stated in 
> > the man page.
> > : It should not return 0 since we do not have 0 seconds left, we have an unknown 
> > value
> > : remaining. Either that or the man page it edited. I believe the following patch 
> > should 
> > : be commited really.
> > : 
> > : The patch is:
> > : 
> > : --- /usr/src/sys/dev/acpica/acpi_cmbat.c  Sun Jul  4 20:41:43 2004
> > : +++ /home/liamfoy/acpi_cmbat.cSun Jul  4 20:39:14 2004
> > : @@ -536,7 +536,7 @@
> > :   bat[i]->min = (bat[i]->full_charge_time * bat[i]->cap) / 100;
> > :   } else {
> > :   /* Couldn't find valid rate and full battery time */
> > : - bat[i]->min = 0;
> > : + bat[i]->min = -1;
> > :   }
> > :   total_min += bat[i]->min;
> > :   total_cap += bat[i]->cap;
> > 
> > I don't like this patch, since we use ->min later for math...
> > 
> > Warner
> 
> What about this ?
> 
> --- sys/dev/acpica/acpi_cmbat.c.orig  Mon Jul  5 15:15:28 2004
> +++ sys/dev/acpica/acpi_cmbat.c   Mon Jul  5 16:37:02 2004
> @@ -655,7 +655,7 @@
>   battinfo->state = ACPI_BATT_STAT_NOT_PRESENT;
>  } else {
>   battinfo->cap = sc->cap;
> - battinfo->min = sc->min;
> + battinfo->min = sc->min ? sc->min : -1;
>   battinfo->state = sc->bst.state;
>  }
>  
Hmm, yes. Actually looking now, this patch seem alot better. It should
not affect the math.

I like it. Up to the others.
> 
> 
> --
> Regards,
> Niki
> 


-- 
-Liam J. Foy
http://liamfoy.kerneled.org
"Love is like maths -- the idea is simple but can be quite complicated."
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


[patch] attach ipfw rules to jails

2004-07-05 Thread Christian S.J. Peron
I have written support for attaching ipfw rules to jails. I am 
looking for some testers/feedback.

http://people.freebsd.org/~csjp/ip_fw_jail.diff

NOTES:
o Apply the patch
o cd /usr/src && make includes
o rebuild your kernel (or just the ipfw module)
o rebuild the ipfw userspace utility;

Syntax:

ipfw add count ip from any to any jail 1

"jail" takes a numeric argument, a jail ID.

For those of you who dont know, jail IDs can be retrieved using
the jls(8) utility.

Input would be greatly appriciated.
Thanks!

-- 
Christian S.J. Peron
[EMAIL PROTECTED]
FreeBSD Committer
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Call for FreeBSD status reports

2004-07-05 Thread Scott Long
All,

It's time again for the bi-monthly FreeBSD status reports.  We're on an
upward trend in numbers of reports that are submitted, and I'm hoping to
get 25 this time.  As always, reports are encouraged for anything that
relates to FreeBSD development, documentation, independent projects, or
anything else that might be interesting to the community as a whole.
Reports should be one to two paragraphs in length.  The template can be
found at http://www.freebsd.org/news/status/report-sample.xml

Submissions are due to [EMAIL PROTECTED] by July 15.

Thanks,

Scott
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [patch] attach ipfw rules to jails

2004-07-05 Thread Alex Lyashkov
В Втр, 06.07.2004, в 00:27, Christian S.J. Peron пишет:
> I have written support for attaching ipfw rules to jails. I am 
> looking for some testers/feedback.
> 
> http://people.freebsd.org/~csjp/ip_fw_jail.diff
> 
> NOTES:
> o Apply the patch
> o cd /usr/src && make includes
> o rebuild your kernel (or just the ipfw module)
> o rebuild the ipfw userspace utility;
> 
> Syntax:
> 
> ipfw add count ip from any to any jail 1
> 
> "jail" takes a numeric argument, a jail ID.
> 
> For those of you who dont know, jail IDs can be retrieved using
> the jls(8) utility.
> 
> Input would be greatly appriciated.
> Thanks!
who not port vimage project to -current ? separated network stack and
firewall rules more and more faster then this...
If system not have jails vimage not add 
observable overhead to system..

-- 
Alex Lyashkov <[EMAIL PROTECTED]>
PSoft
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [patch] attach ipfw rules to jails

2004-07-05 Thread Julian Elischer


On Tue, 6 Jul 2004, Alex Lyashkov wrote:

> ÷ ÷ÔÒ, 06.07.2004, × 00:27, Christian S.J. Peron ÐÉÛÅÔ:
> > I have written support for attaching ipfw rules to jails. I am 
> > looking for some testers/feedback.
> > 
> > http://people.freebsd.org/~csjp/ip_fw_jail.diff
> > 
> > NOTES:
> > o Apply the patch
> > o cd /usr/src && make includes
> > o rebuild your kernel (or just the ipfw module)
> > o rebuild the ipfw userspace utility;
> > 
> > Syntax:
> > 
> > ipfw add count ip from any to any jail 1
> > 
> > "jail" takes a numeric argument, a jail ID.
> > 
> > For those of you who dont know, jail IDs can be retrieved using
> > the jls(8) utility.
> > 
> > Input would be greatly appriciated.
> > Thanks!
> why not port vimage project to -current ? separated network stack and
> firewall rules more and more faster then this...
> If system not have jails vimage not add 
> observable overhead to system..

vimage is a good idea but it has great problems in an expandable world.
(i.e. with systems that use klds a lot)

It relies on all globals being moved to a structure, but
the structure needs to be defined at compile time so it can not be
expanded when a module is loaded to accomodate the globasl from that
module. Thsi COULD be solved by adding an extra level of indirection
for all globals but that is a lot of overhead, and it could be resolved
using something similar to the TLS (thread local storage)
technology being developed but it would still be  a non trivial bit of
work to make it a production quality system.

Julian


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [patch] attach ipfw rules to jails

2004-07-05 Thread Alex Lyashkov
В Втр, 06.07.2004, в 08:34, Julian Elischer пишет:

> vimage is a good idea but it has great problems in an expandable world.
> (i.e. with systems that use klds a lot)
> 
> It relies on all globals being moved to a structure, but
> the structure needs to be defined at compile time so it can not be
> expanded when a module is loaded to accomodate the globasl from that
> module. Thsi COULD be solved by adding an extra level of indirection
> for all globals but that is a lot of overhead, and it could be resolved
> using something similar to the TLS (thread local storage)
> technology being developed but it would still be  a non trivial bit of
> work to make it a production quality system.
> 
> Julian
I do not know who work TLS (if it easy please explain it) but my view
for this problem - if for this module not reserve place at global
structure - use private per module storage where placed reference from
global prison structure to module data. And add 2 callback`s -
init/destroy prison context.
Or other way - add to prison array where each modules been registered
pointer to data associated with this module at this prison context. 
I use similar way where add per vps ipsec support at FreeVPS.

-- 
Alex Lyashkov <[EMAIL PROTECTED]>
PSoft
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"