This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add command-line flag to set background indexing thread priority.
ClosedPublic

Authored by sammccall on May 16 2022, 2:16 AM.

Details

Summary

This is a followup to D124715, which changed the default, and it anticipates
future patches raising the priority of Low (which is currently equal to
Background on Windows & Linux).
The main point is to allow users to restore the old behavior, which e.g.
allows efficiency cores to remain idle.

I did consider making this a config setting, this is a more complicated change:

  • needs to touch queue priorities as well as thread priorities
  • we don't know the priority until evaluating the config inside the task
  • users would want the ability to prioritize background indexing tasks relative to each other without necessarily affecting thread priority, so using one option for both may be confusing

I don't really have a use case, so I prefer the simpler thing.

Diff Detail

Event Timeline

sammccall created this revision.May 16 2022, 2:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2022, 2:16 AM
sammccall requested review of this revision.May 16 2022, 2:16 AM
kadircet accepted this revision.May 16 2022, 2:53 AM

thanks, LGTM. i agree that having this as a config to let users prioritise some sources over others could be useful, but it's too intrusive and unclear how useful that would be in practice (i don't think people would care to write a separate config for those)

This revision is now accepted and ready to land.May 16 2022, 2:53 AM