[PATCH] D59130: [llvm][Support] Provide interface to set thread priorities

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 09:50:58 PDT 2019


jfb added a comment.

In D59130#1424339 <https://reviews.llvm.org/D59130#1424339>, @kadircet wrote:

> In D59130#1422858 <https://reviews.llvm.org/D59130#1422858>, @jfb wrote:
>
> > None of these check the return value of the priority calls. What's expected if it fails?
>
>
> We can change it to return true on success and false on failure.
>
> > Do these actually give the same semantics? I'm worried that this will get used and on some platforms a thread might stop doing progress at all whereas on other platforms they'll still make progress. What's the intended use of this?
>
> These are the functions with closest semantics in those three platforms. It tries to lower thread's priority such that it only runs if there's no non-background task running.


That doesn't answer my question though: if someone sets priority and on the platform the test witness acceptable forward progress, will it happen that another platform provide no forward progress for the same work. For example, some implementations don't let a background thread perform any I/O. In such a case, a mere logging statement would halt the background thread's progress.

What threads does LLVM have that require background priority?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59130/new/

https://reviews.llvm.org/D59130





More information about the llvm-commits mailing list