From owner-cvs-all@FreeBSD.ORG Wed Jun 9 19:29:18 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8799016A4CE; Wed, 9 Jun 2004 19:29:18 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82AA143D46; Wed, 9 Jun 2004 19:29:18 +0000 (GMT) (envelope-from bmilekic@FreeBSD.org) Received: from freefall.freebsd.org (bmilekic@localhost [127.0.0.1]) i59JTInK044796; Wed, 9 Jun 2004 19:29:18 GMT (envelope-from bmilekic@freefall.freebsd.org) Received: (from bmilekic@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i59JTI0h044795; Wed, 9 Jun 2004 19:29:18 GMT (envelope-from bmilekic) Date: Wed, 9 Jun 2004 19:29:18 +0000 From: Bosko Milekic To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Message-ID: <20040609192918.GA44607@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Re: cvs commit: src/sys/vm uma_core.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 19:29:18 -0000 Please note: this only fixes the cluster case and not other types of ext bufs which do MEXTADD. Basically the refcounting method works well as long as the refcounts are type-stable. This could be made a requirement for all ext_bufs without problem, and for those who do not provide ref cnts, I will replace the malloc() of the refcnt with a uma zone allocation of the refcnt from a special UMA_ZONE_NOFREE refcnt zone. We need to use atomics here because there is no place where to put a mutex, so I can't fix this by just protecting the refcnt with a mutex. -Bosko bmilekic 2004-06-09 19:18:51 UTC FreeBSD src repository Modified files: sys/vm uma_core.c Log: Make the slabrefzone, the zone from which we allocated slabs with internal reference counters, UMA_ZONE_NOFREE. This way, those slabs (with their ref counts) will be effectively type-stable, then using a trick like this on the refcount is no longer dangerous: ...