ZONE(9): Enable per-processor cache for SMP

This prevents a potential deadlock via the Giant lock and is a
performance benefit.
This commit is contained in:
Sebastian Huber
2015-03-06 13:58:45 +01:00
parent 8ed1b181aa
commit e5db084cd8
2 changed files with 14 additions and 2 deletions

View File

@@ -89,6 +89,18 @@ __FBSDID("$FreeBSD$");
#include <vm/uma_dbg.h>
#include <ddb/ddb.h>
#ifdef __rtems__
#ifdef RTEMS_SMP
/*
* It is essential that we have a per-processor cache, otherwise the
* critical_enter()/critical_exit() protection would be insufficient.
*/
#undef curcpu
#define curcpu rtems_get_current_processor()
#undef mp_maxid
#define mp_maxid rtems_get_processor_count()
#endif
#endif /* __rtems__ */
/*
* This is the zone and keg from which all zones are spawned. The idea is that