Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2001 21:45:48 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        bmilekic@FreeBSD.org, jlemon@FreeBSD.org, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Mike Silbersack <silby@FreeBSD.org>, "Brian F. Feldman" <green@FreeBSD.org>, Jonathan Lemon Alfred Perlstein <bright@sneakerz.org>
Subject:   Re: cvs commit: src/sys/netinet tcp_input.c tcp_output.c tcp_sub
Message-ID:  <XFMail.010626214548.jhb@FreeBSD.org>
In-Reply-To: <200106261812.f5QICpr26493@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 26-Jun-01 Matt Dillon wrote:
> 
>:Agreed, wrt idle zeroing of data, the problem that I see is that
>:it seems that idleproc may not aquire mutexes, at least that's the
>:impression I get from the SMP team (jhb and crew).  I feel that
>:idleproc should at least be able to trylock if we're going to make
>:any use of it at all.
>:
>:Is this planned or possible?
>:
>:-Alfred
> 
>     idle_proc() can only safely obtain spin mutexes, and do non-blocking
> mutex
>     operations.  The trylock() equivalent should be ok but I haven't looked
>     at it closely.  idle_proc() cannot ever block though I suppose it could
>     be interrupted and switched out preemptively.

It can't obtain a sleep lock at all (either via lock or trylock) because if
another thread blocks on that lock, the priority propagation code will put the
idle process on the runqueue, at which point you can end up running cpu A's
idle process on both cpu A and cpu B at the same time.  Given that curproc is
the uniquifier for locks, the result could best be described as "all hell
breaking loose".

The future of page zering is that it will be pushed off into a low-priority
worker thread that is woken up when there are enough pages to make zeoring
worthwhile and goes back to sleep when there are no longer enough pages to make
zeoring worthwhile.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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