Ok, I spent quite some time trying to figure out why postgresql
would "hang" when using the 'kern.ipc.shm_use_phys' sysctl.
It finally came down to some spinlocks that were being corrupted
in a very tiny shared memory segment.
It seems like the phys_pager doesn't correctly allocate when
given a non PAGE_SIZE'd 'size' so then I think odd stuff happens
to the memory in the pages:
Index: phys_pager.c
===================================================================
RCS file: /home/ncvs/src/sys/vm/phys_pager.c,v
retrieving revision 1.3.2.1
diff -u -u -r1.3.2.1 phys_pager.c
--- phys_pager.c 2000/08/04 22:31:11 1.3.2.1
+++ phys_pager.c 2000/12/05 20:13:25
@@ -83,7 +83,7 @@
* Allocate object and associate it with the pager.
*/
object = vm_object_allocate(OBJT_PHYS,
- OFF_TO_IDX(foff + size));
+ OFF_TO_IDX(foff + PAGE_MASK + size));
object->handle = handle;
TAILQ_INSERT_TAIL(&phys_pager_object_list, object,
pager_object_list);
I basically grabbed this from the swap_pager.c code and it seems
to work.
I'd like to commit it to both current and stable asap (afaik no
one uses kern.ipc.shm_use_phys anyhow, we missed the boat on
Oracle)
--
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message