Re: add closefrom() call

看板FB_hackers作者時間18年前 (2007/07/24 10:55), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串18/26 (看更多)
We added it basically because doing all the junk described in previous postings in this thread in userland is a ridiculously huge eyesore that doesn't scale and doesn't make sense when 5 minutes of programming nets you a shiny new system call which does it all for you. If you are worried about optimizing it (which kinda implies a system call anyhow since you aren't doing a context switch for each descriptor), worry about optimizing the kernel implementation of the system call rather then optimizing the unoptimizable userland that eats 300ns+ per descriptor to do the close() instead of the 10ns/descriptor that it takes the kernel to do the close(). -Matt _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #16fMeI00 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #16fMeI00 (FB_hackers)