From owner-freebsd-arch@FreeBSD.ORG Mon Jun 4 21:30:16 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B8D4106567F; Mon, 4 Jun 2012 21:30:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2B7358FC08; Mon, 4 Jun 2012 21:30:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 86A4FB95B; Mon, 4 Jun 2012 17:30:15 -0400 (EDT) From: John Baldwin To: Giovanni Trematerra Date: Mon, 4 Jun 2012 17:23:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120604181917.GD85127@deviant.kiev.zoral.com.ua> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206041723.49562.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 04 Jun 2012 17:30:15 -0400 (EDT) Cc: Alan Cox , Alexander Kabaev , Attilio Rao , freebsd-arch@freebsd.org, Konstantin Belousov Subject: Re: Fwd: [RFC] Kernel shared variables X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 21:30:16 -0000 On Monday, June 04, 2012 5:16:10 pm Giovanni Trematerra wrote: > On Mon, Jun 4, 2012 at 8:19 PM, Konstantin Belousov wrote: > > On Mon, Jun 04, 2012 at 11:01:57AM -0400, John Baldwin wrote: > >> On Sunday, June 03, 2012 6:49:27 am Bruce Evans wrote: > >> > On Sun, 3 Jun 2012, Konstantin Belousov wrote: > > >> I think duplicating this logic in userland would just be wasteful. I have > >> a private fast gettimeofday() at my current job and it works by exporting > >> the current timehands structure (well, the equivalent) to userland. The > >> userland bits then fetch a copy of the details and do the same as bintime(). > >> (I move the math (bintime_addx() and the multiply)) out of the loop however. > > I started yesterday an implementation which uses shared page to export > > some variant of timehands, and uses auxv to provide the libc with a pointer > > to timehands when rdtsc is reasonable. > > > > I almost finished both 32bit and 64bit userspace, but there is > > kernel-side work left. Is your implementation ready or close to be ready > > for commit ? In other words, should I drop the efforts, or continue ? > > > > Hey wait, What are you doing? > This is completely unfair. You didn't even review my patch. > I really don't understand your way to completely ignore me and start implement > yesterday something you didn't care about for more than 3 years. > It costs me a lot of time and energy and I think I deserve more respect that > just be ignored. In fairness, I would not be able to use your version of gettimeofday(). My application requires something where we can interpolate based on the value of rdtsc(). Also, I don't really see the need to export anything other than the details to make gettimeofday() faster. I don't see a practical need for using shared variables for getpid(), getpgid(), getppid(), getuid(), or the like. -- John Baldwin