From: "Russ Cox" <rsc@swtch.com>
To: 9fans@9fans.net
Subject: Re: [9fans] 9vx - os x fix
Date: Fri, 27 Jun 2008 13:00:37 -0400 [thread overview]
Message-ID: <20080627165844.4A77F1E8C35@holo.morphisms.net> (raw)
In-Reply-To: <3e1162e60806270839x1e0550b0nef671c73df91fff4@mail.gmail.com>
Replying to many messages... please read to find yours.
> Yep that's working ok. Though I'm losing the ability to send capital
> letters to X11 in general, I'm not sure if that's an artifact of this or
> not.
Almost certainly not. The -F workaround is about new fork
semantics. The capital letters thing may be that I missed an
OS X-specific fix in the X code, imported from p9p.
I hope someone will take it upon themselves to hook the
drawterm Carbon code in instead.
> Is it supposed to run at full-load? Both cores are fully utilized and
> 9vx.OSX uses 187% of the cpu at all times. dtruss reports that the
> main thread is just sitting there doing "select_nocancel(0x0,0x0,0x0)"
> with timeouts.
I think I mentioned this in an earlier message.
I don't know what's going on. I hope someone
else will figure it out. It doesn't do this on Linux
or FreeBSD, which suggests that perhaps there
is a bug in the OS X pthreads implementation
(or in 9vx's use of pthreads). It does make it
somewhat unbearable.
> BTW when i try to make vx32 (under macos 10.5.3) i get the following:
>
> % make
> make: vx32-gcc: Command not found
> make: vx32-gcc: Command not found
> gcc -m32 -c -nostdinc -Ilibvxc/include -g -O3 -MD -std=gnu99 -I.
> -m80387 -mfp-ret-in-387 -o libvxc/_exit.o libvxc/_exit.c
> libvxc/_exit.c: In function '_exit':
> libvxc/syscall.h:8: error: can't find a register in class 'BREG' while
> reloading 'asm'
> make: *** [libvxc/_exit.o] Error 1
The tree has more than just 9vx.
To build guests for the other apps you need
the vx32-gcc cross-compilers to make
loadable ELF binaries. If you
make 9vx/9vx
you'll still get the two "Command not found"
messages, but they're harmless, and the build
should run fine.
> [rminnich@amd64 src]$ make 9vx/9vx
> make: vx32-gcc: Command not found
> make: vx32-gcc: Command not found
> make: *** No rule to make target `9vx/9vx'. Stop.
>
> OK, I can see that 9vx/9vx target in 9vx/Makefrag, but the alarm just
> went off and I gotta go pretend to work. More later. It would be nice
> to have this work on x86 64 :-)
Use
make ARCH=i386
to override the result of uname -m.
The 9vx Makefrag knows not to even bother
trying on x86-64.
> trying to answer my own question about high cpu load, it looks like
> 9vx is busy switching all the time. if anyone knows these tracing
> facilities better, please step up :)
You need to figure out which kproc is the one
that is spinning so hard. The fact that cpu is >100%
suggests that more than one thread is spinning hard,
meaning it is is probably not the single-use guys
like the x11 kproc or the timer kproc. That leaves
all the kprocs that are waiting on i/o.
Try adding some iprints to sched.c after each
call to psleep(), and I bet you'll find an
insomniac.
Russ
next prev parent reply other threads:[~2008-06-27 17:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <14ec7b180806270816t389b0794i1654ae3b6ed2a46d@mail.gmail.com>
2008-06-27 15:31 ` Russ Cox
2008-06-27 15:39 ` [9fans] " David Leimbach
2008-06-27 15:56 ` andrey mirtchovski
2008-06-27 16:04 ` ron minnich
2008-06-27 16:34 ` David Leimbach
2008-06-27 16:41 ` andrey mirtchovski
2008-06-27 17:00 ` Russ Cox [this message]
2008-06-27 17:40 ` andrey mirtchovski
2008-06-27 18:11 ` Russ Cox
2008-06-27 17:58 ` David Leimbach
2008-06-27 16:06 ` roger peppe
2008-06-27 16:44 ` andrey mirtchovski
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=20080627165844.4A77F1E8C35@holo.morphisms.net \
--to=rsc@swtch.com \
--cc=9fans@9fans.net \
/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).