2006-08-13 12:57:31

by Denys Vlasenko

[permalink] [raw]
Subject: [PATCH 0/4] aic7xxx: remove excessive inlining

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


2006-08-13 12:59:03

by Denys Vlasenko

[permalink] [raw]
Subject: [PATCH 1/4] aic7xxx: remove excessive inlining

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


Attachments:
(No filename) (185.00 B)
1.__inline.diff.bz2 (8.88 kB)
Download all attachments

2006-08-13 13:02:19

by Denys Vlasenko

[permalink] [raw]
Subject: [PATCH 2/4] aic7xxx: remove excessive inlining

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


Attachments:
(No filename) (291.00 B)
2.deinline.diff.bz2 (13.12 kB)
Download all attachments

2006-08-13 13:03:19

by Denys Vlasenko

[permalink] [raw]
Subject: [PATCH 3/4] aic7xxx: remove excessive inlining

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

2006-08-13 13:06:07

by Denys Vlasenko

[permalink] [raw]
Subject: [PATCH 4/4] aic7xxx: remove excessive inlining

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


Attachments:
(No filename) (367.00 B)
4.inb_order.diff (716.00 B)
Download all attachments

2006-08-13 13:05:58

by Denys Vlasenko

[permalink] [raw]
Subject: Re: [PATCH 3/4] aic7xxx: remove excessive inlining

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


Attachments:
(No filename) (294.00 B)
3.UNUSED.diff (1.10 kB)
Download all attachments

2006-08-14 23:14:40

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 0/4] aic7xxx: remove excessive inlining

On Sun, 13 Aug 2006 14:57:21 +0200
Denis Vlasenko <[email protected]> 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.

2006-08-14 23:22:25

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH 0/4] aic7xxx: remove excessive inlining

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

> On Sun, 13 Aug 2006 14:57:21 +0200
> Denis Vlasenko <[email protected]> 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

2006-08-15 16:20:33

by Denys Vlasenko

[permalink] [raw]
Subject: Re: [PATCH 0/4] aic7xxx: remove excessive inlining

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 <[email protected]> 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