Skip to content

cheri_revoke() is too disruptive #2530

@markjdb

Description

@markjdb

To scan threads' register files, we use thread_single(SINGLE_BOUNDARY), which has the side effect of interrupting system calls like nanosleep(). This breaks some applications, e.g., will-it-scale, which in some mode will have a bunch of threads executing some work loop while another thread prints a status message once a second. cheri_revoke() interrupts this sleep(1) and effectively makes the program useless.

thread_single() is simple but it's a heavy hammer. I propose the following instead: for each thread in the proc,

  • if the thread is off-CPU, lock the thread and revoke its register file then and there,
  • otherwise schedule an AST which causes each thread to revoke its own register file, then decrement a counter and wake up the cheri_revoke() caller once finished
  • sleep waiting for ASTs to drain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions