Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 1999 15:40:41 -0500 (EST)
From:      Brian Feldman <green@unixhelp.org>
To:        Marcel Moolenaar <marcel@scc.nl>
Cc:        Mike Smith <mike@smith.net.au>, freebsd-emulation@FreeBSD.ORG
Subject:   Re: sendmsg() not working?!
Message-ID:  <Pine.BSF.4.05.9901121537540.2373-100000@janus.syracuse.net>
In-Reply-To: <369A6CDA.8A6D114B@scc.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 11 Jan 1999, Marcel Moolenaar wrote:

> Mike Smith wrote:
> > >
> > > The patch Brian posted does do the job, but, IMHO, is not a good basis for
> > > further finetuning of the sendmsg and recvmsg syscalls. Especially the
> > > copyout bothers me. Is it worth reimplementing sendmsg and recvmsg or is
> > > everybody happy with the patch?
> > > > That depends on how you describe "reimplementing".  You might want to
> > shim the generic implementations to make them more friendly to the
> > Linux layer, but I would not think that reimplementing the bulk of the
> > syscall in the Linux emulator would be a wise idea.
> 
> If sendit and recvit in /sys/kern/uipc_syscalls.c would be public, than we
> could create a linux_sendmsg and linux_recvmsg based on sendmsg and recvmsg
> and have it call sendit and recvit directly.
> 
> To eliminate the copyout and also to prevent a copyin of the, possibly large,
> control message (ancillary data) it would be benificial to seperate the cmsg
> header from the cmsg data in the lower layers (at least for sending).
> 
> The only thing that's against such a modification is the impact on the
> existing code. I'm willing to make the modifications, only if there is a
> change that such a change would be accepted in the first place.
> 
> marcel
> 

What Linux syscalls aren't working properly (socket calls, of course)? This
is the only one I've _ever_ run across. And I hardly think a 4-byte-copyin,
then a conditional 4-byte-more copyin, and then conditionally again a 4-byte
copyout is substantial overhead! You know of course that system call arguments
are faulted in from the user stack on int 0x80, so it doesn't change the
system call time that much (read: substantially at all) to have a couple more.

 Brian Feldman					  _ __  ___ ___ ___  
 green@unixhelp.org			      _ __ ___ | _ ) __|   \ 
	     http://www.freebsd.org/	 _ __ ___ ____ | _ \__ \ |) |
 FreeBSD: The Power to Serve!	   _ __ ___ ____ _____ |___/___/___/ 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901121537540.2373-100000>