Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jan 2007 09:12:31 -0800 (PST)
From:      Mohan Srinivasan <mohan_srinivasan@yahoo.com>
To:        Gleb Smirnoff <glebius@FreeBSD.org>, Mohan Srinivasan <mohans@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm uma_core.c
Message-ID:  <20070125171231.93829.qmail@web30809.mail.mud.yahoo.com>
In-Reply-To: <20070125102045.GJ4485@FreeBSD.org>

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

I did look at the case where the uma_zfree_arg() would free the object back
to the cache and not wake up the processes. uma_zfree_arg() checks for 
ZFLAG_FULL, when that is set it calls uma_zfree_internal(). The wakeup will 
happen from uma_zfree_internal().

mohan

--- Gleb Smirnoff <glebius@FreeBSD.org> wrote:

>   Mohan,
> 
> On Wed, Jan 24, 2007 at 10:49:12PM +0000, Mohan Srinivasan wrote:
> M> mohans      2007-01-24 22:49:12 UTC
> M> 
> M>   FreeBSD src repository
> M> 
> M>   Modified files:
> M>     sys/vm               uma_core.c 
> M>   Log:
> M>   Fix for a bug where only one process (of multiple) blocked on
> M>   maxpages on a zone is woken up, with the rest never being woken up as
> M>   a result of the ZFLAG_FULL flag being cleared. Wakeup all such blocked
> M>   procsses instead. This change introduces a thundering herd, but since
> M>   this should be relatively infrequent, optimizing this (by introducing
> M>   a count of blocked processes, for example) may be premature.
> M>   
> M>   Reviewd by: ups@
> 
>   I hope this should fix some problems, we are observing. Thanks for
> working on this!
> 
>   But I wonder, can the following happen. Under high memory pressure,
> a zone with a limit is exhausted and several processes are waiting
> for memory in this zone. Then a few items are freed, and they are freed
> to the per cpu cache, not to the zone cache. Thus, the wakeup() isn't
> issued, and waiting processes keep waiting forever. Then, some new
> processes can allocate an item from the per cpu cache and free it back
> to the per cpu cache, and again waiting processes won't be waked.
> 
> I've observed and sshd sleeping on "zonelim", while I was successfully
> working via another ssh session.
> 
> -- 
> Totus tuus, Glebius.
> GLEBIUS-RIPN GLEB-RIPE
> 




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