kern/131597: [kernel] c++ exceptions very slow on FreeBSD
kostikbel at gmail.com
Sun Aug 29 12:00:24 UTC 2010
The following reply was made to PR kern/131597; it has been noted by GNATS.
From: Kostik Belousov <kostikbel at gmail.com>
To: David Xu <davidxu at freebsd.org>
Cc: bug-followup at freebsd.org, guillaume at morinfr.org,
John Baldwin <jhb at freebsd.org>
Subject: Re: kern/131597: [kernel] c++ exceptions very slow on FreeBSD 7.1/amd64
Date: Sun, 29 Aug 2010 14:57:56 +0300
Content-Type: text/plain; charset=us-ascii
On Sun, Aug 29, 2010 at 02:55:32PM +0800, David Xu wrote:
> Without the previous signal wrapper patch I posted (I am not sure
> I will use it, because it is too complex), I think there is another way
> to avoid sigprocmask, I have ever written a system call
> sc_shared_t *schedctl(void);
> which returns shared data area between userland and kernel.
> userland code sets a flag in the data area to disable signal delivering.
> when kernel code wants to deliver signal, it also checks the flag, and
> does not deliver signals if the flag is set, then the problem would be=20
I only skimmed over the (incomplete) change. It seems it has issues
with rfork(). In particular, when shared vm space between two processes
Also, it is not clear to me what would happen if the shared page paged
out or user mode explicitely unmap(2) the shared region. At least the kernel
mapping should be invalidated, otherwise kernel might modify random memory.
I do not like the idea of using additional non-observable state bits,
in addition to the signal mask, to block the signal delivery. IMHO, it
subverts the signal mechanism, and, in case of memory corruption, makes
debugging too hard.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
-----END PGP SIGNATURE-----
More information about the freebsd-bugs