9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Calling vac from C
@ 2009-02-24 16:22 erik quanstrom
  0 siblings, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2009-02-24 16:22 UTC (permalink / raw)
  To: rvs, 9fans

> > cfork is ~525 lines long and seems to take the curious tack of
> > forking all the lwps associated with a process.
>
> that would be forkall(), not fork1()/fork()

my mistake.  i assumed that since isfork1 was
a flag, that it was not the normal path through
the code.  silly me.

so where's the mythical accounting?

- erik



^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <c9aea65e7f058933edc0a22e931ea675@quanstro.net>]
* Re: [9fans] Calling vac from C
@ 2009-02-24 17:01 erik quanstrom
  0 siblings, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2009-02-24 17:01 UTC (permalink / raw)
  To: rvs, quanstro, 9fans

> It could have been the "old" accounting. Solaris 10
> changed a lot of that and made things like microstate
> accounting on by default, thus, possibly eliminating
> the kind of bottlenecks the instructor was referring
> to. More on that here:
>    http://blogs.sun.com/eschrock/entry/microstate_accounting_in_solaris_10

data would be helpful.  nobody here has shown any version
of solaris to be slow forking, much less that it is slow
forking because of accounting.  my dimly-remembered
data support the conclusion that the now-ancient 670mp
had a poor mmu, not that solaris was good or bad.
i couldn't find rob's original email online, so i put it up.
http://www.quanstro.net/plan9/p9fork.txt

- erik



^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <ac072e66c823fd6d649593efec9e221b@quanstro.net>]
* Re: [9fans] Calling vac from C
@ 2009-02-24 15:54 erik quanstrom
  2009-02-24 16:15 ` Roman V. Shaposhnik
  0 siblings, 1 reply; 13+ messages in thread
From: erik quanstrom @ 2009-02-24 15:54 UTC (permalink / raw)
  To: ben, 9fans

> about 5 years ago i took a class on performance tuning Solaris.
>
> The instructor claimed that fork was expensive because accounting is never really turned off, just piped to /dev/null.  there is no accounting overhead for threads.
>
> I never bothered to verify this, but now that this comes up, I'd tempted.

there's no need to guess.  here's the source code.

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/fork.c

cfork is ~525 lines long and seems to take the curious tack of
forking all the lwps associated with a process.  i don't
see any accounting, but i see at least 9 + nlwp + nresourcectls
mutex locks if you follow the regular fork path.  what is the
accounting that you're thinking of?  it would be easy to miss.

- erik



^ permalink raw reply	[flat|nested] 13+ messages in thread
* [9fans] Calling vac from C
@ 2009-02-19  9:53 anooop.anooop
  2009-02-19 12:55 ` erik quanstrom
  2009-02-20  9:53 ` anooop.anooop
  0 siblings, 2 replies; 13+ messages in thread
From: anooop.anooop @ 2009-02-19  9:53 UTC (permalink / raw)
  To: 9fans

Hello once again,

I was wondering whether if there are any libraries that I can include
to call vac and unvac directly from my C code. Currently I am
executing them in the shell using popen and capturing the output. I am
looking for better ways.

~Anoop



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-02-24 17:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-24 16:22 [9fans] Calling vac from C erik quanstrom
     [not found] <c9aea65e7f058933edc0a22e931ea675@quanstro.net>
2009-02-24 17:17 ` Roman V. Shaposhnik
  -- strict thread matches above, loose matches on Subject: below --
2009-02-24 17:01 erik quanstrom
     [not found] <ac072e66c823fd6d649593efec9e221b@quanstro.net>
2009-02-24 16:32 ` Roman V. Shaposhnik
2009-02-24 15:54 erik quanstrom
2009-02-24 16:15 ` Roman V. Shaposhnik
2009-02-19  9:53 anooop.anooop
2009-02-19 12:55 ` erik quanstrom
2009-02-20  9:53 ` anooop.anooop
2009-02-20 15:41   ` erik quanstrom
2009-02-20 16:17     ` Uriel
2009-02-20 16:47       ` erik quanstrom
2009-02-24  6:10         ` Ben Calvert

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).