From owner-freebsd-current Sat May 22 20:37:51 1999 Delivered-To: freebsd-current@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id 3D00514D93 for ; Sat, 22 May 1999 20:37:44 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 841F922; Sun, 23 May 1999 11:37:40 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans Cc: dima@tejblum.dnttm.rssi.ru, freebsd-current@FreeBSD.ORG Subject: Re: calcru and upages In-reply-to: Your message of "Sun, 23 May 1999 12:45:47 +1000." <199905230245.MAA13333@godzilla.zeta.org.au> Date: Sun, 23 May 1999 11:37:40 +0800 From: Peter Wemm Message-Id: <19990523033740.841F922@overcee.netplex.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans wrote: > >calcru() access p_stats, which is in upages. Therefore, as I understand, > >it should not be called on a swapped out process. Neither calcru() nor > > Does anyone object to moving everything except the stack from the upages > to the proc table? > > Bruce Well, we have three things that are about the same size: struct pcb u_pcb; 240 bytes struct sigacts u_sigacts; 292 bytes struct pstats u_stats; 248 bytes On the other hand: sizeof (struct proc) = 328 bytes. the pcb contains a heap of space for the FP state. It accounts for 176 of the 240 bytes, leaving 64-odd bytes left for the pcb proper. The ldt pointers need to move to proc scope for rfork()/clone(), and gc'ing a few things that can get it as low as 40 - 48 bytes. pcb_savefpu has padding in case a FPU emulator is used and is actually smaller than 176 bytes, and could be changed depending on whether it's a real or emulated fpu. IMHO, I'd move them to reference counted malloc'ed structs since sigacts needs to be shared for clone/rforked processes. I think there is also benefit to having the sigacts at least malloced, one day we should be able to extend the signals beyond the existing 32 set, at least for the 32 extra RT signals. I personally would love to see this come out of the upages, it makes tracking through a stack overflow even harder. We could put an unmapped red-line page below the bottom stack page to ensure we get a double fault on an overflow instead of mystery corruptions etc. I also think it's a step closer towards seperating thread context vs. process context. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message