[PATCH] CPM2: Fix totally bogus alignment handing of dpalloc

Clement Fabien Fabien.Clement at thomson.net
Thu Nov 24 23:51:46 EST 2005


Hi,

Some results: alignments are now respected but it seems that the method
I took from linux 2.4 is more efficient in terms of memory consumption.
I will provide a complete patch today with the same mechanism for
rh_alloc_fixed.

Fabien



Allocation method with offset (patch from myself)
rh_alloc - Required size = 0040, align = 0008
rh_alloc - Block size = 3F80, start = 00000080 - Off = 0000
rh_alloc - Alloc size = 0040, start = 00000080

rh_alloc - Required size = 0008, align = 0010
rh_alloc - Block size = 3F40, start = 000000c0 - Off = 0000
rh_alloc - Alloc size = 0010, start = 000000c0

rh_alloc - Required size = 1800, align = 0020
rh_alloc - Block size = 3F30, start = 000000d0 - Off = 0010
rh_alloc - Alloc size = 1810, start = 000000e0

rh_alloc - Required size = 0108, align = 0040
rh_alloc - Block size = 2720, start = 000018e0 - Off = 0020
rh_alloc - Alloc size = 0160, start = 00001900

rh_alloc - Required size = 0040, align = 0010
rh_alloc - Block size = 25C0, start = 00001a40 - Off = 0000
rh_alloc - Alloc size = 0040, start = 00001a40

rh_alloc - Required size = 0020, align = 0020
rh_alloc - Block size = 2580, start = 00001a80 - Off = 0000
rh_alloc - Alloc size = 0020, start = 00001a80

rh_alloc - Required size = 0010, align = 0010
rh_alloc - Block size = 2560, start = 00001aa0 - Off = 0000
rh_alloc - Alloc size = 0010, start = 00001aa0

rh_alloc - Required size = 000C, align = 0040
rh_alloc - Block size = 2550, start = 00001ab0 - Off = 0010
rh_alloc - Alloc size = 0050, start = 00001ac0


Allocation method without offset (Patch from Pantelis)
rh_alloc - Required size = 0040, align = 0008
rh_alloc - Block size = 3F80, start = 00000080
rh_alloc - Alloc size = 0047, start = 00000080

rh_alloc - Required size = 0008, align = 0010
rh_alloc - Block size = 3F39, start = 000000c7
rh_alloc - Alloc size = 0017, start = 000000d0

rh_alloc - Required size = 1800, align = 0020
rh_alloc - Block size = 3F22, start = 000000de
rh_alloc - Alloc size = 181F, start = 000000e0

rh_alloc - Required size = 0108, align = 0040
rh_alloc - Block size = 2703, start = 000018fd
rh_alloc - Alloc size = 0147, start = 00001900

rh_alloc - Required size = 0040, align = 0010
rh_alloc - Block size = 25BC, start = 00001a44
rh_alloc - Alloc size = 004F, start = 00001a50

rh_alloc - Required size = 0020, align = 0020
rh_alloc - Block size = 256D, start = 00001a93
rh_alloc - Alloc size = 003F, start = 00001aa0

rh_alloc - Required size = 0010, align = 0010
rh_alloc - Block size = 252E, start = 00001ad2
rh_alloc - Alloc size = 001F, start = 00001ae0

rh_alloc - Required size = 000C, align = 0040
rh_alloc - Block size = 250F, start = 00001af1
rh_alloc - Alloc size = 004B, start = 00001b00

-----Original Message-----
From: linuxppc-embedded-bounces at ozlabs.org
[mailto:linuxppc-embedded-bounces at ozlabs.org] On Behalf Of Clement
Fabien
Sent: jeudi 24 novembre 2005 12:26
To: Pantelis Antoniou; Kumar Gala; Marcelo Tosatti; linuxppc-embedded
Subject: RE: [PATCH] CPM2: Fix totally bogus alignment handing of
dpalloc

Here is a patch that builds.


-----Original Message-----
From: Pantelis Antoniou [mailto:panto at intracom.gr] 
Sent: jeudi 24 novembre 2005 12:04
To: Clement Fabien; Kumar Gala; Marcelo Tosatti; linuxppc-embedded
Subject: [PATCH] CPM2: Fix totally bogus alignment handing of dpalloc

Hi all.

Alignments are currently handled bogusly for cpm2.

Please test.

Regards

Pantelis







More information about the Linuxppc-embedded mailing list