|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: iSCSI read/write cost difference> > I think the UNH iSCSI implementation dosen't set TCP_NODELAY on the > > connection sockets, which can lead to strange performance > characteristics > > like this. See the man pages for "setsockopt" and "tcp". > You can find an > > example of setting TCP_NODELAY in the linux-iscsi drivers at > > http://sourceforge.net/projects/linux-iscsi. Just download > the source and > > grep for TCP_NODELAY. > yes, it doesn't set the TCP_NODELAY. I read the linux-iscsi > code and try to > add this sock->ops->setsockopt() in UNH code. But it always > return EFAULT > indicating a bad address. but i use a similar way to define > arg = 1 as a > local variable. i am not sure why i am wrong. and i check the > inet_set_sockopt and tcp_setsock_opt, nowhere return a EFAULT. > > can some one figure it out? thx. For calling setsockopt() from kernel code, try something like this: #include <asm/uaccess.h> int arg = 1; mm_segment_t oldfs; oldfs = get_fs(); set_fs(get_ds()); if (sock->ops->setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *) &arg, sizeof(arg)) < 0) { /* handle error */ } set_fs(oldfs); Anthony J. Battersby Cybernetics
Home Last updated: Fri Apr 18 13:19:32 2003 12532 messages in chronological order |