All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "nhorman@tuxdriver.com" <nhorman@tuxdriver.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jpirko@redhat.com
Subject: Re: [PATCH] Enhance AF_PACKET implementation to not require high order contiguous memory allocation
Date: Tue, 26 Oct 2010 00:30:56 +0200	[thread overview]
Message-ID: <1288045856.3296.19.camel@edumazet-laptop> (raw)
In-Reply-To: <E1PAVIx-0001qL-EB@smtp.tuxdriver.com>

Le lundi 25 octobre 2010 à 18:14 -0400, nhorman@tuxdriver.com a écrit :
> I think I remember those changes and IIrc yes,  tcpdump will make
> several attempts to get buffers of an appropriate size.  But while it
> tries to do that it bogs the system trying to write out pagecahe,
> swap, etc.  And that activity doesn't guarantee success.  His does
> either, but getting 5 order 0 pages is far easier and less intrusive
> to a loaded system than trying to get 1 order 4 chunk.  That's all I'm
> trying to accomplish here.  Just making it easier to use af_packet
> sockets without interfering with system performance
> 

Actually, using vmalloc() would probably hurt performance, because of
extra TLB pressure.

Of course, on recent x86 hardware you dont notice that much...

If not, why af_packet would use such convoluted double array of
'compound pages' ?

Also, on x86_32, vmalloc()/vmap() space is small (128 MB) so you might
exhaust it pretty fast with several sniffers running.

I would try a two level thing : Try to get high order pages, and
fallback on low order pages, but normally libpcap does this for us ?




       reply	other threads:[~2010-10-25 22:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1PAVIx-0001qL-EB@smtp.tuxdriver.com>
2010-10-25 22:30 ` Eric Dumazet [this message]
2010-10-25 23:35   ` [PATCH] Enhance AF_PACKET implementation to not require high order contiguous memory allocation Neil Horman
2010-10-25 23:46     ` David Miller
2010-10-26  0:48       ` Maciej Żenczykowski
2010-10-26  1:53         ` Neil Horman
2010-10-26  1:58       ` Neil Horman
2010-10-25 19:06 nhorman
2010-10-25 20:17 ` Francois Romieu
2010-10-25 20:38 ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288045856.3296.19.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jpirko@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.