Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 11:46:35 -0800
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Boris Astardzhiev <boris.astardzhiev@gmail.com>, Mark Delany <c2h@romeo.emu.st>,  "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: Does FreeBSD have sendmmsg or recvmmsg system calls?
Message-ID:  <CA%2BhQ2%2Bj9kVHqrNWCFPnMpfEATKXzWjMFsy45waWddU%2BH4F6pTQ@mail.gmail.com>
In-Reply-To: <20160107192840.GF3625@kib.kiev.ua>
References:  <20160104091108.50654.qmail@f5-external.bushwire.net> <20160104093859.GV3625@kib.kiev.ua> <20160104101747.58347.qmail@f5-external.bushwire.net> <20160104194044.GD3625@kib.kiev.ua> <20160104210741.32812.qmail@f5-external.bushwire.net> <CAP=KkTwfpjec2Tgnm4PRR3u8t4GEqN9Febm5HRcqapifBG-B6g@mail.gmail.com> <CA%2BhQ2%2Bh4NNz9tgSpjJdv7fXteq5tAR7o3LvjV=u08NHjRLPwmA@mail.gmail.com> <CAP=KkTzFUDsZwDDLD3n97xJW0qLVZMPduZGSX%2BeXC3UuLpVjMg@mail.gmail.com> <20160107161213.GZ3625@kib.kiev.ua> <CA%2BhQ2%2Bg6OB3MmZrW5hzNSnkcqKaKf1XGDraHfWXtSrowxKuL5g@mail.gmail.com> <20160107192840.GF3625@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 7, 2016 at 11:28 AM, Konstantin Belousov
<kostikbel@gmail.com> wrote:
> On Thu, Jan 07, 2016 at 10:31:13AM -0800, Luigi Rizzo wrote:
>> While it was good to have the first patch as a reminder of what needs to be done
>> (noticeably, discuss the various pieces to be modified and how to deal
>> with errors and the comments about DoS and malloc), I think that at
>> the moment it is premature to implement either the library functions
>> or the syscalls.
>>
>> What we need first is experimental data that shows a performance benefit
>> compared to looping around the single-packet syscall. Then we can decide
>> how to proceed.
> This is about performance.
>
>>
>> Implementing the library function now is relatively pointless: its only use
>> would be to compile some software that requires *mmsg() , and we can address
>> that with a custom patch for the application (which almost surely would
>> need to work around another ton of linux-specific functions).
> And this is about compatibility.  I agree with the statement above about
> the work with the performance motivation, but I do not agree that we should
> not ensure compatibility because there is more to do.  We have willing
> contributor, who learns, and who is on track to provide a usable
> implementation for the compat shims, be it in userspace or kernel (I do
> prefer userspace implementation).
>
> I do not understand you point that we can patch application.  IMO it
> is not a useful or scalable approach to handle changing app expectations
> from the base platform.

The libc API obviously needs to be conforming to the existing
sendmmsg/recvmmsg. I thought your point was that the underlying
syscall might possibly need a different set of parameters, so we could
as well experiment a bit to see what is needed before freezing it.

Regarding patching the application(s): of course it is not scalable
if there are many applications that will refuse to compile if
the *mmsg() functions are absent. However I expect this set of
application to be minuscule if not empty, and if they exist they
are probably plagued by other portability issues.

So (and using *mmsg() vs *msg() is about performance) I think that
until we have an underlying performant implementation of the *mmsg()
calls, there is no urgency in implementing the libc functions,
because we might later have to change then libc->syscall wrapper
anyways.

cheers
luigi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2Bj9kVHqrNWCFPnMpfEATKXzWjMFsy45waWddU%2BH4F6pTQ>