lkml.org 
[lkml]   [2005]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectYet another I/O modeling
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.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.578 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site