From owner-freebsd-arch Fri Oct 26 17:57:24 2001 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 7DFAC37B401; Fri, 26 Oct 2001 17:57:18 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id f9R0vG642220; Fri, 26 Oct 2001 17:57:16 -0700 (PDT) (envelope-from dillon) Date: Fri, 26 Oct 2001 17:57:16 -0700 (PDT) From: Matthew Dillon Message-Id: <200110270057.f9R0vG642220@apollo.backplane.com> To: Dag-Erling Smorgrav Cc: Mike Smith , Bakul Shah , Poul-Henning Kamp , Peter Wemm , arch@FreeBSD.ORG Subject: Re: 64 bit times revisited.. References: <200110270013.f9R0DCv05573@mass.dis.org> <200110270038.f9R0cT442082@apollo.backplane.com> 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 : :Matthew Dillon writes: :> Is anyone game for this project? : :I'd volunteer, but I have too many of my own patches to worry about :right now. How about mid-November, after BSDCon Europe? : :DES :-- :Dag-Erling Smorgrav - des@ofug.org With the vnode and sync scaleability stuff *almost* out of the way I've started working on the Giant lock unwinding stuff, so I don't have time this moment either, but I would certainly have time available mid-november to help out! The project could be done and stabilized in a week with three or more people helping out. There is good functional separation: * type changes (stat, timespec, timeval, timex, time_t) * syscall number rolls & compatibility code (sorry BSDI, it's more then 10) * kernel side audit to handle new time_t & structures * libc audit - all time related functions * userland audit to handle new time_t & structures I think everyone has agreed on time_t going to 64 bits, and of course it must be seconds. We have to decide in regards to timeval, stat, and timespec. It looks like we may not have to mess with timex, which is good. machine/ansi.h:#define _BSD_TIME_T_ long /* time()... */ struct timeval { long tv_sec; /* seconds */ long tv_usec; /* and microseconds */ }; struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; struct stat { ... #ifndef _POSIX_SOURCE struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last file status change */ #else time_t st_atime; /* time of last access */ long st_atimensec; /* nsec of last access */ time_t st_mtime; /* time of last data modification */ long st_mtimensec; /* nsec of last data modification */ time_t st_ctime; /* time of last file status change */ long st_ctimensec; /* nsec of last file status change */ #endif }; (there might be other in-kernel structures that we have to mess with) Obviously tv_sec in timeval has to change from long to time_t, and time_t has to change from long to int64_t. The stat structure gets a bit larger... presumably we have to keep the 'long ... nsec' elements in both the timespec and stat structure to maintain compatibility. Anything else? -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message