netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: haavard.skinnemoen@atmel.com
Cc: thomas.petazzoni@free-electrons.com, netdev@vger.kernel.org,
	michael@free-electrons.com
Subject: Re: [PATCH] macb: Add support of the netpoll API
Date: Fri, 17 Apr 2009 04:39:45 -0700 (PDT)	[thread overview]
Message-ID: <20090417.043945.67766586.davem@davemloft.net> (raw)
In-Reply-To: <20090417.034416.110856368.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Fri, 17 Apr 2009 03:44:16 -0700 (PDT)

> From: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
> Date: Fri, 17 Apr 2009 11:50:11 +0200
> 
>> David Miller wrote:
>>> From: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
>>> Date: Fri, 17 Apr 2009 11:25:53 +0200
>>> 
>>> > I guess you're right -- we just have to be careful about calling
>>> > printk() from within the driver. But it seems a lot easier to just drop
>>> > the lock before dumping an error message than it is to work around that
>>> > disable_irq() deadlock. And if you're running with verbose debugging
>>> > enabled, you probably shouldn't be using netconsole anyway.  
>>> 
>>> Therefore, do you agree to add Thomas's patch as-is?
>> 
>> No, therefore, I'd prefer local_irq_save() :-)
> 
> I'm pretty sure there is a specific reason driver's use
> disable_irq() rather than disabling local cpu IRQs.
> 
> I just can't remember it at the moment.
> 
> And there absolutely must be a reason, because disable_irq()
> is a lot more expensive.

Ok, after doing some research, the reason seems to be that
drivers which have lockless IRQ handlers have to do things
this way to guarentee other cpus are not inside of the
interrupt handler.

Since we are using a lock here, local_irq_save(), or disabling
IRQs in the ethernet chip itself, should work fine.

So I'm OK with the local_irq_save() idea, someone please post
the patch.

  reply	other threads:[~2009-04-17 11:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-15 13:46 [PATCH] macb: Add support of the netpoll API Thomas Petazzoni
2009-04-16  9:07 ` Haavard Skinnemoen
2009-04-16  9:24   ` Thomas Petazzoni
2009-04-16 10:31     ` Haavard Skinnemoen
2009-04-17  8:34     ` David Miller
2009-04-17  9:07       ` Haavard Skinnemoen
2009-04-17  9:08         ` David Miller
2009-04-17  9:25           ` Haavard Skinnemoen
2009-04-17  9:33             ` David Miller
2009-04-17  9:50               ` Haavard Skinnemoen
2009-04-17 10:44                 ` David Miller
2009-04-17 11:39                   ` David Miller [this message]
2009-04-20 10:57                     ` Haavard Skinnemoen
2009-04-21  8:54                       ` David Miller
2009-05-04 11:54                         ` [PATCH v3] " Haavard Skinnemoen
2009-05-04 18:08                           ` David Miller
2009-04-17 11:41                   ` [PATCH] " Haavard Skinnemoen

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=20090417.043945.67766586.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=michael@free-electrons.com \
    --cc=netdev@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.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;
as well as URLs for NNTP newsgroup(s).