On 12/20/12 4:20 AM, Otto Moerbeek wrote:
> On Thu, Dec 20, 2012 at 04:06:52AM -0500, Jean-Philippe Ouellet wrote:
> 
>> On 12/20/12 3:53 AM, Jean-Philippe Ouellet wrote:
>>> and madvise() them to not be swapped out?
>>
>> Oops, I think I might have misinterpreted the meaning of MADV_WILLNEED.
>> I think I meant mlock().
> 
> Why trying to be smarter than the kernel? Mlocking pages will kill you
> if there's memory shortage.
> 
> The kernel will try to keep much used pages in mem anyway.
> 
>       -Otto
> 

Okay, yeah. That's a terrible idea. But still, the question of direct
file-to-socket sending vs. keeping copies in my address space and
write()ing those to the socket still remains.

Normally I would just write both and profile them, but I can't figure
out how to do the first on OpenBSD.

Reply via email to