From owner-freebsd-hackers Tue Dec 5 13:44:33 2000 From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 5 13:44:30 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843399.broadbandoffice.net [64.47.83.135]) by hub.freebsd.org (Postfix) with ESMTP id E74A737B400; Tue, 5 Dec 2000 13:44:29 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id eB5LiNT86399; Tue, 5 Dec 2000 13:44:23 -0800 (PST) (envelope-from dillon) Date: Tue, 5 Dec 2000 13:44:23 -0800 (PST) From: Matt Dillon Message-Id: <200012052144.eB5LiNT86399@earth.backplane.com> To: Alfred Perlstein Cc: peter@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: phys backed shm patch. References: <20001205123456.D8051@fw.wintelcom.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :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: Yes, you are absolutely right. That's definitely a bug and your fix is the correct one. In regards to simultanious commit, unless someone makes the rules a little more reasonable for simple bug fixes like this you'll probably get fried for doing it by bozos who have nothing better to do with their time. -Matt :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'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 - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message