linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] aic7xxx: remove excessive inlining
@ 2006-08-13 12:57 Denis Vlasenko
  2006-08-13 12:58 ` [PATCH 1/4] " Denis Vlasenko
  2006-08-14 23:14 ` [PATCH 0/4] " Andrew Morton
  0 siblings, 2 replies; 9+ messages in thread
From: Denis Vlasenko @ 2006-08-13 12:57 UTC (permalink / raw)
  To: linux-scsi, linux-kernel

Hello,

This is a resend. I had these patches run-tested
at the time of first submission. Now I have no hardware
to test them. I think that they are still fine, though.

Basically, patches deinline some functions, mainly those
which perform port I/O. They shave off ~55k on AMD64:

# x86_64-pc-linux-gnu-size linux-2.6.17.8_64*/vmlinux
   text    data     bss     dec     hex filename
4632627 1222698  468392 6323717  607e05 linux-2.6.17.8_64/vmlinux
4571327 1223274  468392 6262993  5f90d1 linux-2.6.17.8_64aic/vmlinux

# x86_64-pc-linux-gnu-size linux-2.6.17.8_64*/drivers/scsi/aic7xxx/aic7*xx.o
   text    data     bss     dec     hex filename
 135543   13521     628  149692   248bc linux-2.6.17.8_64/drivers/scsi/aic7xxx/aic79xx.o
 103291   22289     560  126140   1ecbc linux-2.6.17.8_64/drivers/scsi/aic7xxx/aic7xxx.o
  90083   13521     628  104232   19728 linux-2.6.17.8_64aic/drivers/scsi/aic7xxx/aic79xx.o
  87231   22289     560  110080   1ae00 linux-2.6.17.8_64aic/drivers/scsi/aic7xxx/aic7xxx.o
--
vda

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] aic7xxx: remove excessive inlining
  2006-08-13 12:57 [PATCH 0/4] aic7xxx: remove excessive inlining Denis Vlasenko
@ 2006-08-13 12:58 ` Denis Vlasenko
  2006-08-13 13:02   ` [PATCH 2/4] " Denis Vlasenko
  2006-08-14 23:14 ` [PATCH 0/4] " Andrew Morton
  1 sibling, 1 reply; 9+ messages in thread
From: Denis Vlasenko @ 2006-08-13 12:58 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel

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

On Sunday 13 August 2006 14:57, Denis Vlasenko wrote:
> Basically, patches deinline some functions, mainly those
> which perform port I/O.

Preparatory patch. s/__inline/inline.
--
vda

[-- Attachment #2: 1.__inline.diff.bz2 --]
[-- Type: application/x-bzip2, Size: 9088 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/4] aic7xxx: remove excessive inlining
  2006-08-13 12:58 ` [PATCH 1/4] " Denis Vlasenko
@ 2006-08-13 13:02   ` Denis Vlasenko
  2006-08-13 13:03     ` [PATCH 3/4] " Denis Vlasenko
  0 siblings, 1 reply; 9+ messages in thread
From: Denis Vlasenko @ 2006-08-13 13:02 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel

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

On Sunday 13 August 2006 14:58, Denis Vlasenko wrote:
> Basically, patches deinline some functions, mainly those
> which perform port I/O.

The bulk of deinlining is done here.

Also simplifies ahc_delay() and replaces run-time
checks in ahX_pci_read_config() with compile-time ones.
--
vda

[-- Attachment #2: 2.deinline.diff.bz2 --]
[-- Type: application/x-bzip2, Size: 13433 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/4] aic7xxx: remove excessive inlining
  2006-08-13 13:02   ` [PATCH 2/4] " Denis Vlasenko
@ 2006-08-13 13:03     ` Denis Vlasenko
  2006-08-13 13:05       ` Denis Vlasenko
  2006-08-13 13:05       ` [PATCH 4/4] " Denis Vlasenko
  0 siblings, 2 replies; 9+ messages in thread
From: Denis Vlasenko @ 2006-08-13 13:03 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel

On Sunday 13 August 2006 15:02, Denis Vlasenko wrote:
> Basically, patches deinline some functions, mainly those
> which perform port I/O.

ahd_suspend/resume are not used. #ifdef them out.
--
vda

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/4] aic7xxx: remove excessive inlining
  2006-08-13 13:03     ` [PATCH 3/4] " Denis Vlasenko
@ 2006-08-13 13:05       ` Denis Vlasenko
  2006-08-13 13:05       ` [PATCH 4/4] " Denis Vlasenko
  1 sibling, 0 replies; 9+ messages in thread
From: Denis Vlasenko @ 2006-08-13 13:05 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel

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

On Sunday 13 August 2006 15:03, Denis Vlasenko wrote:
> On Sunday 13 August 2006 15:02, Denis Vlasenko wrote:
> > Basically, patches deinline some functions, mainly those
> > which perform port I/O.
> 
> ahd_suspend/resume are not used. #ifdef them out.

I forgot to attach the file. :(
--
vda

[-- Attachment #2: 3.UNUSED.diff --]
[-- Type: text/x-diff, Size: 1130 bytes --]

diff -urpN -U4 linux-2.6.17.8.aic2/drivers/scsi/aic7xxx/aic79xx_core.c linux-2.6.17.8.aic3/drivers/scsi/aic7xxx/aic79xx_core.c
--- linux-2.6.17.8.aic2/drivers/scsi/aic7xxx/aic79xx_core.c	2006-08-13 12:01:38.000000000 +0200
+++ linux-2.6.17.8.aic3/drivers/scsi/aic7xxx/aic79xx_core.c	2006-08-13 12:01:42.000000000 +0200
@@ -7681,8 +7681,9 @@ ahd_pause_and_flushwork(struct ahd_softc
 
 	ahd->flags &= ~AHD_ALL_INTERRUPTS;
 }
 
+#ifdef UNUSED
 int
 ahd_suspend(struct ahd_softc *ahd)
 {
 
@@ -7704,16 +7705,17 @@ ahd_resume(struct ahd_softc *ahd)
 	ahd_intr_enable(ahd, TRUE); 
 	ahd_restart(ahd);
 	return (0);
 }
+#endif
 
 /************************** Busy Target Table *********************************/
 /*
  * Set SCBPTR to the SCB that contains the busy
  * table entry for TCL.  Return the offset into
  * the SCB that contains the entry for TCL.
  * saved_scbid is dereferenced and set to the
- * scbid that should be restored once manipualtion
+ * scbid that should be restored once manipulation
  * of the TCL entry is complete.
  */
 static u_int
 ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 4/4] aic7xxx: remove excessive inlining
  2006-08-13 13:03     ` [PATCH 3/4] " Denis Vlasenko
  2006-08-13 13:05       ` Denis Vlasenko
@ 2006-08-13 13:05       ` Denis Vlasenko
  1 sibling, 0 replies; 9+ messages in thread
From: Denis Vlasenko @ 2006-08-13 13:05 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel

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

On Sunday 13 August 2006 15:03, Denis Vlasenko wrote:
> Basically, patches deinline some functions, mainly those
> which perform port I/O.

Comment says "Read high byte first as some registers increment..."
but code doesn't guarantee that, I think:
	return ((ahd_inb(ahd, port+1) << 8) | ahd_inb(ahd, port));
Compiler can reorder it.

Make the order explicit.
--
vda

[-- Attachment #2: 4.inb_order.diff --]
[-- Type: text/x-diff, Size: 716 bytes --]

diff -urpN -U4 linux-2.6.17.8.aic3/drivers/scsi/aic7xxx/aic79xx_core.c linux-2.6.17.8.aic4/drivers/scsi/aic7xxx/aic79xx_core.c
--- linux-2.6.17.8.aic3/drivers/scsi/aic7xxx/aic79xx_core.c	2006-08-13 12:01:42.000000000 +0200
+++ linux-2.6.17.8.aic4/drivers/scsi/aic7xxx/aic79xx_core.c	2006-08-13 12:14:13.000000000 +0200
@@ -341,9 +341,11 @@ ahd_inw(struct ahd_softc *ahd, u_int por
 	 * Read high byte first as some registers increment
 	 * or have other side effects when the low byte is
 	 * read.
 	 */
-	return ((ahd_inb(ahd, port+1) << 8) | ahd_inb(ahd, port));
+	uint16_t r = ahd_inb(ahd, port+1) << 8;
+	r |= ahd_inb(ahd, port);
+	return r;
 }
 
 void
 ahd_outw(struct ahd_softc *ahd, u_int port, u_int value)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] aic7xxx: remove excessive inlining
  2006-08-13 12:57 [PATCH 0/4] aic7xxx: remove excessive inlining Denis Vlasenko
  2006-08-13 12:58 ` [PATCH 1/4] " Denis Vlasenko
@ 2006-08-14 23:14 ` Andrew Morton
  2006-08-14 23:25   ` Randy.Dunlap
  1 sibling, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2006-08-14 23:14 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: linux-scsi, linux-kernel

On Sun, 13 Aug 2006 14:57:21 +0200
Denis Vlasenko <vda.linux@googlemail.com> wrote:

> This is a resend.

Please resend ;)

- All these patches had the same Subject:, thus forcing me to invent
  titles for you.  

- The changelogs are weird - think what they'll look like once they hit
  the git tree.  Someone will need to clean those changelogs up, and I'd
  prefer that it not be me.

- Missing Signed-off-by:'s.

http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt is here to help.

Thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] aic7xxx: remove excessive inlining
  2006-08-14 23:14 ` [PATCH 0/4] " Andrew Morton
@ 2006-08-14 23:25   ` Randy.Dunlap
  2006-08-15 16:20     ` Denis Vlasenko
  0 siblings, 1 reply; 9+ messages in thread
From: Randy.Dunlap @ 2006-08-14 23:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Denis Vlasenko, linux-scsi, linux-kernel

On Mon, 14 Aug 2006 16:14:34 -0700 Andrew Morton wrote:

> On Sun, 13 Aug 2006 14:57:21 +0200
> Denis Vlasenko <vda.linux@googlemail.com> wrote:
> 
> > This is a resend.
> 
> Please resend ;)
> 
> - All these patches had the same Subject:, thus forcing me to invent
>   titles for you.  
> 
> - The changelogs are weird - think what they'll look like once they
> hit the git tree.  Someone will need to clean those changelogs up,
> and I'd prefer that it not be me.
> 
> - Missing Signed-off-by:'s.
> 
> http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt is here to
> help.

Don't *zip them.

---
~Randy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] aic7xxx: remove excessive inlining
  2006-08-14 23:25   ` Randy.Dunlap
@ 2006-08-15 16:20     ` Denis Vlasenko
  0 siblings, 0 replies; 9+ messages in thread
From: Denis Vlasenko @ 2006-08-15 16:20 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Andrew Morton, linux-scsi, linux-kernel

On Tuesday 15 August 2006 01:25, Randy.Dunlap wrote:
> On Mon, 14 Aug 2006 16:14:34 -0700 Andrew Morton wrote:
> 
> > On Sun, 13 Aug 2006 14:57:21 +0200
> > Denis Vlasenko <vda.linux@googlemail.com> wrote:
> > 
> > > This is a resend.
> > 
> > Please resend ;)
> > 
> > - All these patches had the same Subject:, thus forcing me to invent
> >   titles for you.  
> > 
> > - The changelogs are weird - think what they'll look like once they
> > hit the git tree.  Someone will need to clean those changelogs up,
> > and I'd prefer that it not be me.
> > 
> > - Missing Signed-off-by:'s.
> > 
> > http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt is here to
> > help.
> 
> Don't *zip them.

Ok, resending to Andrew off-list.
--
vda

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-08-15 16:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-13 12:57 [PATCH 0/4] aic7xxx: remove excessive inlining Denis Vlasenko
2006-08-13 12:58 ` [PATCH 1/4] " Denis Vlasenko
2006-08-13 13:02   ` [PATCH 2/4] " Denis Vlasenko
2006-08-13 13:03     ` [PATCH 3/4] " Denis Vlasenko
2006-08-13 13:05       ` Denis Vlasenko
2006-08-13 13:05       ` [PATCH 4/4] " Denis Vlasenko
2006-08-14 23:14 ` [PATCH 0/4] " Andrew Morton
2006-08-14 23:25   ` Randy.Dunlap
2006-08-15 16:20     ` Denis Vlasenko

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).