Skip to content

Commit a0a66fb

Browse files
d-nettovchuravy
andauthored
implement concurrent sweeping (JuliaLang/julia#48969)
Implements concurrent sweeping of fully empty pages. Concurrent sweeping is disabled by default and may be enabled through the --gcthreads flag. Co-authored-by: Valentin Churavy <v.churavy@gmail.com>
1 parent b594243 commit a0a66fb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/cluster.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,14 @@ function get_threads_spec(opts)
13311331
end
13321332
end
13331333

1334+
function get_gcthreads_spec(opts)
1335+
if opts.nmarkthreads > 0 || opts.nsweepthreads > 0
1336+
`--gcthreads=$(opts.nmarkthreads),$(opts.nsweepthreads)`
1337+
else
1338+
``
1339+
end
1340+
end
1341+
13341342
# Starts workers specified by (-n|--procs) and --machine-file command line options
13351343
function process_opts(opts)
13361344
# startup worker.
@@ -1346,7 +1354,8 @@ function process_opts(opts)
13461354

13471355
# Propagate --threads to workers
13481356
threads = get_threads_spec(opts)
1349-
gcthreads = opts.ngcthreads > 0 ? `--gcthreads=$(opts.ngcthreads)` : ``
1357+
# Propagate --gcthreads to workers
1358+
gcthreads = get_gcthreads_spec(opts)
13501359

13511360
exeflags = `$threads $gcthreads`
13521361

0 commit comments

Comments
 (0)