|
From: Jeremy F. <je...@go...> - 2005-01-09 23:56:58
|
On Sun, 2005-01-09 at 19:14 +0000, Julian Seward wrote:
> > If people could try it out and see if it basically works for them, I'll
> > check it in the next few days. In particular, I'd like it if the people
> > considering porting Valgrind to other OS's could have a look and see how
> > these changes affect them.
>
> Before this goes in, I'd really like that
>
> (1) support for 2.4, and particularly 2.4 on older systems (eg, your
> 2.4 on RH73) gets more beaten on and tested, since in reality we will
> have to give good support for 2.4 for at least another two years.
I can try FC2 with 2.4 kernel, but I expect it would be the same as
using LD_ASSUME_KERNEL=2.4.0 or removing /lib/tls. I don't have any old
distros lying about. I figured we could fix the old stuff once the rest
is checked in (particularly since the RH7.3 problem seems to be in Tom's
bit, hint, hint).
2.4 support will be a matter of fixing little things, since there's no
major code-path differences for 2.4 vs 2.6.
> Are there any performance consequences that you are aware of? I had
> some concern that programs which cycle rapidly between running threads
> would be slower now, because each thread switch involves a trip into
> the kernel where it didn't before.
Not noticable. Besides, the client running native would be doing kernel
context switches anyway, so I don't see that it makes any real
difference.
In fact, I'd expect a bit of an improvement, since the old code used
many syscalls per client syscall, but now it's at most 4.
> > * I implemented the thread-serializing run_sema with both a futex
> > and a pipe-based token-passing scheme. The futex code is more
> > efficient, but the pipe scheme works everywhere, so that's what
> > is enabled by default. Switching is a compile-time option, but
> > it could be done at runtime.
>
> Do you have any numbers indicating the relative expenses of the two
> schemes?
Not measurable in single-threaded programs, which is where it would make
the most difference (2 syscalls/context switch vs. 0). I'll stick with
the pipe code.
J
|