From owner-freebsd-emulation Tue Jan 12 12:41:32 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA08505 for freebsd-emulation-outgoing; Tue, 12 Jan 1999 12:41:32 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA08494 for ; Tue, 12 Jan 1999 12:41:30 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id PAA02641; Tue, 12 Jan 1999 15:40:41 -0500 (EST) Date: Tue, 12 Jan 1999 15:40:41 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Marcel Moolenaar cc: Mike Smith , freebsd-emulation@FreeBSD.ORG Subject: Re: sendmsg() not working?! In-Reply-To: <369A6CDA.8A6D114B@scc.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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