Re: Memory requirements
Brought to you by:
aeb,
bencollins
From: Andreas B. <and...@mu...> - 2000-05-12 23:35:38
|
On Tue, May 09, 2000 at 06:20:55PM +0300, And...@no... wrote: > Hi, > > Do you know the amount of memory that the Linux 1394 subsystem will require? > Right now the three modules (ieee1394, ohci1394 and raw1394) use about 30k > (according to lsmod). More important is perhaps how much memory is allocated > for variables, structs, buffers etc. during operation? I guess this is > depending on the number of nodes so it should probable be specified in terms > of x bytes/node. The initial allocation is indeed per local node. I don't have the numbers handy, but it's sizeof(struct hpsb_host) + sizeof(hardware driver control struct). Highlevel drivers also need structs (per driver not per local node), allocation is sizeof(struct hpsb_highlevel) + n*sizeof(struct hpsb_address_serve) where n is the number of distinct address spaces. PCILynx additionally allocates 64kB for DMA control structures. These 64kB are in no way fully used, the 64kB comes from the fact that the local RAM interface of the Lynx supports 64kB of RAM for such structures but this is emulated in main memory since most boards don't have local RAM. It should be sized down to the really used amount, currently it's wasted. That's PCILynx only. After that comes dynamic allocation for packets and that depends on bus traffic. For each transaction a struct hpsb_packet is allocated + fixed 20 bytes for 1394 header + the max of however much 1394 data is required for sending or receiving. For incoming requests these are kept until the response is sent. Outgoing requests are kept until they are freed by whatever sent it (earliest either after sending or, for split transactions, after response is received). Iso receive through raw1394 stores packets up to a fixed limit. Failure to allocate loses current frames. This is only the intermediate implementation, what I have in mind is something more sophisticated that drops old packets when memory is low. The initial allocations shouldn't be too heavy, the dynamic allocations account for most when traffic to/from bus is heavy. It should be possible to take some stats for async transactions since they all go through (alloc|free)_hpsb_packet() where some code could record usage data. The other big allocation point is the raw1394 iso receive function. -- Andreas E. Bombe <and...@mu...> DSA key 0x04880A44 http://home.pages.de/~andreas.bombe/ http://linux1394.sourceforge.net/ |