On 2/12/21 1:15 PM, Linus Torvalds wrote: > On Fri, Feb 12, 2021 at 12:10 PM Jens Axboe <axboe@xxxxxxxxx> wrote: >> >> Right, it's exactly the AF_UNIX dgram case. Working on adding some checks >> that means we'll catch this sort of thing upfront while testing. > > You might also just add a comment to the IORING_OP_{SEND,RECV}MSG > cases to the work-flags. > > It doesn't hurt to just mention those kinds of things explicitly. > > Because maybe somebody decides that IO_WQ_WORK_FS is very expensive > for their workload. With the comment they might then be able to say > "let's set it only for the AF_UNIX case" or some similar optimization. > > Yeah, it probably doesn't matter, but just as a policy, I think "we > got this wrong, so let's clarify" is a good idea. I'll start with the comment, that's certainly the easiest part and will help catch changes like that in the future. My other idea was to add a check in path resolution that catches it, for future safe guards outside of send/recvmsg. That's obviously a separate change from the comment, but would be nice to have. -- Jens Axboe