Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] DM9000: fix interface hang under load
From: Jeff Garzik @ 2007-08-25  4:40 UTC (permalink / raw)
  To: Florian Westphal; +Cc: akpm, netdev
In-Reply-To: <20070820233342.GG9315@Chamillionaire.breakpoint.cc>

Florian Westphal wrote:
> When transferring data at full speed, the DM9000 network interface
> sometimes stops sending/receiving data. Worse, ksoftirqd consumes
> 100% cpu and the net tx watchdog never triggers.
> Fix by spin_lock_irqsave() in dm9000_start_xmit() to prevent the
> interrupt handler from interfering.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  Actually the comments ('Disable all interrupts, iow(db, DM9000_IMR, IMR_PAR) etc)
>  give the impression that the interrupt handler cannot run during dm9000_start_xmit(),
>  however this isn't correct (perhaps the chipset has some weird timing issues?).
>  The interface lockup usually occurs between 30 and 360 seconds after starting transmitting
>  data (netcat /dev/zero) at full speed; with this patch applied I haven't been able
>  to reproduce hangs yet (ran for > 2h).
>  FTR: This is a dm9000 on XScale-PXA255 rev 6 (ARMv5TE)/Compulab CM-x255, i.e.
>  a module not supported by the vanilla kernel. Tested on (patched) 2.6.18.
> 
>  dm9000.c |   25 +++++++------------------
>  1 file changed, 7 insertions(+), 18 deletions(-)

applied



^ permalink raw reply

* Re: [PATCH] phy layer: fix genphy_setup_forced (don't reset)
From: Jeff Garzik @ 2007-08-25  4:40 UTC (permalink / raw)
  To: Domen Puncer; +Cc: netdev
In-Reply-To: <20070817065445.GH13994@moe.telargo.com>

Domen Puncer wrote:
> Writing BMCR_RESET bit will reset MII_BMCR to default values. This is
> clearly not what we want.
> 
> 
> Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
> 
> ---
>  drivers/net/phy/phy_device.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: work-powerpc.git/drivers/net/phy/phy_device.c
> ===================================================================
> --- work-powerpc.git.orig/drivers/net/phy/phy_device.c
> +++ work-powerpc.git/drivers/net/phy/phy_device.c
> @@ -364,7 +364,7 @@ EXPORT_SYMBOL(genphy_config_advert);
>   */
>  int genphy_setup_forced(struct phy_device *phydev)
>  {
> -	int ctl = BMCR_RESET;
> +	int ctl = 0;
>  
>  	phydev->pause = phydev->asym_pause = 0;

applied



^ permalink raw reply

* Re: [METH] Don't use GFP_DMA for zone allocation.
From: Jeff Garzik @ 2007-08-25  4:40 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Andrew Morton, netdev, linux-mips
In-Reply-To: <20070815115316.GB5862@linux-mips.org>

Ralf Baechle wrote:
> IP32 doesn't even have a ZONE_DMA so no point in using GFP_DMA in any
> IP32-specific device driver.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

applied



^ permalink raw reply

* Re: [PATCH] ucc_geth: kill unused include
From: Jeff Garzik @ 2007-08-25  4:37 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Paul Mackerras, netdev, linuxppc-dev, Li Yang
In-Reply-To: <Pine.LNX.4.64.0708222144440.6464@blarg.am.freescale.net>

Kumar Gala wrote:
> The ucc_geth_mii code is based on the gianfar_mii code that use to include
> ocp.h.  ucc never need this and it causes issues when we want to kill
> arch/ppc includes from arch/powerpc.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> 
> Jeff, if you issue with this for 2.6.23, I'd prefer to push this via
> the powerpc.git trees in 2.6.24 as part of a larger cleanup.  Let me know
> one way or the other.
> 
> - k
> 
>  drivers/net/ucc_geth_mii.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c
> index 6c257b8..df884f0 100644
> --- a/drivers/net/ucc_geth_mii.c
> +++ b/drivers/net/ucc_geth_mii.c
> @@ -32,7 +32,6 @@
>  #include <linux/mm.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> -#include <asm/ocp.h>
>  #include <linux/crc32.h>
>  #include <linux/mii.h>

Feel free to push via PPC git



^ permalink raw reply

* Re: [PATCH 4/4] ehea: show physical port state
From: Jeff Garzik @ 2007-08-25  4:36 UTC (permalink / raw)
  To: Jan-Bernd Themann
  Cc: netdev, Christoph Raisch, Jan-Bernd Themann, linux-kernel,
	linux-ppc, Marcus Eder, Thomas Klein, Stefan Roscher
In-Reply-To: <200708221621.32549.ossthema@de.ibm.com>

Jan-Bernd Themann wrote:
> Introduces a module parameter to decide whether the physical
> port link state is propagated to the network stack or not.
> It makes sense not to take the physical port state into account
> on machines with more logical partitions that communicate
> with each other. This is always possible no matter what the physical
> port state is. Thus eHEA can be considered as a switch there.
> 
> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
> 
> ---
>  drivers/net/ehea/ehea.h      |    5 ++++-
>  drivers/net/ehea/ehea_main.c |   14 +++++++++++++-
>  2 files changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
> index d67f97b..8d58be5 100644
> --- a/drivers/net/ehea/ehea.h
> +++ b/drivers/net/ehea/ehea.h
> @@ -39,7 +39,7 @@
>  #include <asm/io.h>
>  
>  #define DRV_NAME	"ehea"
> -#define DRV_VERSION	"EHEA_0073"
> +#define DRV_VERSION	"EHEA_0074"
>  
>  /* eHEA capability flags */
>  #define DLPAR_PORT_ADD_REM 1
> @@ -402,6 +402,8 @@ struct ehea_mc_list {
>  
>  #define EHEA_PORT_UP 1
>  #define EHEA_PORT_DOWN 0
> +#define EHEA_PHY_LINK_UP 1
> +#define EHEA_PHY_LINK_DOWN 0
>  #define EHEA_MAX_PORT_RES 16
>  struct ehea_port {
>  	struct ehea_adapter *adapter;	 /* adapter that owns this port */
> @@ -427,6 +429,7 @@ struct ehea_port {
>  	u32 msg_enable;
>  	u32 sig_comp_iv;
>  	u32 state;
> +	u8 phy_link;
>  	u8 full_duplex;
>  	u8 autoneg;
>  	u8 num_def_qps;
> diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
> index db57474..1804c99 100644
> --- a/drivers/net/ehea/ehea_main.c
> +++ b/drivers/net/ehea/ehea_main.c
> @@ -53,17 +53,21 @@ static int rq3_entries = EHEA_DEF_ENTRIES_RQ3;
>  static int sq_entries = EHEA_DEF_ENTRIES_SQ;
>  static int use_mcs = 0;
>  static int num_tx_qps = EHEA_NUM_TX_QP;
> +static int show_phys_link = 0;
>  
>  module_param(msg_level, int, 0);
>  module_param(rq1_entries, int, 0);
>  module_param(rq2_entries, int, 0);
>  module_param(rq3_entries, int, 0);
>  module_param(sq_entries, int, 0);
> +module_param(show_phys_link, int, 0);
>  module_param(use_mcs, int, 0);
>  module_param(num_tx_qps, int, 0);
>  
>  MODULE_PARM_DESC(num_tx_qps, "Number of TX-QPS");
>  MODULE_PARM_DESC(msg_level, "msg_level");
> +MODULE_PARM_DESC(show_phys_link, "Show link state of external port"
> +		 "1:yes, 0: no.  Default = 0 ");
>  MODULE_PARM_DESC(rq3_entries, "Number of entries for Receive Queue 3 "
>  		 "[2^x - 1], x = [6..14]. Default = "
>  		 __MODULE_STRING(EHEA_DEF_ENTRIES_RQ3) ")");
> @@ -814,7 +818,9 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
>  			ehea_error("Failed setting port speed");
>  		}
>  	}
> -	netif_carrier_on(port->netdev);
> +	if (!show_phys_link || (port->phy_link == EHEA_PHY_LINK_UP))
> +		netif_carrier_on(port->netdev);
> +
>  	kfree(cb4);
>  out:
>  	return ret;
> @@ -869,13 +875,19 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe)
>  			}
>  
>  		if (EHEA_BMASK_GET(NEQE_EXTSWITCH_PORT_UP, eqe)) {
> +			port->phy_link = EHEA_PHY_LINK_UP;
>  			if (netif_msg_link(port))
>  				ehea_info("%s: Physical port up",
>  					  port->netdev->name);
> +			if (show_phys_link)
> +				netif_carrier_on(port->netdev);
>  		} else {
> +			port->phy_link = EHEA_PHY_LINK_DOWN;
>  			if (netif_msg_link(port))
>  				ehea_info("%s: Physical port down",
>  					  port->netdev->name);
> +			if (show_phys_link)
> +				netif_carrier_off(port->netdev);

I think it's misnamed, calling it "show_xxx", because this (as the 
change description notes) controls propagation of carrier to the network 
stack.

	Jeff




^ permalink raw reply

* Re: [PATCH 1/2] [DM9000] Added support for big-endian hosts
From: Jeff Garzik @ 2007-08-25  4:31 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: netdev, Ben Dooks
In-Reply-To: <200708161015.35337.laurentp@cse-semaphore.com>

Laurent Pinchart wrote:
> This patch splits the receive status in 8bit wide fields and convert the
> packet length from little endian to CPU byte order.
> 
> Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
> ---
>  drivers/net/dm9000.c |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
> index c3de81b..a424810 100644
> --- a/drivers/net/dm9000.c
> +++ b/drivers/net/dm9000.c
> @@ -894,7 +894,8 @@ dm9000_timer(unsigned long data)
>  }
>  
>  struct dm9000_rxhdr {
> -	u16	RxStatus;
> +	u8	RxPktReady;
> +	u8	RxStatus;
>  	u16	RxLen;
>  } __attribute__((__packed__));

why does this not need endian conversions as well?

	Jeff




^ permalink raw reply

* Re: [PATCH] fix realtek phy id in forcedeth
From: Jeff Garzik @ 2007-08-25  4:01 UTC (permalink / raw)
  To: Willy Tarreau
  Cc: Prakash Punnoor, Greg KH, stable, netdev, Ayaz Abdulla,
	linux-kernel, Chuck Ebbert
In-Reply-To: <20070823192709.GA22729@1wt.eu>

Willy Tarreau wrote:
> Hi Greg,
> 
> On Thu, Aug 23, 2007 at 09:55:13AM -0700, Greg KH wrote:
>> It might help if someone sends a real patch that can be applied :)
> 
> This is getting really silly now :-) We're all wasting more time
> wondering who will send the patch than posting it. I've lost, I got
> fed up first, so here it is. Please apply to mainline then stable.
> 
> Thanks,
> Willy
> 
> --
> 
>>From a0e2922b99eedd9863232368ea2afe072c52783e Mon Sep 17 00:00:00 2001
> From: Willy Tarreau <w@1wt.eu>
> Date: Thu, 23 Aug 2007 21:35:41 +0200
> Subject: [PATCH] fix realtek phy id in forcedeth
> 
> As noticed by Chuck Ebbert, commit c5e3ae8823693b260ce1f217adca8add1bc0b3de
> introduced a copy-paste typo, as realtek phy is 0x732 and not 0x1c1. Obvious
> fix below suggested by Ayaz Abdulla.
> 
> Signed-off-by: Willy Tarreau <w@1wt.eu>
> Cc: Ayaz Abdulla <aabdulla@nvidia.com>
> Cc: Chuck Ebbert <cebbert@redhat.com>
> ---
>  drivers/net/forcedeth.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

applied



^ permalink raw reply

* Re: [PATCH 2.6.23 RESEND] cxgb3 - Fix dev->priv usage
From: Jeff Garzik @ 2007-08-25  3:58 UTC (permalink / raw)
  To: Divy Le Ray; +Cc: netdev, linux-kernel, swise
In-Reply-To: <20070823220628.9835.73819.stgit@speedy5>

Divy Le Ray wrote:
> From: Divy Le Ray <divy@chelsio.com>
> 
> cxgb3 used netdev_priv() and dev->priv for different purposes.
> In 2.6.23, netdev_priv() == dev->priv, cxgb3 needs a fix.
> This patch is a partial backport of Dave Miller's changes in the 
> net-2.6.24 git branch. 
> 
> Without this fix, cxgb3 crashes on 2.6.23.
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>
> ---
> 
>  drivers/net/cxgb3/adapter.h       |   10 +++
>  drivers/net/cxgb3/cxgb3_main.c    |  126 +++++++++++++++++++++----------------
>  drivers/net/cxgb3/cxgb3_offload.c |    6 +-
>  drivers/net/cxgb3/sge.c           |   23 ++++---
>  drivers/net/cxgb3/t3cdev.h        |    3 -
>  5 files changed, 100 insertions(+), 68 deletions(-)
> 

applied



^ permalink raw reply

* Re: [PATCH v2] [02/10] pasemi_mac: Stop using the pci config space accessors for register read/writes
From: Stephen Rothwell @ 2007-08-25  1:19 UTC (permalink / raw)
  To: Olof Johansson; +Cc: netdev, jgarzik, linuxppc-dev
In-Reply-To: <20070824181104.GA17171@lixom.net>

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

On Fri, 24 Aug 2007 13:11:04 -0500 Olof Johansson <olof@lixom.net> wrote:
>
> On Fri, Aug 24, 2007 at 02:05:31PM +1000, Stephen Rothwell wrote:
> > 
> > It is not documented as such (as far as I can see), but pci_dev_put is
> > safe to call with NULL. And there are other places in the kernel that
> > explicitly use that fact.
> 
> Some places check, others do not. I'll leave it be for now but might take
> care of it during some future cleanup. Thanks for point it out though.

No worries.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] via-velocity: more cleanup
From: Al Viro @ 2007-08-25  1:18 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Francois Romieu, netdev
In-Reply-To: <20070824144045.087d41ff@freepuppy.rosehill.hemminger.net>

On Fri, Aug 24, 2007 at 02:40:45PM -0700, Stephen Hemminger wrote:
> +static void mac_set_vlan_cam(struct mac_regs __iomem * regs, int idx,
> +			     const u8 *addr)

ITYM const u16 *, if not an outright u16.  These casts (one below and
ones in callers) really should die.

> +	writew(*((u16 *) addr), &regs->MARCAM[0]);

^ permalink raw reply

* Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
From: John Heffner @ 2007-08-25  0:42 UTC (permalink / raw)
  To: Bill Fink
  Cc: Rick Jones, hadi, David Miller, krkumar2, gaagaan, general,
	herbert, jagana, jeff, johnpol, kaber, mcarlson, mchan, netdev,
	peter.p.waskiewicz.jr, rdreier, Robert.Olsson, shemminger, sri,
	tgraf, xma
In-Reply-To: <20070823231820.2ae52cc0.billfink@mindspring.com>

Bill Fink wrote:
> Here you can see there is a major difference in the TX CPU utilization
> (99 % with TSO disabled versus only 39 % with TSO enabled), although
> the TSO disabled case was able to squeeze out a little extra performance
> from its extra CPU utilization.  Interestingly, with TSO enabled, the
> receiver actually consumed more CPU than with TSO disabled, so I guess
> the receiver CPU saturation in that case (99 %) was what restricted
> its performance somewhat (this was consistent across a few test runs).


One possibility is that I think the receive-side processing tends to do 
better when receiving into an empty queue.  When the (non-TSO) sender is 
the flow's bottleneck, this is going to be the case.  But when you 
switch to TSO, the receiver becomes the bottleneck and you're always 
going to have to put the packets at the back of the receive queue.  This 
might help account for the reason why you have both lower throughput and 
higher CPU utilization -- there's a point of instability right where the 
receiver becomes the bottleneck and you end up pushing it over to the 
bad side. :)

Just a theory.  I'm honestly surprised this effect would be so 
significant.  What do the numbers from netstat -s look like in the two 
cases?

   -John

^ permalink raw reply

* [PATCH] Prefix each line of multiline printk(KERN_<level> "foo\nbar") with KERN_<level>
From: Joe Perches @ 2007-08-24 23:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: blinux-list, cluster-devel, discuss, jffs-dev, linux-acpi,
	linux-ide, linux-mips, linux-mm, linux-mtd, linux-scsi,
	mpt_linux_developer, netdev, osst-users, parisc-linux,
	tpmdd-devel, uclinux-dist-devel

Corrected printk calls with multiple output lines which
did not correctly preface each line with KERN_<level>

Fixed uses of some single lines with too many KERN_<level>

Please pull from:
git://repo.or.cz/linux-2.6/trivial-mods.git pr_newlines

Signed-off-by: Joe Perches <joe@perches.com>

 arch/arm/kernel/ecard.c                  |    3 ++-
 arch/blackfin/kernel/dualcore_test.c     |    3 ++-
 arch/blackfin/kernel/traps.c             |    4 +++-
 arch/h8300/kernel/setup.c                |    4 +++-
 arch/i386/kernel/io_apic.c               |    3 ++-
 arch/m68knommu/kernel/setup.c            |    4 +++-
 arch/m68knommu/kernel/traps.c            |    5 +++--
 arch/m68knommu/mm/init.c                 |    9 ++++++---
 arch/m68knommu/platform/68328/config.c   |    3 ++-
 arch/m68knommu/platform/68360/config.c   |    3 ++-
 arch/m68knommu/platform/68EZ328/config.c |    3 ++-
 arch/mips/vr41xx/common/pmu.c            |    9 ++++++---
 arch/parisc/kernel/traps.c               |    3 ++-
 arch/parisc/math-emu/driver.c            |    5 +++--
 arch/v850/kernel/setup.c                 |    6 ++++--
 arch/x86_64/kernel/io_apic.c             |    3 ++-
 arch/x86_64/kernel/mpparse.c             |    3 ++-
 drivers/acpi/acpi_memhotplug.c           |    3 ++-
 drivers/char/dtlk.c                      |    3 ++-
 drivers/char/tpm/tpm_bios.c              |    2 +-
 drivers/ide/ide-cd.c                     |    3 ++-
 drivers/input/serio/hil_mlc.c            |    2 +-
 drivers/message/fusion/mptlan.c          |    3 ++-
 drivers/mtd/maps/cdb89712.c              |    5 ++++-
 drivers/net/cs89x0.c                     |    2 +-
 drivers/net/dgrs.c                       |    3 ++-
 drivers/net/wireless/arlan-main.c        |    2 +-
 drivers/net/wireless/arlan-proc.c        |   19 ++++++++++---------
 drivers/parisc/led.c                     |    3 ++-
 drivers/scsi/aha152x.c                   |   16 +++++++++++-----
 drivers/scsi/dpt_i2o.c                   |    3 ++-
 drivers/scsi/mac_scsi.c                  |    3 ++-
 drivers/scsi/megaraid.c                  |    3 ++-
 drivers/scsi/megaraid/megaraid_sas.c     |   25 ++++++++++++++++---------
 drivers/scsi/osst.c                      |    3 ++-
 drivers/scsi/zalon.c                     |    2 +-
 drivers/video/savage/savagefb_driver.c   |   21 ++++++++++++---------
 fs/dlm/dlm_internal.h                    |    9 +++++----
 fs/freevxfs/vxfs_bmap.c                  |    8 ++++++--
 fs/jffs2/wbuf.c                          |    3 ++-
 mm/slub.c                                |   18 ++++++++++++------
 41 files changed, 152 insertions(+), 85 deletions(-)

diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index f56d48c..6402ad2 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -547,7 +547,8 @@ static void ecard_check_lockup(struct irq_desc *desc)
 	if (last == jiffies) {
 		lockup += 1;
 		if (lockup > 1000000) {
-			printk(KERN_ERR "\nInterrupt lockup detected - "
+			printk(KERN_ERR "\n"
+			       KERN_ERR "Interrupt lockup detected - "
 			       "disabling all expansion card interrupts\n");
 
 			desc->chip->mask(IRQ_EXPANSIONCARD);
diff --git a/arch/blackfin/kernel/dualcore_test.c b/arch/blackfin/kernel/dualcore_test.c
index 0fcba74..3c94199 100644
--- a/arch/blackfin/kernel/dualcore_test.c
+++ b/arch/blackfin/kernel/dualcore_test.c
@@ -35,7 +35,8 @@ static int *testarg = (int *)0xfeb00000;
 static int test_init(void)
 {
 	*testarg = 1;
-	printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n @ [%p]\n",
+	printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n"
+	       KERN_INFO "@ [%p]\n",
 	       *testarg, testarg);
 	return 0;
 }
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 792a841..9255012 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -351,7 +351,9 @@ asmlinkage void trap_c(struct pt_regs *fp)
 		info.si_code = ILL_CPLB_MULHIT;
 #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
 		sig = SIGSEGV;
-		printk(KERN_EMERG "\n\nJump to address 0 - 0x0fff\n");
+		printk(KERN_EMERG "\n"
+		       KERN_EMERG "\n"
+		       KERN_EMERG "Jump to address 0 - 0x0fff\n");
 #else
 		sig = SIGILL;
 		printk(KERN_EMERG EXC_0x2D);
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index b2e86d0..cb45404 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -127,7 +127,9 @@ void __init setup_arch(char **cmdline_p)
 	register_console((struct console *)&gdb_console);
 #endif
 
-	printk(KERN_INFO "\r\n\nuClinux " CPU "\n");
+	printk(KERN_INFO "\r\n"
+	       KERN_INFO "\n"
+	       KERN_INFO "uClinux " CPU "\n");
 	printk(KERN_INFO "Target Hardware: %s\n",_target_name);
 	printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
 	printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n");
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 4b8a8da..856f127 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -1618,7 +1618,8 @@ void /*__init*/ print_PIC(void)
 	if (apic_verbosity == APIC_QUIET)
 		return;
 
-	printk(KERN_DEBUG "\nprinting PIC contents\n");
+	printk(KERN_DEBUG "\n"
+	       KERN_DEBUG "printing PIC contents\n");
 
 	spin_lock_irqsave(&i8259A_lock, flags);
 
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 3f86ade..7c0dd75 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -135,7 +135,9 @@ void setup_arch(char **cmdline_p)
 	command_line[sizeof(command_line) - 1] = 0;
 #endif
 
-	printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n");
+	printk(KERN_INFO "\x0F\r\n"
+	       KERN_INFO "\n"
+	       KERN_INFO "uClinux/" CPU "\n");
 
 #ifdef CONFIG_UCDIMM
 	printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n");
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index 437a061..a66c348 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -71,8 +71,9 @@ void die_if_kernel(char *str, struct pt_regs *fp, int nr)
 
 	console_verbose();
 	printk(KERN_EMERG "%s: %08x\n",str,nr);
-	printk(KERN_EMERG "PC: [<%08lx>]\nSR: %04x  SP: %p  a2: %08lx\n",
-	       fp->pc, fp->sr, fp, fp->a2);
+	printk(KERN_EMERG "PC: [<%08lx>]\n", fp->pc);
+	printk(KERN_EMERG "SR: %04x  SP: %p  a2: %08lx\n",
+	       fp->sr, fp, fp->a2);
 	printk(KERN_EMERG "d0: %08lx    d1: %08lx    d2: %08lx    d3: %08lx\n",
 	       fp->d0, fp->d1, fp->d2, fp->d3);
 	printk(KERN_EMERG "d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n",
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c
index 06e538d..970f1a1 100644
--- a/arch/m68knommu/mm/init.c
+++ b/arch/m68knommu/mm/init.c
@@ -68,7 +68,8 @@ void show_mem(void)
     int free = 0, total = 0, reserved = 0, shared = 0;
     int cached = 0;
 
-    printk(KERN_INFO "\nMem-info:\n");
+    printk(KERN_INFO "\n"
+	   KERN_INFO "Mem-info:\n");
     show_free_areas();
     i = max_mapnr;
     while (i-- > 0) {
@@ -110,7 +111,8 @@ void paging_init(void)
 	unsigned long end_mem   = memory_end & PAGE_MASK;
 
 #ifdef DEBUG
-	printk (KERN_DEBUG "start_mem is %#lx\nvirtual_end is %#lx\n",
+	printk (KERN_DEBUG "start_mem is %#lx\n"
+		KERN_DEBUG "virtual_end is %#lx\n",
 		start_mem, end_mem);
 #endif
 
@@ -131,7 +133,8 @@ void paging_init(void)
 #ifdef DEBUG
 	printk (KERN_DEBUG "before free_area_init\n");
 
-	printk (KERN_DEBUG "free_area_init -> start_mem is %#lx\nvirtual_end is %#lx\n",
+	printk (KERN_DEBUG "free_area_init -> start_mem is %#lx\n"
+		KERN_DEBUG "virtual_end is %#lx\n",
 		start_mem, end_mem);
 #endif
 
diff --git a/arch/m68knommu/platform/68328/config.c b/arch/m68knommu/platform/68328/config.c
index e5c537d..07c73c9 100644
--- a/arch/m68knommu/platform/68328/config.c
+++ b/arch/m68knommu/platform/68328/config.c
@@ -55,7 +55,8 @@ void m68328_reset (void)
 
 void config_BSP(char *command, int len)
 {
-  printk(KERN_INFO "\n68328 support D. Jeff Dionne <jeff@uclinux.org>\n");
+  printk(KERN_INFO "\n"
+	 KERN_INFO "68328 support D. Jeff Dionne <jeff@uclinux.org>\n");
   printk(KERN_INFO "68328 support Kenneth Albanowski <kjahds@kjshds.com>\n");
   printk(KERN_INFO "68328/Pilot support Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de>\n");
 
diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c
index 155b72f..2392fc0 100644
--- a/arch/m68knommu/platform/68360/config.c
+++ b/arch/m68knommu/platform/68360/config.c
@@ -183,7 +183,8 @@ void config_BSP(char *command, int len)
      }
   }
 
-  printk(KERN_INFO "\n68360 QUICC support (C) 2000 Lineo Inc.\n");
+  printk(KERN_INFO "\n"
+	 KERN_INFO "68360 QUICC support (C) 2000 Lineo Inc.\n");
 
 #if defined(CONFIG_UCQUICC) && 0
   printk(KERN_INFO "uCquicc serial string [%s]\n",getserialnum());
diff --git a/arch/m68knommu/platform/68EZ328/config.c b/arch/m68knommu/platform/68EZ328/config.c
index ab36551..f344edf 100644
--- a/arch/m68knommu/platform/68EZ328/config.c
+++ b/arch/m68knommu/platform/68EZ328/config.c
@@ -66,7 +66,8 @@ void config_BSP(char *command, int len)
 {
   unsigned char *p;
 
-  printk(KERN_INFO "\n68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
+  printk(KERN_INFO "\n"
+	 KERN_INFO "68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n");
 
 #ifdef CONFIG_UCSIMM
   printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
diff --git a/arch/mips/vr41xx/common/pmu.c b/arch/mips/vr41xx/common/pmu.c
index 5e46979..ada7f15 100644
--- a/arch/mips/vr41xx/common/pmu.c
+++ b/arch/mips/vr41xx/common/pmu.c
@@ -65,21 +65,24 @@ static void vr41xx_restart(char *command)
 {
 	local_irq_disable();
 	software_reset();
-	printk(KERN_NOTICE "\nYou can reset your system\n");
+	printk(KERN_NOTICE "\n"
+	       KERN_NOTICE "You can reset your system\n");
 	while (1) ;
 }
 
 static void vr41xx_halt(void)
 {
 	local_irq_disable();
-	printk(KERN_NOTICE "\nYou can turn off the power supply\n");
+	printk(KERN_NOTICE "\n"
+	       KERN_NOTICE "You can turn off the power supply\n");
 	while (1) ;
 }
 
 static void vr41xx_power_off(void)
 {
 	local_irq_disable();
-	printk(KERN_NOTICE "\nYou can turn off the power supply\n");
+	printk(KERN_NOTICE "\n"
+	       KERN_NOTICE "You can turn off the power supply\n");
 	while (1) ;
 }
 
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index bbf029a..6a29d4c 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -746,7 +746,8 @@ void handle_interruption(int code, struct pt_regs *regs)
 	default:
 		if (user_mode(regs)) {
 #ifdef PRINT_USER_FAULTS
-			printk(KERN_DEBUG "\nhandle_interruption() pid=%d command='%s'\n",
+			printk(KERN_DEBUG "\n"
+			       KERN_DEBUG "handle_interruption() pid=%d command='%s'\n",
 			    current->pid, current->comm);
 			show_regs(regs);
 #endif
diff --git a/arch/parisc/math-emu/driver.c b/arch/parisc/math-emu/driver.c
index 09ef413..534ce20 100644
--- a/arch/parisc/math-emu/driver.c
+++ b/arch/parisc/math-emu/driver.c
@@ -98,9 +98,10 @@ handle_fpe(struct pt_regs *regs)
 	memcpy(&orig_sw, frcopy, sizeof(orig_sw));
 
 	if (FPUDEBUG) {
-		printk(KERN_DEBUG "FP VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI ->\n   ");
+		printk(KERN_DEBUG "FP VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI ->\n"
+		       KERN_DEBUG "   ");
 		printbinary(orig_sw, 32);
-		printk(KERN_DEBUG "\n");
+		printk("\n");
 	}
 
 	signalcode = decode_fpu(frcopy, 0x666);
diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c
index a914f24..35cf93a 100644
--- a/arch/v850/kernel/setup.c
+++ b/arch/v850/kernel/setup.c
@@ -79,7 +79,8 @@ void __init setup_arch (char **cmdline)
 	/* ... and tell the kernel about it.  */
 	init_mem_alloc (ram_start, ram_len);
 
-	printk (KERN_INFO "CPU: %s\nPlatform: %s\n",
+	printk (KERN_INFO "CPU: %s\n"
+		KERN_INFO "Platform: %s\n",
 		CPU_MODEL_LONG, PLATFORM_LONG);
 
 	/* do machine-specific setups.  */
@@ -304,7 +305,8 @@ void show_mem(void)
     int free = 0, total = 0, reserved = 0, shared = 0;
     int cached = 0;
 
-    printk(KERN_INFO "\nMem-info:\n");
+    printk(KERN_INFO "\n"
+	   KERN_INFO "Mem-info:\n");
     show_free_areas();
     i = max_mapnr;
     while (i-- > 0) {
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index f57f8b9..6b2c8a3 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -1142,7 +1142,8 @@ void __apicdebuginit print_PIC(void)
 	if (apic_verbosity == APIC_QUIET)
 		return;
 
-	printk(KERN_DEBUG "\nprinting PIC contents\n");
+	printk(KERN_DEBUG "\n"
+	       KERN_DEBUG "printing PIC contents\n");
 
 	spin_lock_irqsave(&i8259A_lock, flags);
 
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 8bf0ca0..d32e640 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -411,7 +411,8 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
 	bus.mpc_busid = 0;
 	switch (mpc_default_type) {
 		default:
-			printk(KERN_ERR "???\nUnknown standard configuration %d\n",
+			printk(KERN_ERR "\n"
+			       KERN_ERR "???Unknown standard configuration %d\n",
 				mpc_default_type);
 			/* fall through */
 		case 1:
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 5f1127a..61e51ca 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -185,7 +185,8 @@ acpi_memory_get_device(acpi_handle handle,
       end:
 	*mem_device = acpi_driver_data(device);
 	if (!(*mem_device)) {
-		printk(KERN_ERR "\n driver data not found");
+		printk(KERN_ERR "\n"
+		       KERN_ERR "driver data not found");
 		return -ENODEV;
 	}
 
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index abde6dd..0bf01c6 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -495,7 +495,8 @@ for (i = 0; i < 10; i++)			\
 /*
    static void dtlk_handle_error(char op, char rc, unsigned int minor)
    {
-   printk(KERN_INFO"\nDoubleTalk PC - MINOR: %d, OPCODE: %d, ERROR: %d\n", 
+   printk(KERN_INFO "\n"
+          KERN_INFO "DoubleTalk PC - MINOR: %d, OPCODE: %d, ERROR: %d\n", 
    minor, op, rc);
    return;
    }
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c
index 60a2d26..c0b4fa1 100644
--- a/drivers/char/tpm/tpm_bios.c
+++ b/drivers/char/tpm/tpm_bios.c
@@ -321,7 +321,7 @@ static int tpm_ascii_bios_measurements_show(struct seq_file *m, void *v)
 
 	eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL);
 	if (!eventname) {
-		printk(KERN_ERR "%s: ERROR - No Memory for event name\n ",
+		printk(KERN_ERR "%s: ERROR - No Memory for event name\n",
 		       __func__);
 		return -EFAULT;
 	}
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index ca84352..31fcbe8 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -541,7 +541,8 @@ void cdrom_analyze_sense_data(ide_drive_t *drive,
 					lo = mid+1;
 			}
 
-			printk (KERN_ERR "  The failed \"%s\" packet command was: \n  \"", s);
+			printk (KERN_ERR "  The failed \"%s\" packet command was:\n"
+				KERN_ERR "  \"", s);
 			for (i=0; i<sizeof (failed_command->cmd); i++)
 				printk ("%02x ", failed_command->cmd[i]);
 			printk ("\"\n");
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
index 93a1a6b..ef31148 100644
--- a/drivers/input/serio/hil_mlc.c
+++ b/drivers/input/serio/hil_mlc.c
@@ -625,7 +625,7 @@ static int hilse_donode(hil_mlc *mlc)
 #ifdef HIL_MLC_DEBUG
 	if (mlc->seidx && mlc->seidx != seidx &&
 	    mlc->seidx != 41 && mlc->seidx != 42 && mlc->seidx != 43) {
-		printk(KERN_DEBUG PREFIX "z%i \n {%i}", doze, mlc->seidx);
+		printk(KERN_DEBUG PREFIX "z%i\t{%i}\n", doze, mlc->seidx);
 		doze = 0;
 	}
 
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
index 01fc397..59df21e 100644
--- a/drivers/message/fusion/mptlan.c
+++ b/drivers/message/fusion/mptlan.c
@@ -1318,7 +1318,8 @@ mpt_lan_post_receive_buckets(struct mpt_lan_priv *priv)
 
 		pRecvReq->BucketCount = cpu_to_le32(i);
 
-/*	printk(KERN_INFO MYNAM ": posting buckets\n   ");
+/*	printk(KERN_INFO MYNAM ": posting buckets\n");
+ *	printk(KERN_INFO "   ");
  *	for (i = 0; i < j + 2; i ++)
  *	    printk (" %08x", le32_to_cpu(msg[i]));
  *	printk ("\n");
diff --git a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c
index 9f17bb6..2a15cc9 100644
--- a/drivers/mtd/maps/cdb89712.c
+++ b/drivers/mtd/maps/cdb89712.c
@@ -225,7 +225,10 @@ out:
 static int __init init_cdb89712_maps(void)
 {
 
-       	printk(KERN_INFO "Cirrus CDB89712 MTD mappings:\n  Flash 0x%x at 0x%x\n  SRAM 0x%x at 0x%x\n  BootROM 0x%x at 0x%x\n",
+	printk(KERN_INFO "Cirrus CDB89712 MTD mappings:\n"
+	       KERN_INFO "  Flash 0x%x at 0x%x\n"
+	       KERN_INFO "  SRAM 0x%x at 0x%x\n"
+	       KERN_INFO "  BootROM 0x%x at 0x%x\n",
 	       FLASH_SIZE, FLASH_START, SRAM_SIZE, SRAM_START, BOOTROM_SIZE, BOOTROM_START);
 
 	init_cdb89712_flash();
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index 9774bb1..536d29f 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -731,7 +731,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
 	if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0)
 		printk(KERN_WARNING "cs89x0: No EEPROM, relying on command line....\n");
 	else if (get_eeprom_data(dev, START_EEPROM_DATA,CHKSUM_LEN,eeprom_buff) < 0) {
-		printk(KERN_WARNING "\ncs89x0: EEPROM read failed, relying on command line.\n");
+		printk(KERN_WARNING "cs89x0: EEPROM read failed, relying on command line.\n");
         } else if (get_eeprom_cksum(START_EEPROM_DATA,CHKSUM_LEN,eeprom_buff) < 0) {
 		/* Check if the chip was able to read its own configuration starting
 		   at 0 in the EEPROM*/
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c
index df62c02..28c7bc9 100644
--- a/drivers/net/dgrs.c
+++ b/drivers/net/dgrs.c
@@ -1583,7 +1583,8 @@ static int __init dgrs_init_module (void)
 
 	if (dgrs_debug)
 	{
-		printk(KERN_INFO "dgrs: SW=%s FW=Build %d %s\nFW Version=%s\n",
+		printk(KERN_INFO "dgrs: SW=%s FW=Build %d %s\n"
+		       KERN_INFO "FW Version=%s\n",
 		       version, dgrs_firmnum, dgrs_firmdate, dgrs_firmver);
 	}
 
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index 498e848..00edf9a 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -1082,7 +1082,7 @@ static int __init arlan_probe_here(struct net_device *dev,
 	if (arlan_check_fingerprint(memaddr))
 		return -ENODEV;
 
-	printk(KERN_NOTICE "%s: Arlan found at %x, \n ", dev->name, 
+	printk(KERN_NOTICE "%s: Arlan found at %x, \n", dev->name, 
 	       (int) virt_to_phys((void*)memaddr));
 
 	ap->card = (void *) memaddr;
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index 015abd9..6effdf6 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -418,13 +418,14 @@ static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,
 	}
 	if (ctl->procname == NULL || arlan_drive_info == NULL)
 	{
-		printk(KERN_WARNING " procname is NULL in sysctl_table or arlan_drive_info is NULL \n at arlan module\n ");
+		printk(KERN_WARNING " procname is NULL in sysctl_table or arlan_drive_info is NULL\n"
+		       KERN_WARNING " at arlan module\n");
 		return -1;
 	}
 	devnum = ctl->procname[5] - '0';
 	if (devnum < 0 || devnum > MAX_ARLANS - 1)
 	{
-		printk(KERN_WARNING "too strange devnum in procfs parse\n ");
+		printk(KERN_WARNING "too strange devnum in procfs parse\n");
 		return -1;
 	}
 	else if (arlan_device[devnum] == NULL)
@@ -439,7 +440,7 @@ static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,
 
 	if (priva == NULL)
 	{
-		printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
+		printk(KERN_WARNING "Could not find the device private in arlan procsys, bad\n");
 		return -1;
 	}
 	dev = arlan_device[devnum];
@@ -657,7 +658,7 @@ static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp
 		priva = arlan_device[devnum]->priv;
 	if (priva == NULL)
 	{
-		printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
+		printk(KERN_WARNING "Could not find the device private in arlan procsys, bad\n");
 		return -1;
 	}
 	memcpy_fromio(priva->conf, priva->card, sizeof(struct arlan_shmem));
@@ -691,7 +692,7 @@ static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp
 		priva = arlan_device[devnum]->priv;
 	if (priva == NULL)
 	{
-		printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
+		printk(KERN_WARNING "Could not find the device private in arlan procsys, bad\n");
 		return -1;
 	}
 	memcpy_fromio(priva->conf, priva->card, sizeof(struct arlan_shmem));
@@ -719,7 +720,7 @@ static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp
 		priva = arlan_device[devnum]->priv;
 	if (priva == NULL)
 	{
-		printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
+		printk(KERN_WARNING "Could not find the device private in arlan procsys, bad\n");
 		return -1;
 	}
 	memcpy_fromio(priva->conf, priva->card, sizeof(struct arlan_shmem));
@@ -748,7 +749,7 @@ static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp,
 		priva = arlan_device[devnum]->priv;
 	if (priva == NULL)
 	{
-		printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
+		printk(KERN_WARNING "Could not find the device private in arlan procsys, bad\n");
 		return -1;
 	}
 	memcpy_fromio(priva->conf, priva->card, sizeof(struct arlan_shmem));
@@ -775,7 +776,7 @@ static int arlan_configure(ctl_table * ctl, int write, struct file *filp,
 
 	if (devnum < 0 || devnum > MAX_ARLANS - 1)
 	{
-		  printk(KERN_WARNING "too strange devnum in procfs parse\n ");
+		  printk(KERN_WARNING "too strange devnum in procfs parse\n");
 		  return -1;
 	}
 	else if (arlan_device[devnum] != NULL)
@@ -800,7 +801,7 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
 
 	if (devnum < 0 || devnum > MAX_ARLANS - 1)
 	{
-		  printk(KERN_WARNING "too strange devnum in procfs parse\n ");
+		  printk(KERN_WARNING "too strange devnum in procfs parse\n");
 		  return -1;
 	}
 	else if (arlan_device[devnum] != NULL)
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index e5d7ed9..9053933 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -230,7 +230,8 @@ static int led_proc_write(struct file *file, const char *buf,
 
 parse_error:
 	if ((long)data == LED_NOLCD)
-		printk(KERN_CRIT "Parse error: expect \"n n n\" (n == 0 or 1) for heartbeat,\ndisk io and lan tx/rx indicators\n");
+		printk(KERN_CRIT "Parse error: expect \"n n n\" (n == 0 or 1) for heartbeat,\n"
+		       KERN_CRIT "disk io and lan tx/rx indicators\n");
 	return -EINVAL;
 }
 
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index d30a307..0a96ff4 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -2647,7 +2647,8 @@ static void is_complete(struct Scsi_Host *shpnt)
  */
 static void aha152x_error(struct Scsi_Host *shpnt, char *msg)
 {
-	printk(KERN_EMERG "\naha152x%d: %s\n", HOSTNO, msg);
+	printk(KERN_EMERG "\n"
+	       KERN_EMERG "aha152x%d: %s\n", HOSTNO, msg);
 	show_queues(shpnt);
 	panic("aha152x panic\n");
 }
@@ -2973,7 +2974,9 @@ static void show_queues(struct Scsi_Host *shpnt)
 	unsigned long flags;
 
 	DO_LOCK(flags);
-	printk(KERN_DEBUG "\nqueue status:\nissue_SC:\n");
+	printk(KERN_DEBUG "\n"
+	       KERN_DEBUG "queue status:\n"
+	       KERN_DEBUG "issue_SC:\n");
 	for (ptr = ISSUE_SC; ptr; ptr = SCNEXT(ptr))
 		show_command(ptr);
 	DO_UNLOCK(flags);
@@ -3663,7 +3666,8 @@ static int __init aha152x_init(void)
 
 		for (i = 0; i<setup_count; i++) {
 			if (!checksetup(&setup[i])) {
-				printk(KERN_ERR "\naha152x: %s\n", setup[i].conf);
+				printk(KERN_ERR "\n"
+				       KERN_ERR "aha152x: %s\n", setup[i].conf);
 				printk(KERN_ERR "aha152x: invalid line\n");
 			}
 		}
@@ -3676,7 +3680,8 @@ static int __init aha152x_init(void)
 
 		if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
 			if (!checksetup(&override)) {
-				printk(KERN_ERR "\naha152x: invalid override SETUP0={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
+				printk(KERN_ERR "\n"
+				       KERN_ERR "aha152x: invalid override SETUP0={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
 				       override.io_port,
 				       override.irq,
 				       override.scsiid,
@@ -3697,7 +3702,8 @@ static int __init aha152x_init(void)
 
 		if (setup_count == 0 || (override.io_port != setup[0].io_port)) {
 			if (!checksetup(&override)) {
-				printk(KERN_ERR "\naha152x: invalid override SETUP1={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
+				printk(KERN_ERR "\n"
+				       KERN_ERR "aha152x: invalid override SETUP1={0x%x,%d,%d,%d,%d,%d,%d,%d}\n",
 				       override.io_port,
 				       override.irq,
 				       override.scsiid,
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 502732a..b40efe0 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -3148,7 +3148,8 @@ static int adpt_i2o_issue_params(int cmd, adpt_hba* pHba, int tid,
 	}
 
 	if (res[1]&0x00FF0000) { 	/* BlockStatus != SUCCESS */
-		printk(KERN_WARNING "%s: %s - Error:\n  ErrorInfoSize = 0x%02x, "
+		printk(KERN_WARNING "%s: %s - Error:\n"
+		       KERN_WARNING "  ErrorInfoSize = 0x%02x, "
 			"BlockStatus = 0x%02x, BlockSize = 0x%04x\n",
 			pHba->name,
 			(cmd == I2O_CMD_UTIL_PARAMS_SET) ? "PARAMS_SET"
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index cdbcaa5..1afcb6c 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -311,7 +311,8 @@ int macscsi_detect(struct scsi_host_template * tpnt)
 	printk (KERN_INFO " %d", instance->irq);
     printk(KERN_INFO " options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
 	   instance->can_queue, instance->cmd_per_lun, MACSCSI_PUBLIC_RELEASE);
-    printk(KERN_INFO "\nscsi%d:", instance->host_no);
+    printk(KERN_INFO "\n"
+	   KERN_INFO "scsi%d:", instance->host_no);
     NCR5380_print_options(instance);
     printk("\n");
     called = 1;
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 3907f67..a3083a6 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -2077,7 +2077,8 @@ mega_create_proc_entry(int index, struct proc_dir_entry *parent)
 		adapter->controller_proc_dir_entry = proc_mkdir(string, parent);
 
 	if(!controller_proc_dir_entry) {
-		printk(KERN_WARNING "\nmegaraid: proc_mkdir failed\n");
+		printk(KERN_WARNING "\n"
+		       KERN_WARNING "megaraid: proc_mkdir failed\n");
 		return;
 	}
 	adapter->proc_read = CREATE_READ_PROC("config", proc_read_config);
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index ebb948c..fe05e86 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -744,12 +744,14 @@ megasas_dump_pending_frames(struct megasas_instance *instance)
 	u32 sgcount;
 	u32 max_cmd = instance->max_fw_cmds;
 
-	printk(KERN_ERR "\nmegasas[%d]: Dumping Frame Phys Address of all pending cmds in FW\n",instance->host->host_no);
+	printk(KERN_ERR "\n"
+	       KERN_ERR "megasas[%d]: Dumping Frame Phys Address of all pending cmds in FW\n",instance->host->host_no);
 	printk(KERN_ERR "megasas[%d]: Total OS Pending cmds : %d\n",instance->host->host_no,atomic_read(&instance->fw_outstanding));
+	printk(KERN_ERR "\n");
 	if (IS_DMA64)
-		printk(KERN_ERR "\nmegasas[%d]: 64 bit SGLs were sent to FW\n",instance->host->host_no);
+		printk(KERN_ERR "megasas[%d]: 64 bit SGLs were sent to FW\n",instance->host->host_no);
 	else
-		printk(KERN_ERR "\nmegasas[%d]: 32 bit SGLs were sent to FW\n",instance->host->host_no);
+		printk(KERN_ERR "megasas[%d]: 32 bit SGLs were sent to FW\n",instance->host->host_no);
 
 	printk(KERN_ERR "megasas[%d]: Pending OS cmds in FW : \n",instance->host->host_no);
 	for (i = 0; i < max_cmd; i++) {
@@ -770,25 +772,30 @@ megasas_dump_pending_frames(struct megasas_instance *instance)
 			printk(KERN_ERR "megasas[%d]: frame count : 0x%x, Cmd : 0x%x, Tgt id : 0x%x, lun : 0x%x, cdb_len : 0x%x, data xfer len : 0x%x, sense_buf addr : 0x%x,sge count : 0x%x\n",instance->host->host_no,cmd->frame_count,pthru->cmd,pthru->target_id,pthru->lun,pthru->cdb_len , pthru->data_xfer_len,pthru->sense_buf_phys_addr_lo,sgcount);
 		}
 	if(megasas_dbg_lvl & MEGASAS_DBG_LVL){
+		printk(KERN_ERR "megasas:");
 		for (n = 0; n < sgcount; n++){
 			if (IS_DMA64)
-				printk(KERN_ERR "megasas: sgl len : 0x%x, sgl addr : 0x%08lx ",mfi_sgl->sge64[n].length , (unsigned long)mfi_sgl->sge64[n].phys_addr) ;
+				printk(" sgl len : 0x%x, sgl addr : 0x%08lx",mfi_sgl->sge64[n].length , (unsigned long)mfi_sgl->sge64[n].phys_addr) ;
 			else
-				printk(KERN_ERR "megasas: sgl len : 0x%x, sgl addr : 0x%x ",mfi_sgl->sge32[n].length , mfi_sgl->sge32[n].phys_addr) ;
+				printk(" sgl len : 0x%x, sgl addr : 0x%x",mfi_sgl->sge32[n].length , mfi_sgl->sge32[n].phys_addr) ;
 			}
 		}
-		printk(KERN_ERR "\n");
+		printk("\n");
 	} /*for max_cmd*/
-	printk(KERN_ERR "\nmegasas[%d]: Pending Internal cmds in FW : \n",instance->host->host_no);
+	printk(KERN_ERR "\n"
+	       KERN_ERR "megasas[%d]: Pending Internal cmds in FW : \n",instance->host->host_no);
+	printk(KERN_ERR);
 	for (i = 0; i < max_cmd; i++) {
 
 		cmd = instance->cmd_list[i];
 
 		if(cmd->sync_cmd == 1){
-			printk(KERN_ERR "0x%08lx : ", (unsigned long)cmd->frame_phys_addr);
+			printk("0x%08lx : ", (unsigned long)cmd->frame_phys_addr);
 		}
 	}
-	printk(KERN_ERR "megasas[%d]: Dumping Done.\n\n",instance->host->host_no);
+	printk("\n");
+	printk(KERN_ERR "megasas[%d]: Dumping Done.\n"
+	       KERN_ERR "\n",instance->host->host_no);
 }
 
 /**
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 08060fb..43bc5d8 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -5936,7 +5936,8 @@ static int __init init_osst(void)
 {
 	int err;
 
-	printk(KERN_INFO "osst :I: Tape driver with OnStream support version %s\nosst :I: %s\n", osst_version, cvsid);
+	printk(KERN_INFO "osst :I: Tape driver with OnStream support version %s\n"
+	       KERN_INFO "osst :I: %s\n", osst_version, cvsid);
 
 	validate_options();
 
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 4b5f908..24f0b9e 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -137,7 +137,7 @@ zalon_probe(struct parisc_device *dev)
 		goto fail;
 
 	if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
-		printk(KERN_ERR "%s: irq problem with %d, detaching\n ",
+		printk(KERN_ERR "%s: irq problem with %d, detaching\n",
 			dev->dev.bus_id, dev->irq);
 		goto fail;
 	}
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index b855f4a..b60c32b 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -515,27 +515,30 @@ static void SavagePrintRegs(struct savagefb_par *par)
 	int vgaCRIndex = 0x3d4;
 	int vgaCRReg = 0x3d5;
 
-	printk(KERN_DEBUG "SR    x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE "
-	       "xF");
+	printk(KERN_DEBUG
+	       "SR    x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF");
 
 	for (i = 0; i < 0x70; i++) {
 		if (!(i % 16))
-			printk(KERN_DEBUG "\nSR%xx ", i >> 4);
+			printk("\n" KERN_DEBUG "SR%xx ", i >> 4);
 		vga_out8(0x3c4, i, par);
-		printk(KERN_DEBUG " %02x", vga_in8(0x3c5, par));
+		printk(" %02x", vga_in8(0x3c5, par));
 	}
 
-	printk(KERN_DEBUG "\n\nCR    x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC "
-	       "xD xE xF");
+	printk("\n"
+	       KERN_DEBUG "\n"
+	       KERN_DEBUG
+	       "CR    x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF");
 
 	for (i = 0; i < 0xB7; i++) {
 		if (!(i % 16))
-			printk(KERN_DEBUG "\nCR%xx ", i >> 4);
+			printk("\n" KERN_DEBUG "CR%xx ", i >> 4);
 		vga_out8(vgaCRIndex, i, par);
-		printk(KERN_DEBUG " %02x", vga_in8(vgaCRReg, par));
+		printk(" %02x", vga_in8(vgaCRReg, par));
 	}
 
-	printk(KERN_DEBUG "\n\n");
+	printk("\n"
+	       KERN_DEBUG "\n");
 }
 #endif
 
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 74901e9..59f3cb4 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -81,10 +81,11 @@ do { \
 { \
   if (!(x)) \
   { \
-    printk(KERN_ERR "\nDLM:  Assertion failed on line %d of file %s\n" \
-               "DLM:  assertion:  \"%s\"\n" \
-               "DLM:  time = %lu\n", \
-               __LINE__, __FILE__, #x, jiffies); \
+    printk(KERN_ERR "\n" \
+	   KERN_ERR "DLM:  Assertion failed on line %d of file %s\n" \
+	   KERN_ERR "DLM:  assertion:  \"%s\"\n" \
+	   KERN_ERR "DLM:  time = %lu\n", \
+	   __LINE__, __FILE__, #x, jiffies); \
     {do} \
     printk("\n"); \
     BUG(); \
diff --git a/fs/freevxfs/vxfs_bmap.c b/fs/freevxfs/vxfs_bmap.c
index f86fd3c..c65b39a 100644
--- a/fs/freevxfs/vxfs_bmap.c
+++ b/fs/freevxfs/vxfs_bmap.c
@@ -166,7 +166,9 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size, long block)
 			struct vxfs_typed_dev4	*typ4 =
 				(struct vxfs_typed_dev4 *)typ;
 
-			printk(KERN_INFO "\n\nTYPED_DEV4 detected!\n");
+			printk(KERN_INFO "\n"
+			       KERN_INFO "\n"
+			       KERN_INFO "TYPED_DEV4 detected!\n");
 			printk(KERN_INFO "block: %Lu\tsize: %Ld\tdev: %d\n",
 			       (unsigned long long) typ4->vd4_block,
 			       (unsigned long long) typ4->vd4_size,
@@ -229,7 +231,9 @@ vxfs_bmap_typed(struct inode *ip, long iblock)
 			struct vxfs_typed_dev4	*typ4 =
 				(struct vxfs_typed_dev4 *)typ;
 
-			printk(KERN_INFO "\n\nTYPED_DEV4 detected!\n");
+			printk(KERN_INFO "\n"
+			       KERN_INFO "\n"
+			       KERN_INFO "TYPED_DEV4 detected!\n");
 			printk(KERN_INFO "block: %Lu\tsize: %Ld\tdev: %d\n",
 			       (unsigned long long) typ4->vd4_block,
 			       (unsigned long long) typ4->vd4_size,
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 91d1d0f..3c51cda 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1094,7 +1094,8 @@ int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *
 	if (!c->mtd->block_markbad)
 		return 1; // What else can we do?
 
-	printk(KERN_WARNING "JFFS2: marking eraseblock at %08x\n as bad", bad_offset);
+	printk(KERN_WARNING "JFFS2: marking eraseblock at %08x\n"
+	       KERN_WARNING " as bad", bad_offset);
 	ret = c->mtd->block_markbad(c->mtd, bad_offset);
 
 	if (ret) {
diff --git a/mm/slub.c b/mm/slub.c
index 04151da..2bbf0d9 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2914,7 +2914,8 @@ static void resiliency_test(void)
 
 	p = kzalloc(16, GFP_KERNEL);
 	p[16] = 0x12;
-	printk(KERN_ERR "\n1. kmalloc-16: Clobber Redzone/next pointer"
+	printk(KERN_ERR "\n"
+	       KERN_ERR "1. kmalloc-16: Clobber Redzone/next pointer"
 			" 0x12->0x%p\n\n", p + 16);
 
 	validate_slab_cache(kmalloc_caches + 4);
@@ -2922,7 +2923,8 @@ static void resiliency_test(void)
 	/* Hmmm... The next two are dangerous */
 	p = kzalloc(32, GFP_KERNEL);
 	p[32 + sizeof(void *)] = 0x34;
-	printk(KERN_ERR "\n2. kmalloc-32: Clobber next pointer/next slab"
+	printk(KERN_ERR "\n"
+	       KERN_ERR "2. kmalloc-32: Clobber next pointer/next slab"
 		 	" 0x34 -> -0x%p\n", p);
 	printk(KERN_ERR "If allocated object is overwritten then not detectable\n\n");
 
@@ -2930,12 +2932,14 @@ static void resiliency_test(void)
 	p = kzalloc(64, GFP_KERNEL);
 	p += 64 + (get_cycles() & 0xff) * sizeof(void *);
 	*p = 0x56;
-	printk(KERN_ERR "\n3. kmalloc-64: corrupting random byte 0x56->0x%p\n",
+	printk(KERN_ERR "\n"
+	       KERN_ERR "3. kmalloc-64: corrupting random byte 0x56->0x%p\n",
 									p);
 	printk(KERN_ERR "If allocated object is overwritten then not detectable\n\n");
 	validate_slab_cache(kmalloc_caches + 6);
 
-	printk(KERN_ERR "\nB. Corruption after free\n");
+	printk(KERN_ERR "\n"
+	       KERN_ERR "B. Corruption after free\n");
 	p = kzalloc(128, GFP_KERNEL);
 	kfree(p);
 	*p = 0x78;
@@ -2945,13 +2949,15 @@ static void resiliency_test(void)
 	p = kzalloc(256, GFP_KERNEL);
 	kfree(p);
 	p[50] = 0x9a;
-	printk(KERN_ERR "\n2. kmalloc-256: Clobber 50th byte 0x9a->0x%p\n\n", p);
+	printk(KERN_ERR "\n"
+	       KERN_ERR "2. kmalloc-256: Clobber 50th byte 0x9a->0x%p\n\n", p);
 	validate_slab_cache(kmalloc_caches + 8);
 
 	p = kzalloc(512, GFP_KERNEL);
 	kfree(p);
 	p[512] = 0xab;
-	printk(KERN_ERR "\n3. kmalloc-512: Clobber redzone 0xab->0x%p\n\n", p);
+	printk(KERN_ERR "\n"
+	       KERN_ERR "3. kmalloc-512: Clobber redzone 0xab->0x%p\n\n", p);
 	validate_slab_cache(kmalloc_caches + 9);
 }
 #else



^ permalink raw reply related

* Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
From: Herbert Xu @ 2007-08-24 23:11 UTC (permalink / raw)
  To: David Miller
  Cc: hadi, billfink, rick.jones2, krkumar2, gaagaan, general, jagana,
	jeff, johnpol, kaber, mcarlson, mchan, netdev,
	peter.p.waskiewicz.jr, rdreier, Robert.Olsson, shemminger, sri,
	tgraf, xma
In-Reply-To: <20070824.142503.30177455.davem@davemloft.net>

On Fri, Aug 24, 2007 at 02:25:03PM -0700, David Miller wrote:
>
> My hunch is that even if in the non-TSO case the TX packets were all
> back to back in the cards TX ring, TSO still spits them out faster on
> the wire.

If this is the case then we should see an improvement by
disabling TSO and enabling GSO.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: akepner @ 2007-08-24 22:06 UTC (permalink / raw)
  To: David Miller
  Cc: jchapman, shemminger, ossthema, netdev, raisch, themann,
	linux-kernel, linuxppc-dev, meder, tklein, stefan.roscher
In-Reply-To: <20070824.144711.18301866.davem@davemloft.net>

On Fri, Aug 24, 2007 at 02:47:11PM -0700, David Miller wrote:

> ....
> Someone should reference that thread _now_ before this discussion goes
> too far and we repeat a lot of information ......

Here's part of the thread:
http://marc.info/?t=111595306000001&r=1&w=2

Also, Jamal's paper may be of interest - Google for ""when napi comes 
to town".

-- 
Arthur


^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: Linas Vepstas @ 2007-08-24 21:51 UTC (permalink / raw)
  To: David Miller
  Cc: dlstevens, tklein, themann, stefan.roscher, netdev, linux-kernel,
	raisch, netdev-owner, linuxppc-dev, akepner, meder, ossthema,
	shemminger
In-Reply-To: <20070824.144436.59664160.davem@davemloft.net>

On Fri, Aug 24, 2007 at 02:44:36PM -0700, David Miller wrote:
> From: David Stevens <dlstevens@us.ibm.com>
> Date: Fri, 24 Aug 2007 09:50:58 -0700
> 
> >         Problem is if it increases rapidly, you may drop packets
> > before you notice that the ring is full in the current estimated
> > interval.
> 
> This is one of many reasons why hardware interrupt mitigation
> is really needed for this.

When turning off interrupts, don't turn them *all* off.
Leave the queue-full interrupt always on.

--linas

^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: David Miller @ 2007-08-24 21:47 UTC (permalink / raw)
  To: jchapman
  Cc: shemminger, ossthema, akepner, netdev, raisch, themann,
	linux-kernel, linuxppc-dev, meder, tklein, stefan.roscher
In-Reply-To: <46CF127D.1090609@katalix.com>

From: James Chapman <jchapman@katalix.com>
Date: Fri, 24 Aug 2007 18:16:45 +0100

> Does hardware interrupt mitigation really interact well with NAPI?

It interacts quite excellently.

There was a long saga about this with tg3 and huge SGI numa
systems with large costs for interrupt processing, and the
fix was to do a minimal amount of interrupt mitigation and
this basically cleared up all the problems.

Someone should reference that thread _now_ before this discussion goes
too far and we repeat a lot of information and people like myself have
to stay up all night correcting the misinformation and
misunderstandings that are basically guarenteed for this topic :)

^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: David Miller @ 2007-08-24 21:44 UTC (permalink / raw)
  To: dlstevens
  Cc: shemminger, akepner, linux-kernel, linuxppc-dev, meder, netdev,
	netdev-owner, ossthema, raisch, stefan.roscher, themann, tklein
In-Reply-To: <OF0002C3DB.2E4C4A38-ON88257341.005B1253-88257341.005C7C2A@us.ibm.com>

From: David Stevens <dlstevens@us.ibm.com>
Date: Fri, 24 Aug 2007 09:50:58 -0700

>         Problem is if it increases rapidly, you may drop packets
> before you notice that the ring is full in the current estimated
> interval.

This is one of many reasons why hardware interrupt mitigation
is really needed for this.

^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: David Miller @ 2007-08-24 21:43 UTC (permalink / raw)
  To: linas
  Cc: ossthema, netdev, tklein, themann, linux-kernel, linuxppc-dev,
	raisch, meder, stefan.roscher
In-Reply-To: <20070824164541.GG4282@austin.ibm.com>

From: linas@austin.ibm.com (Linas Vepstas)
Date: Fri, 24 Aug 2007 11:45:41 -0500

> In the end, I just let it be, and let the system work as a
> busy-beaver, with the high interrupt rate. Is this a wise thing to
> do?

The tradeoff is always going to be latency vs. throughput.

A sane default should defer enough to catch multiple packets coming in
at something close to line rate, but not so much that latency unduly
suffers.

^ permalink raw reply

* [PATCH] via-velocity: more cleanup
From: Stephen Hemminger @ 2007-08-24 21:40 UTC (permalink / raw)
  To: Al Viro; +Cc: Francois Romieu, netdev
In-Reply-To: <20070824211547.GW21089@ftp.linux.org.uk>

Per Al's suggestion, get rid of the stupid stuff:
Remove cam_type switch,
And deinline things that aren't important for speed.
And make big macro and inline.
And remove some dead/unused code.
And use const char * for chip name.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>


--- a/drivers/net/via-velocity.c	2007-08-24 13:49:17.000000000 -0700
+++ b/drivers/net/via-velocity.c	2007-08-24 14:39:14.000000000 -0700
@@ -85,6 +85,163 @@
 static int velocity_nics = 0;
 static int msglevel = MSG_LEVEL_INFO;
 
+/**
+ *	mac_get_cam_mask	-	Read a CAM mask
+ *	@regs: register block for this velocity
+ *	@mask: buffer to store mask
+ *
+ *	Fetch the mask bits of the selected CAM and store them into the
+ *	provided mask buffer.
+ */
+
+static void mac_get_cam_mask(struct mac_regs __iomem * regs, u8 * mask)
+{
+	int i;
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_MASK, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	writeb(0, &regs->CAMADDR);
+
+	/* read mask */
+	for (i = 0; i < 8; i++)
+		*mask++ = readb(&(regs->MARCAM[i]));
+
+	/* disable CAMEN */
+	writeb(0, &regs->CAMADDR);
+
+	/* Select mar */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+}
+
+
+/**
+ *	mac_set_cam_mask	-	Set a CAM mask
+ *	@regs: register block for this velocity
+ *	@mask: CAM mask to load
+ *
+ *	Store a new mask into a CAM
+ */
+
+static void mac_set_cam_mask(struct mac_regs __iomem * regs, u8 * mask)
+{
+	int i;
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_MASK, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	writeb(CAMADDR_CAMEN, &regs->CAMADDR);
+
+	for (i = 0; i < 8; i++) {
+		writeb(*mask++, &(regs->MARCAM[i]));
+	}
+	/* disable CAMEN */
+	writeb(0, &regs->CAMADDR);
+
+	/* Select mar */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+}
+
+static void mac_set_vlan_cam_mask(struct mac_regs __iomem * regs, u8 * mask)
+{
+	int i;
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_MASK, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL, &regs->CAMADDR);
+
+	for (i = 0; i < 8; i++) {
+		writeb(*mask++, &(regs->MARCAM[i]));
+	}
+	/* disable CAMEN */
+	writeb(0, &regs->CAMADDR);
+
+	/* Select mar */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+}
+
+/**
+ *	mac_set_cam	-	set CAM data
+ *	@regs: register block of this velocity
+ *	@idx: Cam index
+ *	@addr: 2 or 6 bytes of CAM data
+ *
+ *	Load an address or vlan tag into a CAM
+ */
+
+static void mac_set_cam(struct mac_regs __iomem * regs, int idx, const u8 *addr)
+{
+	int i;
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_DATA, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	idx &= (64 - 1);
+
+	writeb(CAMADDR_CAMEN | idx, &regs->CAMADDR);
+
+	for (i = 0; i < 6; i++) {
+		writeb(*addr++, &(regs->MARCAM[i]));
+	}
+	BYTE_REG_BITS_ON(CAMCR_CAMWR, &regs->CAMCR);
+
+	udelay(10);
+
+	writeb(0, &regs->CAMADDR);
+
+	/* Select mar */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+}
+
+static void mac_set_vlan_cam(struct mac_regs __iomem * regs, int idx,
+			     const u8 *addr)
+{
+
+	/* Select CAM mask */
+	BYTE_REG_BITS_SET(CAMCR_PS_CAM_DATA, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+
+	idx &= (64 - 1);
+
+	writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL | idx, &regs->CAMADDR);
+	writew(*((u16 *) addr), &regs->MARCAM[0]);
+
+	BYTE_REG_BITS_ON(CAMCR_CAMWR, &regs->CAMCR);
+
+	udelay(10);
+
+	writeb(0, &regs->CAMADDR);
+
+	/* Select mar */
+	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+}
+
+
+/**
+ *	mac_wol_reset	-	reset WOL after exiting low power
+ *	@regs: register block of this velocity
+ *
+ *	Called after we drop out of wake on lan mode in order to
+ *	reset the Wake on lan features. This function doesn't restore
+ *	the rest of the logic from the result of sleep/wakeup
+ */
+
+static void mac_wol_reset(struct mac_regs __iomem * regs)
+{
+
+	/* Turn off SWPTAG right after leaving power mode */
+	BYTE_REG_BITS_OFF(STICKHW_SWPTAG, &regs->STICKHW);
+	/* clear sticky bits */
+	BYTE_REG_BITS_OFF((STICKHW_DS1 | STICKHW_DS0), &regs->STICKHW);
+
+	BYTE_REG_BITS_OFF(CHIPGCR_FCGMII, &regs->CHIPGCR);
+	BYTE_REG_BITS_OFF(CHIPGCR_FCMODE, &regs->CHIPGCR);
+	/* disable force PME-enable */
+	writeb(WOLCFG_PMEOVR, &regs->WOLCFGClr);
+	/* disable power-event config bit */
+	writew(0xFFFF, &regs->WOLCRClr);
+	/* clear power status */
+	writew(0xFFFF, &regs->WOLSRClr);
+}
 
 static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
 static const struct ethtool_ops velocity_ethtool_ops;
@@ -309,7 +466,7 @@ MODULE_DEVICE_TABLE(pci, velocity_id_tab
  *	a pointer a static string valid while the driver is loaded.
  */
 
-static char __devinit *get_chip_name(enum chip_type chip_id)
+static const char __devinit *get_chip_name(enum chip_type chip_id)
 {
 	int i;
 	for (i = 0; chip_info_table[i].name != NULL; i++)
@@ -458,8 +615,8 @@ static void velocity_init_cam_filter(str
 	/* Disable all CAMs */
 	memset(vptr->vCAMmask, 0, sizeof(u8) * 8);
 	memset(vptr->mCAMmask, 0, sizeof(u8) * 8);
-	mac_set_cam_mask(regs, vptr->vCAMmask, VELOCITY_VLAN_ID_CAM);
-	mac_set_cam_mask(regs, vptr->mCAMmask, VELOCITY_MULTICAST_CAM);
+	mac_set_vlan_cam_mask(regs, vptr->vCAMmask);
+	mac_set_cam_mask(regs, vptr->mCAMmask);
 
 	/* Enable first VCAM */
 	if (vptr->vlgrp) {
@@ -471,17 +628,16 @@ static void velocity_init_cam_filter(str
 				if (vid != 0)
 					WORD_REG_BITS_ON(MCFG_RTGOPT, &regs->MCFG);
 
-				mac_set_cam(regs, 0, (u8 *) &vid,
-					    VELOCITY_VLAN_ID_CAM);
+				mac_set_vlan_cam(regs, 0, (u8 *) &vid);
 			}
 		}
 		vptr->vCAMmask[0] |= 1;
-		mac_set_cam_mask(regs, vptr->vCAMmask, VELOCITY_VLAN_ID_CAM);
+		mac_set_vlan_cam_mask(regs, vptr->vCAMmask);
 	} else {
 		u16 temp = 0;
-		mac_set_cam(regs, 0, (u8 *) &temp, VELOCITY_VLAN_ID_CAM);
+		mac_set_vlan_cam(regs, 0, (u8 *) &temp);
 		temp = 1;
-		mac_set_cam_mask(regs, (u8 *) &temp, VELOCITY_VLAN_ID_CAM);
+		mac_set_vlan_cam_mask(regs, (u8 *) &temp);
 	}
 }
 
@@ -2136,14 +2292,14 @@ static void velocity_set_multi(struct ne
 		rx_mode = (RCR_AM | RCR_AB);
 	} else {
 		int offset = MCAM_SIZE - vptr->multicast_limit;
-		mac_get_cam_mask(regs, vptr->mCAMmask, VELOCITY_MULTICAST_CAM);
+		mac_get_cam_mask(regs, vptr->mCAMmask);
 
 		for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; i++, mclist = mclist->next) {
-			mac_set_cam(regs, i + offset, mclist->dmi_addr, VELOCITY_MULTICAST_CAM);
+			mac_set_cam(regs, i + offset, mclist->dmi_addr);
 			vptr->mCAMmask[(offset + i) / 8] |= 1 << ((offset + i) & 7);
 		}
 
-		mac_set_cam_mask(regs, vptr->mCAMmask, VELOCITY_MULTICAST_CAM);
+		mac_set_cam_mask(regs, vptr->mCAMmask);
 		rx_mode = (RCR_AM | RCR_AB);
 	}
 	if (dev->mtu > 1500)
--- a/drivers/net/via-velocity.h	2007-08-24 13:49:17.000000000 -0700
+++ b/drivers/net/via-velocity.h	2007-08-24 14:29:09.000000000 -0700
@@ -1173,7 +1173,7 @@ enum chip_type {
 
 struct velocity_info_tbl {
 	enum chip_type chip_id;
-	char *name;
+	const char *name;
 	int txqueue;
 	u32 flags;
 };
@@ -1194,14 +1194,6 @@ struct velocity_info_tbl {
 #define mac_disable_int(regs)       	writel(CR0_GINTMSK1,&((regs)->CR0Clr))
 #define mac_enable_int(regs)    	writel(CR0_GINTMSK1,&((regs)->CR0Set))
 
-#define mac_hw_mibs_read(regs, MIBs) {\
-	int i;\
-	BYTE_REG_BITS_ON(MIBCR_MPTRINI,&((regs)->MIBCR));\
-	for (i=0;i<HW_MIB_SIZE;i++) {\
-		(MIBs)[i]=readl(&((regs)->MIBData));\
-	}\
-}
-
 #define mac_set_dma_length(regs, n) {\
 	BYTE_REG_BITS_SET((n),0x07,&((regs)->DCFG));\
 }
@@ -1226,195 +1218,17 @@ struct velocity_info_tbl {
 	writew(TRDCSR_WAK<<(n*4),&((regs)->TDCSRSet));\
 }
 
-#define mac_eeprom_reload(regs) {\
-	int i=0;\
-	BYTE_REG_BITS_ON(EECSR_RELOAD,&((regs)->EECSR));\
-	do {\
-		udelay(10);\
-		if (i++>0x1000) {\
-			break;\
-		}\
-	}while (BYTE_REG_BITS_IS_ON(EECSR_RELOAD,&((regs)->EECSR)));\
-}
-
-enum velocity_cam_type {
-	VELOCITY_VLAN_ID_CAM = 0,
-	VELOCITY_MULTICAST_CAM
-};
-
-/**
- *	mac_get_cam_mask	-	Read a CAM mask
- *	@regs: register block for this velocity
- *	@mask: buffer to store mask
- *	@cam_type: CAM to fetch
- *
- *	Fetch the mask bits of the selected CAM and store them into the
- *	provided mask buffer.
- */
-
-static inline void mac_get_cam_mask(struct mac_regs __iomem * regs, u8 * mask, enum velocity_cam_type cam_type)
-{
-	int i;
-	/* Select CAM mask */
-	BYTE_REG_BITS_SET(CAMCR_PS_CAM_MASK, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
-
-	if (cam_type == VELOCITY_VLAN_ID_CAM)
-		writeb(CAMADDR_VCAMSL, &regs->CAMADDR);
-	else
-		writeb(0, &regs->CAMADDR);
-
-	/* read mask */
-	for (i = 0; i < 8; i++)
-		*mask++ = readb(&(regs->MARCAM[i]));
-
-	/* disable CAMEN */
-	writeb(0, &regs->CAMADDR);
-
-	/* Select mar */
-	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
-
-}
-
-/**
- *	mac_set_cam_mask	-	Set a CAM mask
- *	@regs: register block for this velocity
- *	@mask: CAM mask to load
- *	@cam_type: CAM to store
- *
- *	Store a new mask into a CAM
- */
-
-static inline void mac_set_cam_mask(struct mac_regs __iomem * regs, u8 * mask, enum velocity_cam_type cam_type)
-{
-	int i;
-	/* Select CAM mask */
-	BYTE_REG_BITS_SET(CAMCR_PS_CAM_MASK, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
-
-	if (cam_type == VELOCITY_VLAN_ID_CAM)
-		writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL, &regs->CAMADDR);
-	else
-		writeb(CAMADDR_CAMEN, &regs->CAMADDR);
-
-	for (i = 0; i < 8; i++) {
-		writeb(*mask++, &(regs->MARCAM[i]));
-	}
-	/* disable CAMEN */
-	writeb(0, &regs->CAMADDR);
-
-	/* Select mar */
-	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
-}
-
-/**
- *	mac_set_cam	-	set CAM data
- *	@regs: register block of this velocity
- *	@idx: Cam index
- *	@addr: 2 or 6 bytes of CAM data
- *	@cam_type: CAM to load
- *
- *	Load an address or vlan tag into a CAM
- */
-
-static inline void mac_set_cam(struct mac_regs __iomem * regs, int idx, u8 *addr, enum velocity_cam_type cam_type)
-{
-	int i;
-
-	/* Select CAM mask */
-	BYTE_REG_BITS_SET(CAMCR_PS_CAM_DATA, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
-
-	idx &= (64 - 1);
-
-	if (cam_type == VELOCITY_VLAN_ID_CAM)
-		writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL | idx, &regs->CAMADDR);
-	else
-		writeb(CAMADDR_CAMEN | idx, &regs->CAMADDR);
-
-	if (cam_type == VELOCITY_VLAN_ID_CAM)
-		writew(*((u16 *) addr), &regs->MARCAM[0]);
-	else {
-		for (i = 0; i < 6; i++) {
-			writeb(*addr++, &(regs->MARCAM[i]));
-		}
-	}
-	BYTE_REG_BITS_ON(CAMCR_CAMWR, &regs->CAMCR);
-
-	udelay(10);
-
-	writeb(0, &regs->CAMADDR);
-
-	/* Select mar */
-	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
-}
-
-/**
- *	mac_get_cam	-	fetch CAM data
- *	@regs: register block of this velocity
- *	@idx: Cam index
- *	@addr: buffer to hold up to 6 bytes of CAM data
- *	@cam_type: CAM to load
- *
- *	Load an address or vlan tag from a CAM into the buffer provided by
- *	the caller. VLAN tags are 2 bytes the address cam entries are 6.
- */
+static inline void mac_eeprom_reload(struct mac_regs __iomem * regs) {
+	int i=0;
 
-static inline void mac_get_cam(struct mac_regs __iomem * regs, int idx, u8 *addr, enum velocity_cam_type cam_type)
-{
-	int i;
-
-	/* Select CAM mask */
-	BYTE_REG_BITS_SET(CAMCR_PS_CAM_DATA, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
-
-	idx &= (64 - 1);
-
-	if (cam_type == VELOCITY_VLAN_ID_CAM)
-		writeb(CAMADDR_CAMEN | CAMADDR_VCAMSL | idx, &regs->CAMADDR);
-	else
-		writeb(CAMADDR_CAMEN | idx, &regs->CAMADDR);
-
-	BYTE_REG_BITS_ON(CAMCR_CAMRD, &regs->CAMCR);
-
-	udelay(10);
-
-	if (cam_type == VELOCITY_VLAN_ID_CAM)
-		*((u16 *) addr) = readw(&(regs->MARCAM[0]));
-	else
-		for (i = 0; i < 6; i++, addr++)
-			*((u8 *) addr) = readb(&(regs->MARCAM[i]));
-
-	writeb(0, &regs->CAMADDR);
-
-	/* Select mar */
-	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
+	BYTE_REG_BITS_ON(EECSR_RELOAD,&(regs->EECSR));
+	do {
+		udelay(10);
+		if (i++>0x1000)
+			break;
+	} while (BYTE_REG_BITS_IS_ON(EECSR_RELOAD,&(regs->EECSR)));
 }
 
-/**
- *	mac_wol_reset	-	reset WOL after exiting low power
- *	@regs: register block of this velocity
- *
- *	Called after we drop out of wake on lan mode in order to
- *	reset the Wake on lan features. This function doesn't restore
- *	the rest of the logic from the result of sleep/wakeup
- */
-
-static inline void mac_wol_reset(struct mac_regs __iomem * regs)
-{
-
-	/* Turn off SWPTAG right after leaving power mode */
-	BYTE_REG_BITS_OFF(STICKHW_SWPTAG, &regs->STICKHW);
-	/* clear sticky bits */
-	BYTE_REG_BITS_OFF((STICKHW_DS1 | STICKHW_DS0), &regs->STICKHW);
-
-	BYTE_REG_BITS_OFF(CHIPGCR_FCGMII, &regs->CHIPGCR);
-	BYTE_REG_BITS_OFF(CHIPGCR_FCMODE, &regs->CHIPGCR);
-	/* disable force PME-enable */
-	writeb(WOLCFG_PMEOVR, &regs->WOLCFGClr);
-	/* disable power-event config bit */
-	writew(0xFFFF, &regs->WOLCRClr);
-	/* clear power status */
-	writew(0xFFFF, &regs->WOLSRClr);
-}
-
-
 /*
  * Header for WOL definitions. Used to compute hashes
  */

^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: David Miller @ 2007-08-24 21:37 UTC (permalink / raw)
  To: ossthema
  Cc: netdev, raisch, themann, linux-kernel, linuxppc-dev, meder,
	tklein, stefan.roscher
In-Reply-To: <200708241559.17055.ossthema@de.ibm.com>

From: Jan-Bernd Themann <ossthema@de.ibm.com>
Date: Fri, 24 Aug 2007 15:59:16 +0200

> 1) The current implementation of netif_rx_schedule, netif_rx_complete
>    and the net_rx_action have the following problem: netif_rx_schedule
>    sets the NAPI_STATE_SCHED flag and adds the NAPI instance to the poll_list.
>    netif_rx_action checks NAPI_STATE_SCHED, if set it will add the device
>    to the poll_list again (as well). netif_rx_complete clears the NAPI_STATE_SCHED.
>    If an interrupt handler calls netif_rx_schedule on CPU 2
>    after netif_rx_complete has been called on CPU 1 (and the poll function 
>    has not returned yet), the NAPI instance will be added twice to the 
>    poll_list (by netif_rx_schedule and net_rx_action). Problems occur when 
>    netif_rx_complete is called twice for the device (BUG() called)

Indeed, this is the "who should manage the list" problem.
Probably the answer is that whoever transitions the NAPI_STATE_SCHED
bit from cleared to set should do the list addition.

Patches welcome :-)

> 3) On modern systems the incoming packets are processed very fast. Especially
>    on SMP systems when we use multiple queues we process only a few packets
>    per napi poll cycle. So NAPI does not work very well here and the interrupt 
>    rate is still high. What we need would be some sort of timer polling mode 
>    which will schedule a device after a certain amount of time for high load 
>    situations. With high precision timers this could work well. Current
>    usual timers are too slow. A finer granularity would be needed to keep the
>    latency down (and queue length moderate).

This is why minimal levels of HW interrupt mitigation should be enabled
in your chip.  If it does not support this, you will indeed need to look
into using high resolution timers or other schemes to alleviate this.

I do not think it deserves a generic core networking helper facility,
the chips that can't mitigate interrupts are few and obscure.

^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: Linas Vepstas @ 2007-08-24 21:35 UTC (permalink / raw)
  To: Jan-Bernd Themann
  Cc: Bodo Eggert, netdev, Thomas Klein, Jan-Bernd Themann,
	linux-kernel, linux-ppc, Christoph Raisch, Marcus Eder,
	Stefan Roscher
In-Reply-To: <46CF499C.60009@de.ibm.com>

On Fri, Aug 24, 2007 at 11:11:56PM +0200, Jan-Bernd Themann wrote:
> (when they are available for
> POWER in our case). 

hrtimer worked fine on the powerpc cell arch last summer.
I assume they work on p5 and p6 too, no ??

> I tried to implement something with "normal" timers, but the result
> was everything but great. The timers seem to be far too slow.
> I'm not sure if it helps to increase it from 1000HZ to 2500HZ
> or more.

Heh. Do the math. Even on 1gigabit cards, that's not enough:

(1gigabit/sec) x (byte/8 bits) x (packet/1500bytes) x (sec/1000 jiffy) 

is 83 packets a jiffy (for big packets, even more for small packets, 
and more again for 10 gigabit cards). So polling once per jiffy is a 
latency disaster.

--linas  


^ permalink raw reply

* Re: RFC: issues concerning the next NAPI interface
From: David Miller @ 2007-08-24 21:32 UTC (permalink / raw)
  To: ossthema
  Cc: netdev, raisch, themann, linux-kernel, linuxppc-dev, meder,
	tklein, stefan.roscher
In-Reply-To: <200708241559.17055.ossthema@de.ibm.com>

From: Jan-Bernd Themann <ossthema@de.ibm.com>
Date: Fri, 24 Aug 2007 15:59:16 +0200

>    It would be nice if it is possible to schedule queues to other CPU's, or
>    at least to use interrupts to put the queue to another cpu (not nice for 
>    as you never know which one you will hit). 
>    I'm not sure how bad the tradeoff would be.

Once the per-cpu NAPI poll queues start needing locks, much of the
gain will be lost.  This is strictly what we want to avoid.

We need real facilities for IRQ distribution policies.  With that none
of this is an issue.

This is also a platform specific problem with IRQ behavior, the IRQ
distibution scheme you mention would never occur on sparc64 for
example.  We use a fixed round-robin distribution of interrupts to
CPUS there, they don't move.

Each scheme has it's advantages, but you want a difference scheme here
than what is implemented and the fix is therefore not in the
networking :-)

Furthermore, most cards that will be using multi-queue will be
using hashes on the packet headers to choose the MSI-X interrupt
and thus the cpu to be targetted.  Those cards will want fixed
instead of dynamic interrupt to cpu distribution schemes as well,
so your problem is not unique and they'll need the same fix as
you do.

^ permalink raw reply

* [ofa-general] Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
From: David Miller @ 2007-08-24 21:25 UTC (permalink / raw)
  To: hadi
  Cc: jagana, billfink, peter.p.waskiewicz.jr, herbert, gaagaan,
	Robert.Olsson, netdev, rdreier, mcarlson, jeff, general, mchan,
	tgraf, johnpol, shemminger, kaber, sri
In-Reply-To: <1187957657.4255.35.camel@localhost>

From: jamal <hadi@cyberus.ca>
Date: Fri, 24 Aug 2007 08:14:16 -0400

> Seems the receive side of the sender is also consuming a lot more cpu
> i suspect because receiver is generating a lot more ACKs with TSO.

I've seen this behavior before on a low cpu powered receiver and the
issue is that batching too much actually hurts a receiver.

If the data packets were better spaced out, the receive would handle
the load better.

This is the thing the TOE guys keep talking about overcoming with
their packet pacing algorithms in their on-card TOE stack.

My hunch is that even if in the non-TSO case the TX packets were all
back to back in the cards TX ring, TSO still spits them out faster on
the wire.

^ permalink raw reply

* Re: [Devel] [PATCH 1/1] Dynamically allocate the loopback device
From: Denis V. Lunev @ 2007-08-24 21:24 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Denis V. Lunev, containers, netdev, davem
In-Reply-To: <20070824104301.2f4ff34e@localhost>

no, and this is important. Loopback is initialized in fs_initcall which
is called sufficiently before module_init.

I have checked the code and do not see initialization order mistakes
right now. But, from now on, maintainer should pay attention for this
unfortunate consequence :(

Regards,
    Den

Stephen Hemminger wrote:
> On Fri, 24 Aug 2007 19:55:47 +0400
> "Denis V. Lunev" <dlunev@gmail.com> wrote:
> 
>> dlezcano@fr.ibm.com wrote:
>>> From: Daniel Lezcano <dlezcano@fr.ibm.com>
>>>
>>> Doing this makes loopback.c a better example of how to do a
>>> simple network device, and it removes the special case
>>> single static allocation of a struct net_device, hopefully
>>> making maintenance easier.
>>>
>>> Applies against net-2.6.24
>>>
>>> Tested on i386, x86_64
>>> Compiled on ia64, sparc
>> I think that a small note, that initialization order is changed will be
>> good to record. After this, loopback MUST be allocated before any other
>> networking subsystem initialization. And this is an important change.
>>
>> Regards,
>>     Den
> 
> Yes, this code would break when other drivers are directly linked
> in. 
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
> 
> _______________________________________________
> Devel mailing list
> Devel@openvz.org
> https://openvz.org/mailman/listinfo/devel
> 


^ permalink raw reply

* Re: [PATCH] via-velocity: use standard VLAN interface (resend)
From: Al Viro @ 2007-08-24 21:15 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Francois Romieu, netdev
In-Reply-To: <20070824135649.509e1fe7@freepuppy.rosehill.hemminger.net>

On Fri, Aug 24, 2007 at 01:56:49PM -0700, Stephen Hemminger wrote:

>  static void velocity_init_cam_filter(struct velocity_info *vptr)
>  {
>  	struct mac_regs __iomem * regs = vptr->mac_regs;
> +	unsigned short vid;
  
> -		mac_set_cam(regs, 0, (u8 *) & (vptr->options.vid), VELOCITY_VLAN_ID_CAM);
> +				mac_set_cam(regs, 0, (u8 *) &vid,
> +					    VELOCITY_VLAN_ID_CAM);

This mac_set_cam() dreck should be split in two properly typed functions.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox