Skip to content

Comment in linux/io_uring.h regarding COOP_TASKRUN and TASKRUN_FLAG seems misleading? #1475

@AmkG

Description

@AmkG

Here: https://github.com/torvalds/linux/blob/fec734e8d564d55fb6bd4909ae2e68814d21d0a1/include/uapi/linux/io_uring.h#L189-L191

 #define IORING_SETUP_COOP_TASKRUN       (1U << 8)
 /*
  * If COOP_TASKRUN is set, get notified if task work is available for
  * running and a kernel transition would be needed to run it. This sets
  * IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.
  */
 #define IORING_SETUP_TASKRUN_FLAG       (1U << 9)

It seems the comment is talking about TASKRUN_FLAG, and it says "If COOP_TASKRUN..." followed by a long behavioral explanation, but then it ends with.... "Not valid with COOP_TASKRUN". Is the comment simply wrong? What is the point of setting TASKRUN_FLAG without COOP_TASKRUN?

Elsewhere, this comment seems to suggest that COOP_TASKRUN and TASKRUN_FLAG are valid to set together: #1105 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions