Add some unspeakable hackery to the tree under #ifdef __ia64__ to work
around limitations in the ia64 kernel stack handling code. Basically preallocate a bunch of threads (and hence kstacks) while contigmalloc() still works, and never free them back to the general memory pool. After the system has been running for a while, contigmalloc() eventually fails at a critical momemt and panics the system.
This commit is contained in:
parent
74cf93d79d
commit
c281972e61
@ -216,9 +216,23 @@ void
|
||||
threadinit(void)
|
||||
{
|
||||
|
||||
#ifndef __ia64__
|
||||
thread_zone = uma_zcreate("THREAD", sizeof (struct thread),
|
||||
thread_ctor, thread_dtor, thread_init, thread_fini,
|
||||
UMA_ALIGN_CACHE, 0);
|
||||
#else
|
||||
/*
|
||||
* XXX the ia64 kstack allocator is really lame and is at the mercy
|
||||
* of contigmallloc(). This hackery is to pre-construct a whole
|
||||
* pile of thread structures with associated kernel stacks early
|
||||
* in the system startup while contigmalloc() still works. Once we
|
||||
* have them, keep them. Sigh.
|
||||
*/
|
||||
thread_zone = uma_zcreate("THREAD", sizeof (struct thread),
|
||||
thread_ctor, thread_dtor, thread_init, thread_fini,
|
||||
UMA_ALIGN_CACHE, UMA_ZONE_NOFREE);
|
||||
uma_prealloc(thread_zone, 512); /* XXX arbitary */
|
||||
#endif
|
||||
ksegrp_zone = uma_zcreate("KSEGRP", sizeof (struct ksegrp),
|
||||
NULL, NULL, NULL, NULL,
|
||||
UMA_ALIGN_CACHE, 0);
|
||||
|
@ -216,9 +216,23 @@ void
|
||||
threadinit(void)
|
||||
{
|
||||
|
||||
#ifndef __ia64__
|
||||
thread_zone = uma_zcreate("THREAD", sizeof (struct thread),
|
||||
thread_ctor, thread_dtor, thread_init, thread_fini,
|
||||
UMA_ALIGN_CACHE, 0);
|
||||
#else
|
||||
/*
|
||||
* XXX the ia64 kstack allocator is really lame and is at the mercy
|
||||
* of contigmallloc(). This hackery is to pre-construct a whole
|
||||
* pile of thread structures with associated kernel stacks early
|
||||
* in the system startup while contigmalloc() still works. Once we
|
||||
* have them, keep them. Sigh.
|
||||
*/
|
||||
thread_zone = uma_zcreate("THREAD", sizeof (struct thread),
|
||||
thread_ctor, thread_dtor, thread_init, thread_fini,
|
||||
UMA_ALIGN_CACHE, UMA_ZONE_NOFREE);
|
||||
uma_prealloc(thread_zone, 512); /* XXX arbitary */
|
||||
#endif
|
||||
ksegrp_zone = uma_zcreate("KSEGRP", sizeof (struct ksegrp),
|
||||
NULL, NULL, NULL, NULL,
|
||||
UMA_ALIGN_CACHE, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user