rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Tim Goodwin <tjg@star.le.ac.uk>
To: Paul Haahr <haahr@jivetech.com>
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: Dynamically loading readline on demand (was Re: rc futures)
Date: Fri, 14 Jan 2000 11:26:20 -0500	[thread overview]
Message-ID: <vjsAAPhNfzhvHg8A@ltsun0.star.le.ac.uk> (raw)
In-Reply-To: <cUtYiM7MbD@iadd.jivetech.com>

> > I took an rc script that does nothing (makes no system calls) except
> > fork() and wait() 10000 times.
> 
> Are you sure it doesn't exec at all?

You tell me.

    for (i in 0 1 2 3 4 5 6 7 8 9)
    ...
    for (m in 0 1 2 3 4 5 6 7 8 9)
    @{ ~ 0 0 }

According to strace on my Linux box, each loop calls fork(), close(),
rt_sigaction() twice, _exit(), and wait().

> > ([...]  Why does dynamic linking increase the user time?

>                             The short answer is ``because dynamic
> linking is done with user-space code.'')

Yeah: in crt0.  But (I'm sure) that isn't involved here.  I'd expect
fork() to take more *system* time (since there are more MAP_SHARED page
table entries to fiddle with), but I don't understand the increase in
user time.

> I disagree.  Overall system resource consumption still goes down with
> dynamic linking and loading.  If a system is set up to use dynamic
> linking by default, why should rc override that?

You're right.  I wish you'd stop doing that :-).

Forcing static linking down people's throats is Not Nice.  Particularly
because (at least with the present setup) it's dead easy to turn static
linking on, but it would be quite hard to turn it off.  (For comparison,
see how easy it isn't to turn off `-Wall' if you're using gcc.)

I still intend to advocate it in the INSTALL document, though.

Tim.


  reply	other threads:[~2000-01-14 20:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-15 16:32 rc futures Russ Cox
2000-01-05 11:59 ` Dynamically loading readline on demand (was Re: rc futures) Tim Goodwin
2000-01-01  0:22   ` Paul Haahr
2000-01-14 16:26     ` Tim Goodwin [this message]
2000-01-14 19:18       ` Paul Haahr
2000-01-13  0:19   ` Jeremy Fitzhardinge
2000-01-07 10:38 Bengt Kleberg
2000-01-14 11:11 Bengt Kleberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vjsAAPhNfzhvHg8A@ltsun0.star.le.ac.uk \
    --to=tjg@star.le.ac.uk \
    --cc=haahr@jivetech.com \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).