On Mon, 2007-06-18 at 15:14 +0300, Pantelis Antoniou wrote:
Hi Li,
The patch appears fine at first glance.
I'm really curious what kind of alignment do you use in order to have so
much wasted space that re-inserting the leftovers makes so much of a
difference.
This I what you get for eth0 with patch,
all hex, decimal within()
MURAM alloc, start:400, size:200(512), align:8(8)
MURAM alloc, start:600, size:208(520), align:8(8)
MURAM alloc, start:880, size:80(128), align:80(128)
MURAM alloc, start:900, size:1a0(416), align:100(256)
MURAM alloc, start:aa0, size:40(64), align:20(32)
MURAM alloc, start:b00, size:100(256), align:100(256)
MURAM alloc, start:c00, size:a0(160), align:100(256)
MURAM alloc, start:cc0, size:c(12), align:40(64)
MURAM alloc, start:cd0, size:30(48), align:8(8)
MURAM alloc, start:d00, size:80(128), align:80(128)
MURAM alloc, start:d80, size:80(128), align:80(128)
MURAM alloc, start:e00, size:80(128), align:80(128)
MURAM alloc, start:e80, size:80(128), align:80(128)
MURAM alloc, start:f00, size:40(64), align:40(64)
MURAM alloc, start:f40, size:40(64), align:40(64)
MURAM alloc, start:f80, size:40(64), align:40(64)
MURAM alloc, start:fc0, size:40(64), align:40(64)
MURAM alloc, start:1000, size:5d(93), align:4(4)
And this is what you get without patch:
MURAM alloc, start:1400, size:200(512), align:8(8)
MURAM alloc, start:1608, size:208(520), align:8(8)
MURAM alloc, start:1880, size:80(128), align:80(128)
MURAM alloc, start:1a00, size:1a0(416), align:100(256)
MURAM alloc, start:1bc0, size:40(64), align:20(32)
MURAM alloc, start:1d00, size:100(256), align:100(256)
MURAM alloc, start:1f00, size:a0(160), align:100(256)
MURAM alloc, start:1fc0, size:c(12), align:40(64)
MURAM alloc, start:2000, size:30(48), align:8(8)
MURAM alloc, start:2080, size:80(128), align:80(128)
MURAM alloc, start:2180, size:80(128), align:80(128)
MURAM alloc, start:2280, size:80(128), align:80(128)
MURAM alloc, start:2380, size:80(128), align:80(128)
MURAM alloc, start:2440, size:40(64), align:40(64)
MURAM alloc, start:24c0, size:40(64), align:40(64)
MURAM alloc, start:2540, size:40(64), align:40(64)
MURAM alloc, start:25c0, size:40(64), align:40(64)
MURAM alloc, start:262c, size:5d(93), align:4(4)
Jocke
On 18 =CE=99=CE=BF=CF=85=CE=BD 2007, at 3:25 =CE=9C=CE=9C, Joakim =
Tjernlund wrote:
On Mon, 2007-06-18 at 15:14 +0300, Pantelis Antoniou wrote:
quoted
Hi Li,
The patch appears fine at first glance.
I'm really curious what kind of alignment do you use in order to =20
have so
much wasted space that re-inserting the leftovers makes so much of a
difference.
Jocke,
Ugh, 256?
That's not nice at all.
I'm not sure that even then you're going to have any guarantees that
the allocations will be successful.
I'm afraid that in those case it would be better for the board
platform setup to have the space preallocated according to the BSP
requirements.
Just my $0.02.
-- Pantelis
This I what you get for eth0 with patch,
all hex, decimal within()
MURAM alloc, start:400, size:200(512), align:8(8)
MURAM alloc, start:600, size:208(520), align:8(8)
MURAM alloc, start:880, size:80(128), align:80(128)
MURAM alloc, start:900, size:1a0(416), align:100(256)
MURAM alloc, start:aa0, size:40(64), align:20(32)
MURAM alloc, start:b00, size:100(256), align:100(256)
MURAM alloc, start:c00, size:a0(160), align:100(256)
MURAM alloc, start:cc0, size:c(12), align:40(64)
MURAM alloc, start:cd0, size:30(48), align:8(8)
MURAM alloc, start:d00, size:80(128), align:80(128)
MURAM alloc, start:d80, size:80(128), align:80(128)
MURAM alloc, start:e00, size:80(128), align:80(128)
MURAM alloc, start:e80, size:80(128), align:80(128)
MURAM alloc, start:f00, size:40(64), align:40(64)
MURAM alloc, start:f40, size:40(64), align:40(64)
MURAM alloc, start:f80, size:40(64), align:40(64)
MURAM alloc, start:fc0, size:40(64), align:40(64)
MURAM alloc, start:1000, size:5d(93), align:4(4)
And this is what you get without patch:
MURAM alloc, start:1400, size:200(512), align:8(8)
MURAM alloc, start:1608, size:208(520), align:8(8)
MURAM alloc, start:1880, size:80(128), align:80(128)
MURAM alloc, start:1a00, size:1a0(416), align:100(256)
MURAM alloc, start:1bc0, size:40(64), align:20(32)
MURAM alloc, start:1d00, size:100(256), align:100(256)
MURAM alloc, start:1f00, size:a0(160), align:100(256)
MURAM alloc, start:1fc0, size:c(12), align:40(64)
MURAM alloc, start:2000, size:30(48), align:8(8)
MURAM alloc, start:2080, size:80(128), align:80(128)
MURAM alloc, start:2180, size:80(128), align:80(128)
MURAM alloc, start:2280, size:80(128), align:80(128)
MURAM alloc, start:2380, size:80(128), align:80(128)
MURAM alloc, start:2440, size:40(64), align:40(64)
MURAM alloc, start:24c0, size:40(64), align:40(64)
MURAM alloc, start:2540, size:40(64), align:40(64)
MURAM alloc, start:25c0, size:40(64), align:40(64)
MURAM alloc, start:262c, size:5d(93), align:4(4)
Jocke
-----Original Message-----
From: Pantelis Antoniou [mailto:pantelis.antoniou@gmail.com]
Sent: Monday, June 18, 2007 8:31 PM
To: joakim.tjernlund@transmode.se
Cc: Li Yang-r58472; Paul; Vitaly Bordug; linuxppc-dev Development
Subject: Re: [PATCH] rheap: eliminates internal fragments caused by =
alignment
=20
=20
On 18 =C9=EF=F5=ED 2007, at 3:25 =CC=CC, Joakim Tjernlund wrote:
=20
quoted
On Mon, 2007-06-18 at 15:14 +0300, Pantelis Antoniou wrote:
quoted
Hi Li,
The patch appears fine at first glance.
I'm really curious what kind of alignment do you use in order to
have so
much wasted space that re-inserting the leftovers makes so much of =
a
quoted
quoted
difference.
=20
Jocke,
=20
Ugh, 256?
=20
That's not nice at all.
Pantelis,
For QE, most of the MURAM allocation requires relative large alignment. =
SDMA buffer even needs a 4k alignment.
I'm not sure that even then you're going to have any guarantees that
the allocations will be successful.
=20
I'm afraid that in those case it would be better for the board
platform setup to have the space preallocated according to the BSP
requirements.
Dynamic allocation surely can't match the efficiency of manual =
allocation. But with this patch applied, the utilization efficiency =
will be good enough for most systems to work correctly, and without the =
great trouble to partition the space yourself. Moreover, given the fact =
that in QE drivers some MURAM usage can be tunable, it will be more =
suitable to use the dynamic allocation.
A general policy will be helpful, that allocations with huge alignment =
(like 4k) should always be done as early as possible.
- Leo