From owner-freebsd-arch@FreeBSD.ORG Mon Jun 4 17:50:11 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 00AC7106564A; Mon, 4 Jun 2012 17:50:10 +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 BD3B18FC12; Mon, 4 Jun 2012 17:50:10 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 287E1B990; Mon, 4 Jun 2012 13:50:10 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Date: Mon, 4 Jun 2012 10:53:51 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <20120602171632.GC2358@deviant.kiev.zoral.com.ua> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201206041053.51802.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 04 Jun 2012 13:50:10 -0400 (EDT) Cc: Gianni , Alan Cox , Alexander Kabaev , Attilio Rao , Konstantin Belousov , 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 17:50:11 -0000 On Saturday, June 02, 2012 1:27:58 pm Attilio Rao wrote: > >> The gettimeofday() implementation is a different story than what is asked here. > > > > But the goal is to have fast clocks, right ? What else is planned ? > > > > In fact, I think that if the whole goal is only fast clocks, then we > > do not need any additional system mechanisms, since we can easily export > > coefficients for rdtsc formula already. E.g. we can put it into elf auxv, > > which is ugly but bearable. > > Not sure if there is anything else besides gettimeofday() that we want > right now, in particular on global basis. > I just mean to say that I don't think Giovanni put a lot of effort in > correctness/robustness of gettimeofday userland implementation, so we > should not judge that part of the patch too tightly. I think this is an important question actually. Is there anything that really needs to be here besides gettimeofday()? I mean, is there any real-world application that needs to call getpid() or getppid() a bunch of times? Things that are static like that the application can easily cache (and should if it actually needs it). gettimeofday() is different because it is dynamic. > >> > Interesting question is how much shared the shared page needs be. > >> > Obvious needs are shared between all same-ABI processes, but I can also > >> > easily see a need for the per-process private information be present in > >> > the 'private-shared' page. For silly but typical example, useful for > >> > moronix-style benchmarks, see getpid(). > >> > >> Really the performance benefits of having fast getpid() is marginal if > >> compared to heavilly used things like gettimeofday(). I cannot think > >> of a per-process page implementing a fast syscall that can bring many > >> perfomance advantages. > > > > This is completely true, but there may be other process-private data that > > could benefit from the low access cost. I just do not know right now. > > I don't know either, thus I don't think there is a big urgence for > per-process shared pages at all. I can't think of anything useful. -- John Baldwin