All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: brouer@redhat.com, Alexander Duyck <alexander.duyck@gmail.com>,
	Alexei Starovoitov <ast@plumgrid.com>,
	Eric Dumazet <edumazet@google.com>,
	Network Development <netdev@vger.kernel.org>,
	Christoph Lameter <cl@linux.com>
Subject: Re: irq disable in __netdev_alloc_frag() ?
Date: Mon, 27 Oct 2014 21:35:23 +0100	[thread overview]
Message-ID: <20141027213523.799da09c@redhat.com> (raw)
In-Reply-To: <1414036276.2094.18.camel@edumazet-glaptop2.roam.corp.google.com>

On Wed, 22 Oct 2014 20:51:16 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> On my hosts, this hard irq masking is pure noise.

On my hosts I can measure a significant difference between using
local_irq_disable() vs. local_irq_save(flags)

 *  2.860 ns cost for local_irq_{disable,enable} 
 * 14.840 ns cost for local_irq_save()+local_irq_restore() 

This is quite significant in my nanosec world ;-)

 
> What CPU are you using Alexander ?

I'm using a E5-2695 (Ivy-bridge)

You can easily reproduce my results on your own system with my
time_bench_sample module here:
 https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/lib/time_bench_sample.c#L173

> Same could be done with some kmem_cache_alloc() : SLAB uses hard irq
> masking while some caches are never used from hard irq context.

Sounds interesting.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

  parent reply	other threads:[~2014-10-27 20:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23  0:15 irq disable in __netdev_alloc_frag() ? Alexei Starovoitov
2014-10-23  1:52 ` Eric Dumazet
2014-10-23  2:22   ` Alexei Starovoitov
2014-10-23  3:48     ` Eric Dumazet
2014-10-23  3:19   ` Alexander Duyck
2014-10-23  3:51     ` Eric Dumazet
2014-10-23  3:56       ` Eric Dumazet
2014-10-23  4:29         ` Alexei Starovoitov
2014-10-23  5:14           ` Eric Dumazet
2014-10-23  6:12             ` Alexei Starovoitov
2014-10-27 20:35       ` Jesper Dangaard Brouer [this message]
2014-10-28  2:30         ` Christoph Lameter
2014-10-28  2:46           ` Eric Dumazet
2014-10-28  4:56             ` David Miller
2014-10-28 19:46             ` 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=20141027213523.799da09c@redhat.com \
    --to=brouer@redhat.com \
    --cc=alexander.duyck@gmail.com \
    --cc=ast@plumgrid.com \
    --cc=cl@linux.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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.