linuxlinux-kernel

Is arch_free_page an atomic operation?


Can a mutex be placed in the arch_free_page function, or is this function required to be fully reentrant for all processors?


Solution

  • No, the arch_free_page function can be called from an atomic context (such as an interrupt). It is not possible to place a mutex in this function as it is required to not block or wait.

    The function must be written to support freeing the page atomically.