Skip to content

reviewer: limit max concurrency semaphore - #359

Open
mchehab wants to merge 1 commit into
sashiko-dev:mainfrom
mchehab:max_concurrency
Open

reviewer: limit max concurrency semaphore#359
mchehab wants to merge 1 commit into
sashiko-dev:mainfrom
mchehab:max_concurrency

Conversation

@mchehab

@mchehab mchehab commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The reviewer code works with two semaphores:

  • semaphore, which reflects what's there at concurrency;
  • llm_semaphore, which is initialized to have 3 times the value of concurrency.

This is based on an estimation that an active patch review consumes ~3 LLM slots.

Such model works when using cloud-based models, but when the models run locally, this must be aligned with the maximum queue size of the local engine.

Add an extra optional parameter to allow adjusting such limit.

The reviewer code works with two semaphores:
- semaphore, which reflects what's there at concurrency;
- llm_semaphore, which is initialized to have 3 times the
  value of concurrency.

This is based on an estimation that an active patch
review consumes ~3 LLM slots.

Such model works when using cloud-based models, but when
the models run locally, this must be aligned with the maximum
queue size of the local engine.

Add an extra optional parameter to allow adjusting such
limit.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
@mchehab

mchehab commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@derekbarbosa This is per your request at #338: even after having it merged, it still makes sense to be able to optionally limit llm_concurrency when concurrency > 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant