linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: JoonSoo Kim <js1304@gmail.com>
Cc: David Rientjes <rientjes@google.com>,
	Andi Kleen <andi@firstfloor.org>,
	Ezequiel Garcia <elezegarcia@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, Tim Bird <tim.bird@am.sony.com>,
	celinux-dev@lists.celinuxforum.org
Subject: Re: [Q] Default SLAB allocator
Date: Fri, 19 Oct 2012 09:01:03 +0200	[thread overview]
Message-ID: <1350630063.2293.177.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAAmzW4N1rAQLOE3QmeeTfsNH-7v-9RD8wT990RbZtYon3YfrLA@mail.gmail.com>

On Fri, 2012-10-19 at 09:03 +0900, JoonSoo Kim wrote:
> Hello, Eric.
> Thank you very much for a kind comment about my question.
> I have one more question related to network subsystem.
> Please let me know what I misunderstand.
> 
> 2012/10/14 Eric Dumazet <eric.dumazet@gmail.com>:
> > In latest kernels, skb->head no longer use kmalloc()/kfree(), so SLAB vs
> > SLUB is less a concern for network loads.
> >
> > In 3.7, (commit 69b08f62e17) we use fragments of order-3 pages to
> > populate skb->head.
> 
> You mentioned that in latest kernel skb->head no longer use kmalloc()/kfree().

I hadnt the time to fully explain what was going on, only to give some
general ideas/hints.

Only incoming skbs, delivered by NIC are built this way.

I plan to extend this to some kind of frames, for example TCP ACK.
(They have a short life, so using __netdev_alloc_frag makes sense)

But when an application does a tcp_sendmsg() we use GFP_KERNEL
allocations and thus still use kmalloc().

> But, why result of David's "netperf RR" test on v3.6 is differentiated
> by choosing the allocator?

Because outgoing skb are still using a kmalloc() for their skb->head

RR sends one frame, receives one frame for each transaction.

So with 3.5, each RR transaction using a NIC needs 3 kmalloc() instead
of 4 for previous kernels.

Note that loopback traffic is different, since we do 2 kmalloc() per
transaction, and there is no difference on 3.5 for this kind of network
load.

> As far as I know, __netdev_alloc_frag may be introduced in v3.5, so
> I'm just confused.
> Does this test use __netdev_alloc_skb with "__GFP_WAIT | GFP_DMA"?
> 
> Does normal workload for network use __netdev_alloc_skb with
> "__GFP_WAIT | GFP_DMA"?
> 

Not especially.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-10-19  7:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 14:19 Ezequiel Garcia
2012-10-11 22:42 ` Andi Kleen
2012-10-11 22:59   ` David Rientjes
2012-10-11 23:10     ` Andi Kleen
2012-10-12 12:07       ` Ezequiel Garcia
2012-10-13  9:54         ` David Rientjes
2012-10-13 12:44           ` Ezequiel Garcia
2012-10-16  0:46             ` David Rientjes
2012-10-16 12:35               ` Ezequiel Garcia
2012-10-16 12:56                 ` Eric Dumazet
2012-10-16 18:07                   ` Tim Bird
2012-10-16 18:27                     ` Ezequiel Garcia
2012-10-16 18:44                       ` Tim Bird
2012-10-16 18:49                         ` Ezequiel Garcia
2012-10-16 19:16                       ` Eric Dumazet
2012-10-17 18:45                         ` Tim Bird
2012-10-17 19:13                           ` Eric Dumazet
2012-10-17 19:20                             ` Shentino
2012-10-17 20:33                               ` Tim Bird
2012-10-18  0:46                                 ` Shentino
2012-10-17 20:58                             ` Tim Bird
2012-10-17 21:05                               ` Ezequiel Garcia
2012-10-16 18:36                     ` Ezequiel Garcia
2012-10-16 18:54                       ` Christoph Lameter
2012-10-13  9:51       ` David Rientjes
2012-10-13 15:10         ` Eric Dumazet
2012-10-16  1:28           ` JoonSoo Kim
2012-10-16  7:23             ` Eric Dumazet
2012-10-19  0:03           ` JoonSoo Kim
2012-10-19  7:01             ` Eric Dumazet [this message]
2012-10-16  0:45         ` David Rientjes
2012-10-16 18:53           ` Christoph Lameter
2012-10-16 19:02 ` Christoph Lameter

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=1350630063.2293.177.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=celinux-dev@lists.celinuxforum.org \
    --cc=elezegarcia@gmail.com \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=tim.bird@am.sony.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox