Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2005 15:52:39 +0300
From:      "ant" <andrit@ukr.net>
To:        "Jeff Roberson" <jroberson@chesapeake.net>, "Robert Watson" <rwatson@FreeBSD.org>
Cc:        jeff@FreeBSD.org, hackers@FreeBSD.org, bmilekic@FreeBSD.org
Subject:   Re: hot path optimizations in uma_zalloc() & uma_zfree()
Message-ID:  <007501c57d73$9ba574b0$d1921bd9@ertpc>
References:  <000d01c57cf7$b9b6f9f0$29931bd9@ertpc> <20050629234429.A87930@fledge.watson.org> <20050629203638.V12343@10.0.0.1>

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

> Do you keep two buckets still?  If so, this is something that I've always
> intended to do, but never got around to.  I'm glad someone has taken the
> initiative.  Will review the patch shortly.

yes, shure. Linux keeps only one array, that is 2 times large of bucket
and it copies half of this array from or to buckets. The positive effect of
this, that in balanced allocs & frees (and when number of allocs or frees in
one iteration is not larger than bucket size) they will deal only with one
array without some switches. In our case, there may be balanced situations,
when we will have continuousely switching between buckets. Anyway, the drawback
of linux approach is the copy operation. In more general cases i suppose it
will be slower.

Anyway we still need 2 buckets, else insted of switching between them
we will have thrashing in switching between our bucket and full or free
zone's list, which must be made with zone's locking.

--
Andriy Tkachuk.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?007501c57d73$9ba574b0$d1921bd9>