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

2 messages, 2 authors, 2005-11-24 · open the first message on its own page

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

From: Clement Fabien <hidden>
Date: 2005-11-24 12:52:25

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 =3D 0040, align =3D 0008
rh_alloc - Block size =3D 3F80, start =3D 00000080 - Off =3D 0000
rh_alloc - Alloc size =3D 0040, start =3D 00000080

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

-----Original Message-----
From: linuxppc-embedded-bounces@ozlabs.org
[mailto:linuxppc-embedded-bounces@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@intracom.gr]=20
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

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

From: Pantelis Antoniou <hidden>
Date: 2005-11-24 12:56:34

Clement Fabien wrote:
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

Please don't bother.

The other method messes up the deallocations, you just have to live
with the wasted space.

With rh_alloc_fixed you're suppossed to know your alignment, the align
argument is bogus.

Pantelis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help