1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Release the second critical section in uma_zfree_arg() slightly earlier.

It is only needed when removing a full bucket from the per-CPU cache. The
bucket cache (uz_buckets) is protected by the zone mutex and thus the
critical section can be released before inserting into that list.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2016-07-20 01:01:50 +00:00
parent 20c58db95a
commit afa5d70339
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303059

View File

@ -2744,6 +2744,8 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata)
goto zfree_start;
}
cache->uc_freebucket = NULL;
/* We are no longer associated with this CPU. */
critical_exit();
/* Can we throw this on the zone full list? */
if (bucket != NULL) {
@ -2756,9 +2758,6 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata)
LIST_INSERT_HEAD(&zone->uz_buckets, bucket, ub_link);
}
/* We are no longer associated with this CPU. */
critical_exit();
/*
* We bump the uz count when the cache size is insufficient to
* handle the working set.