[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] m_getfld
From: |
Paul Vixie |
Subject: |
Re: [Nmh-workers] m_getfld |
Date: |
Tue, 11 Dec 2012 04:47:29 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 2012-12-11 4:32 AM, Ken Hornstein wrote:
> Also ... maybe I'm just showing my age, but I always felt that mmap()
> should be reserved for special-purpose uses, and this ain't one of them
> (IMHO).
there's no way to avoid string copy overhead if you use read(), unless
you're on a rare kernel that will see a page aligned page sized buffer
passed to it and do page flipping from the buffer cache. i love the fact
that freebsd "cp" uses mmap when it can. looks like "ar", "cmp", and
"tail" also do this. fun!
but m_getfld isn't reading mail bodies, just headers. they fit in one
page on almost all modern machines and all mail messages. i'd say
there's no advantage to mmap if it's only saving us a 4K string copy
from kernel to user mode. stdio doesn't prefetch all that much.
paul
- Re: [Nmh-workers] m_getfld, (continued)
Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
Re: [Nmh-workers] m_getfld, David Levine, 2012/12/10
- Re: [Nmh-workers] m_getfld, Lyndon Nerenberg, 2012/12/10
- Re: [Nmh-workers] m_getfld, Ken Hornstein, 2012/12/10
- Re: [Nmh-workers] m_getfld,
Paul Vixie <=
- Re: [Nmh-workers] m_getfld, Jon Steinhart, 2012/12/10
- Re: [Nmh-workers] m_getfld, Ken Hornstein, 2012/12/10
- Re: [Nmh-workers] m_getfld, Valdis . Kletnieks, 2012/12/14
- Re: [Nmh-workers] m_getfld, Paul Vixie, 2012/12/14
Re: [Nmh-workers] m_getfld, Paul Vixie, 2012/12/10
Re: [Nmh-workers] m_getfld, Ken Hornstein, 2012/12/10
Re: [Nmh-workers] m_getfld, Ralph Corderoy, 2012/12/11