Skip to content

Commit

Permalink
implement concurrent sweeping (#48969)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
d-netto and vchuravy authored Jun 28, 2023
1 parent b594243 commit a0a66fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,14 @@ function get_threads_spec(opts)
end
end

function get_gcthreads_spec(opts)
if opts.nmarkthreads > 0 || opts.nsweepthreads > 0
`--gcthreads=$(opts.nmarkthreads),$(opts.nsweepthreads)`
else
``
end
end

# Starts workers specified by (-n|--procs) and --machine-file command line options
function process_opts(opts)
# startup worker.
Expand All @@ -1346,7 +1354,8 @@ function process_opts(opts)

# Propagate --threads to workers
threads = get_threads_spec(opts)
gcthreads = opts.ngcthreads > 0 ? `--gcthreads=$(opts.ngcthreads)` : ``
# Propagate --gcthreads to workers
gcthreads = get_gcthreads_spec(opts)

exeflags = `$threads $gcthreads`

Expand Down

0 comments on commit a0a66fb

Please sign in to comment.