Improving fget() performance
Improving fget() performance
Posted May 7, 2019 6:40 UTC (Tue) by smurf (subscriber, #17840)In reply to: Improving fget() performance by djwatson24
Parent article: Improving fget() performance
I'd suggest that the only tasks where sequential allocation matters is when you close fd 0…2 right before dup()ing, and even that is highly unreliable in a threaded environment (thread 1 closes stdout, thread 2 calls accept(), thread 1 dup()s … oops – should have used dup2() …).
Thus, sequential allocation doesn't need a flag or its absence, it only needs to check that the refcount of the fd table is ==1.
