看板 DFBSD_bugs 關於我們 聯絡資訊
:Ouch. Yeah, we would have to iterate over the filedesc structures and :multiply the reference count there with f_count of the file. But we :can't do that easily and have to iterate over the processes instead. :Which means a multi-threaded webserver kills the *stat performance :just for the counting. : :Joerg If you want you can clean it up some more... instead of having it iterate through fd_nfiles in the NULL case you could simply do count += fdo->fd_nfiles, but if you do that make sure fd_nfiles is some reasonable value (< 500), otherwise sparse descriptor sets may balloon the number too high. -Matt Matthew Dillon <dillon@backplane.com>