From owner-freebsd-current Sat Mar 16 06:06:36 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA04475 for current-outgoing; Sat, 16 Mar 1996 06:06:36 -0800 (PST) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id GAA04468 Sat, 16 Mar 1996 06:06:33 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by Root.COM (8.6.12/8.6.5) with SMTP id GAA07890; Sat, 16 Mar 1996 06:06:26 -0800 Message-Id: <199603161406.GAA07890@Root.COM> X-Authentication-Warning: implode.Root.COM: Host localhost didn't use HELO protocol To: "Jordan K. Hubbard" cc: David Dawes , sos@FreeBSD.org, dyson@FreeBSD.org, current@FreeBSD.org, mmead@Glock.COM Subject: Re: Try this vm_mmap.c -- please In-reply-to: Your message of "Sat, 16 Mar 1996 04:36:29 PST." <244.826979789@time.cdrom.com> From: David Greenman Reply-To: davidg@Root.COM Date: Sat, 16 Mar 1996 06:06:26 -0800 Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >> Does accelx by any chance use MAP_PRIVATE? > >Bingo! > >Between David's comment here and John's own comment in the latest >vm_mmap.c he sent out which says: > > * On device mmaps we default to map shared -- makes the most > * sense in this case. Does MAP_PRIVATE even make sense on > * devices mmaps??? > >I made the following change: > > if ((type == OBJT_DEVICE)) { > if (flags & (MAP_PRIVATE|MAP_SHARED) == 0) > flags |= MAP_SHARED; > else if (flags & MAP_PRIVATE) > flags &= ~MAP_PRIVATE; > } Could be written as: /* * Force device mappings to be shared. */ if (type == OBJT_DEVICE) { flags &= ~MAP_PRIVATE; flags |= MAP_SHARED; } >Which turns MAP_PRIVATE *off* for device objects. My Xaccel 1.2 now >works perfectly! Yay! Yes, as John and I have discussed, it really doesn't make any sense to allow COW (MAP_PRIVATE) mappings of devices. I think forcing them shared is reasonable. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project