All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: David Miller <davem@davemloft.net>
Cc: yang.shi@windriver.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Improvev netconsole support for RTL8139 NIC driver
Date: Tue, 25 Mar 2008 23:39:27 -0400	[thread overview]
Message-ID: <47E9C56F.2070508@pobox.com> (raw)
In-Reply-To: <20080325.203043.196469543.davem@davemloft.net>

David Miller wrote:
> From: Jeff Garzik <jgarzik@pobox.com>
> Date: Tue, 25 Mar 2008 23:14:03 -0400
> 
>> David Miller wrote:
>>> From: Jeff Garzik <jgarzik@pobox.com>
>>> Date: Tue, 25 Mar 2008 22:23:24 -0400
>>>
>>>> This is bogus -- you should never need to slow down the hot path in such 
>>>> a way.
>>> Slow down in what way?  Even on x86 saving the flags is just
>>> about as expensive as a plain sti/cli.
>> Replacing spin_lock() [current 8139too.c] with spin_lock_irqsave() 
>> results in a larger interrupt handler... more CPU instructions for the 
>> same result.
> 
> Jeff, please be realistic.
> 
> These interrupt handlers about to do a PIO on a status register, which
> will consume on the order of a few hundred cpu cycles.
> 
> Counting an I-cache line or two, or 18 cycles here or there,
> is immaterial by comparison.

I am being realistic...  it's

* not needed
* increases code size
* increases number of CPU instructions executed
* not needed

Thus applying this consistency rule across N drivers needlessly 
increases the code size of N drivers.

Mainly I see such a change as a violation of a basic Linux principle: 
do what you must, and no more.

	Jeff




  reply	other threads:[~2008-03-26  3:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26  2:12 [PATCH] Improvev netconsole support for RTL8139 NIC driver yshi
2008-03-26  2:23 ` Jeff Garzik
2008-03-26  2:38   ` yshi
2008-03-26  2:42   ` David Miller
2008-03-26  2:52     ` yshi
2008-03-26  3:14       ` Jeff Garzik
2008-03-26  3:14     ` Jeff Garzik
2008-03-26  3:30       ` David Miller
2008-03-26  3:39         ` Jeff Garzik [this message]
2008-03-26  3:48           ` Jeff Garzik
2008-03-26  3:53             ` David Miller
2008-03-26  4:32               ` Jeff Garzik

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=47E9C56F.2070508@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yang.shi@windriver.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.