Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Mar 2005 03:11:24 -0500 (EST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        David Xu <davidxu@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys proc.h umtx.h src/sys/kernkern_thread.c kern_umtx.c
Message-ID:  <20050306031104.K50530@mail.chesapeake.net>
In-Reply-To: <422A46E3.6070902@freebsd.org>
References:  <200503050915.j259F30c058488@repoman.freebsd.org> <20050305041220.M4921@odysseus.silby.com> <422A46E3.6070902@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 6 Mar 2005, David Xu wrote:

> Mike Silbersack wrote:
>
> >
> > On Sat, 5 Mar 2005, David Xu wrote:
> >
> >> davidxu     2005-03-05 09:15:03 UTC
> >>
> >>  FreeBSD src repository
> >>
> >>  Modified files:
> >>    sys/sys              proc.h umtx.h
> >>    sys/kern             kern_thread.c kern_umtx.c
> >>  Log:
> >>  Allocate umtx_q from heap instead of stack, this avoids
> >>  page fault panic in kernel under heavy swapping.
> >
> >
> > Heavy swapping, or just unlucky swapping like we were talking about in
> > relation to kern_sig.c?
> >
> If I understand it correctly, kernel stack is swapped out only when
> there is memory
> pressure, for example, following code:
>
> char  *p = malloc(1024 * 1024 * 512); // assume you have memory less
> than 512M
> for (;;)
>     memset(p, 0, 1024 * 1024 * 512);
>
> and if there is thousands of thread in the kernel and all are sleeping
> (rarely extreme case), swapping out all their kernel stack can save several
> megabytes. because so many people have the objection to disable it, and
> would like to accept a serious risk, I just adjusted the code to work
> around it,
> that does not mean I agree their points.



>
> > Mike "Silby" Silbersack
> >
> >
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050306031104.K50530>