mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Yet another I/O modeling
@ 2005-02-27 19:05 Neil
  2005-02-27 23:36 ` pmarques
  0 siblings, 1 reply; 2+ messages in thread
From: Neil @ 2005-02-27 19:05 UTC (permalink / raw)
  To: linux-kernel

hi,all
select/poll I/O modeling is fast,easy to use,it returns the number of fd 
which are acitvity,but you should scan the fd array to find which fd is 
ready,it costs a lot of time on a heavy load server.

I proposal another I/O modeling,named eselect.
struct eselect_struct{
    unsigned long readbitmap[MAXBITMAPFD];//suppose the MAXBITMAPFD is 
MAX OPEN                                         //FD NUMBER PER PROCESS
    int ret;//-1 on error,non-negative return value is the number of     
            //acitvity fds
}
we can use __set_bit(),__clear_bit(),__find_first_bit()....functions to 
maintain the bitmap.
So,you shouldnt scan the fd array any more.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-28  0:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-27 19:05 Yet another I/O modeling Neil
2005-02-27 23:36 ` pmarques

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®