From owner-freebsd-arch Sun Feb 17 12:12: 8 2002 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id AF49337B42C; Sun, 17 Feb 2002 12:11:59 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g1HKBsv88526; Sun, 17 Feb 2002 12:11:54 -0800 (PST) (envelope-from dillon) Date: Sun, 17 Feb 2002 12:11:54 -0800 (PST) From: Matthew Dillon Message-Id: <200202172011.g1HKBsv88526@apollo.backplane.com> To: Poul-Henning Kamp Cc: Terry Lambert , Julian Elischer , Alfred Perlstein , arch@FreeBSD.ORG, jhb@FreeBSD.ORG, peter@wemm.org, jake@locore.ca Subject: Re: gettimeofday() and crhold()/crfree() (was Re: gettimeofday()and copyout(). Is copyout() MPSAFE on non-i386 archs? ) References: <5405.1013975811@critter.freebsd.dk> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :Peter and I actually had a sligthly different idea: : :Add a new syscall: : : int getkernstuff(struct kernstuff *kp); : : struct kernstuff { : u_int32_t version; : pid_t pid, ppid; : uid_t uid, euid ... : gid_t gid, guid ... : signal masks : ... : } : :The idea here being that the userland process registers a single :static structure with the kernel. Inside libc, this structure :can be used to speed up signal processing and much more. This would make time-of-day updates rather costly. I would much prefer if the kernel was responsible for mapping the page(s) and for being told what the user process is actually wants to look at. That way the kernel has the maximum flexibility in regards to dealing with shareable information like the time of day, and unshareable information like the pid. Frankly, there isn't much point mapping the pid, uid, etc... those calls are not in the critical path. The signal mask would be useful. But, again, I think it must be the kernel that does the mapping. It is far too dangerous otherwise IMHO. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message