Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2003 20:28:06 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Igor Sysoev <is@rambler-co.ru>
Cc:        arch@freebsd.org
Subject:   Re: sendfile(2) SF_NOPUSH flag proposal
Message-ID:  <20030527102806.GC44520@cirb503493.alcatel.com.au>
In-Reply-To: <Pine.BSF.4.21.0305271126470.46491-100000@is>
References:  <20030526201740.GA22178@cirb503493.alcatel.com.au> <Pine.BSF.4.21.0305271126470.46491-100000@is>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 27, 2003 at 11:57:20AM +0400, Igor Sysoev wrote:
>I thought about it more and I agree with you. TF_NOPUSH should be turned on
>at the start of a transaction and turned off at the end of a transaction.
>
>So I think there should be two flags:
>SF_NOPUSH - it turns TF_NOPUSH on before the sending. It's cheap:
>SF_PUSH - it turns TF_NOPUSH off after the sending has been completed.

I agree that the code appears trivial but in order to justify its
inclusion, you will need to demonstrate that there is some benefit to
FreeBSD to implement this code.  Good justification would be:

1) The same API is implemented somewhere else (or there is agreement
   between multiple groups to implement it).  I don't believe this
   functionality is implemented anywhere else and you've not provided
   any evidence that any other groups are considering such functionality.

2) The new feature provides significant performance benefit.   In this
   case, I believe the overhead of calling setsockopt(2) is negligible
   so the performance gain would be negligible.

3) The new feature provides novel functionality that cannot be
   achieved using the existing API (eg kqueue(2)).  The functionality
   is already available via setsockopt(2) so this isn't applicable.

At this stage, I would suggest that you need to do better than "the
change is cheap" to justify adding this feature.  Can you quantify
the performance benefits, or provide some other justification?

Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030527102806.GC44520>