| From | Sent On | Attachments |
|---|---|---|
| David Schultz | Nov 10, 2004 7:00 pm | |
| Scott Long | Nov 10, 2004 7:15 pm | |
| Brian Fundakowski Feldman | Nov 10, 2004 7:16 pm | |
| Bruce M Simpson | Nov 10, 2004 7:32 pm | |
| Scott Long | Nov 10, 2004 7:44 pm | |
| David Schultz | Nov 10, 2004 7:56 pm | |
| Julian Elischer | Nov 10, 2004 9:59 pm | |
| Marcel Moolenaar | Nov 10, 2004 11:53 pm | |
| John Baldwin | Nov 11, 2004 9:28 am | |
| Scott Long | Nov 11, 2004 4:16 pm | |
| David Schultz | Nov 11, 2004 5:01 pm | |
| Marcel Moolenaar | Nov 11, 2004 7:51 pm | |
| Scott Long | Nov 11, 2004 10:26 pm | |
| Matthew Dillon | Nov 13, 2004 6:19 pm |
| Subject: | U Area Removal | |
|---|---|---|
| From: | John Baldwin (jh...@FreeBSD.org) | |
| Date: | Nov 11, 2004 9:28:44 am | |
| List: | org.freebsd.freebsd-arch | |
On Wednesday 10 November 2004 10:00 pm, David Schultz wrote:
Over the years, the amount of data we have stored in each process' U area has eroded to the point where all we have left are the following:
- A struct kinfo_proc that is only used for a.out core dumps. This can be reconstructed at the time of the core dump, so it doesn't need to be there.
- The struct pstats for the process, which takes a mere 216 bytes on i386.
In exchange for the ability to swap out this 216-byte structure, we keep around a 4096-byte page, a 132-byte vm_object, and a couple of pointers. Moreover, there is a small amount of runtime overhead associated with this, and developers need to remember to PHOLD() and PRELE() the process as appropriate.[1]
I propose to remove the ability to swap the U area, allocating p_stats from malloced memory instead. Medium-term scheduling and swapping of kernel stacks would be retained. Here are the patches; !i386 testers wanted:
http://www.freebsd.org/~das/patches/upages.diff
[1] Most of the instances of PHOLD() and PRELE() right now never needed to be there or have been unnecessary ever since the PCB was moved out of the U area.
Yay! Two notes:
+struct pstats * +pstats_alloc(void) +{ + + return (malloc(sizeof(struct plimit), M_SUBPROC, M_ZERO|M_WAITOK)); +}
I think you mean s/plimit/pstats/ there.
Secondly:
/* - * Per process structure containing data that isn't needed in core - * when the process isn't running (esp. when swapped out). + * Formerly the per-process structure containing data that isn't needed + * in core when the process is swapped out, this structure remains only + * for the benefit of a.out core dumps. */
s/out, this/out. This/
It's a whole new sentence. :)
-- John Baldwin <jh...@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org





