Skip to content

MAX_THREADS > 16 #830

Open
rurban opened this Issue Sep 15, 2012 · 3 comments

2 participants

@rurban
Parrot Virtual Machine member
rurban commented Sep 15, 2012

In the threads branch there is a hardcoded number MAX_THREADS 8, now 16.

I added support to determine the number of cpus at runtime in Parrot_get_num_cpus()
This is a better default.

But users might want to try more.

So let's add a Configure option --maxthreads which sets MAX_THREADS,
and a parrot cmdline option --numthreads which overrides Parrot_get_num_cpus().

For embed and languages this should be exported via API also:
Parrot_set_num_threads(INTVAL)

@rurban rurban was assigned Sep 15, 2012
@rurban rurban added a commit that referenced this issue Sep 16, 2012
@rurban rurban [GH #830] Implement platform Parrot_get_num_cpus
Parrot_get_num_cpus is the new default instead of MAX_THREADS. Initialized at startup
fba6c79
@rurban rurban added a commit that referenced this issue Sep 16, 2012
@rurban rurban [GH #830] Add Parrot_set_num_threads and --numthreads cmdline
The new parrot cmdline option --numthreads overrides Parrot_get_num_cpus().
Parrot_set_num_threads is called by Parrot_interp_initialize_interpreter()
b6c1cda
@rurban
Parrot Virtual Machine member
rurban commented Sep 16, 2012

Left over is a parrot cmdline test

@rurban
Parrot Virtual Machine member
rurban commented Sep 16, 2012

Implemented. Left over is a --maxthreads configure option.

But I think I have a better idea, I'll work on in a rurban/threads_array_heap branch.
Do not use a static threads_array, malloc it on the heap. This way we can easily
test 4000 threads FWIW.

@leto
Parrot Virtual Machine member
leto commented Mar 25, 2013

@rurban are you still wanting a --maxthreads configure option? @jkeenan might be interested to work on that ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.