Skip to contentSkip to conversation

dead code in io_file_put()

DISCUSSION Al Viro 2 participants 2 messages Apr 13, 2019 VFS

lore
Share & tools
lore

Al Viro

author maintainer
#0 lore raw

It's never called with NULL first argument anymore.
Is there any reason to keep that check (and the second argument, never used when state != NULL) there?

Frankly, I wonder if there is any point in that
fget_many()/fput_many() stuff. Does the benefit from that really show up in any profiles?

#1 lore raw
Quoted 3 lines · Al Viro

It's never called with NULL first argument anymore.
Is there any reason to keep that check (and the second argument, never used when state != NULL) there?

Good catch, looks like that part can go now.

Quoted 3 lines

Frankly, I wonder if there is any point in that
fget_many()/fput_many() stuff. Does the benefit from that really show up in any profiles?

It certainly made a difference for higher IOPS workloads. Of course we have the file registration now to negate that, but since we're using the state anyway for iocb allocation, it'd be a shame to drop the file ref cost amortization for the non-registered case.

Signature · 1 line
Jens Axboe