Date: Thu, 12 Feb 1998 23:28:39 -0500 From: Brian McGovern <bmcgover@cisco.com> To: mike@dingo.cdrom.com Cc: hackers@FreeBSD.ORG Subject: Re: Mapping phyical memory in to the PCI address range... Message-ID: <199802130428.XAA10774@bmcgover-pc.cisco.com>
next in thread | raw e-mail | index | archive | help
>> These buffers can be moved by reprogramming the PLX9060 to use a memory >> address on the HOST so long as its visable on the PCI bus. Once this is done, >> the BOARD's CPU will handle transferring the data to these queues, thereby >> eliminating the need for the HOST CPU to copy the data from the board. > >Aha, but what is significant is that once you have set this buffer up >you don't have to again. > Correct >> The question at hand was whether it was 'faster' to have the board transfer >> the data to the HOST's memory, so that a bcopy or b_to_q() call would >> be moving data from HOST memory to HOST memory, or is the gain insufficient, >> and its more prudent to have the HOST CPU move the data from the board >> itself. > >It will definitely be faster to have the board push to host memory. > Any idea on roughly "how much faster"? I realize this is dependant on a lot of things, but I'd hate to spend the time doing it if its going to have a minimal impact. >> The goal is to reduce the HOST CPU time spent moving data around without >> affecting throughput to the board. > >Yup. If you have the data in main memory, you will have to make sure >that your access techniques allow you to exclude the board interfering >while you play with its control structures. > The buffers are circular queues, with head and tail pointers. The firmware on the card is written to avoid overwriting data, so its a matter of just not updating the RX tail pointer or the TX head pointer until the data the host is interested in has been moved to its final resting place. >> There, now that that is said, is the picture any clearer? > >Yes. If host CPU usage is currently an issue, this will reduce the >overheads to a degree. Well, its not an 'issue' per se. 115200 bps costs about 2-3% of the CPU on a PPro 200, including the interrupts, ppp, and an ftp client. After a few ports in operation (since the driver is optimized for the board being flat out), the usage drops to 1-2% per port. The first number is a hair less than a 16550, and the sio driver doesn't seem to improve with a large number of ports in operation. Of course, my goal is 0% CPU utilization, but, I have to give something somewhere... :) Which brings me back to my initial issue. Whats the best way to allocate RAM in the kernel (I'm assuming a malloc call), and then lock the memory down, and determine the PCI address, so I can give it to the card to use? -Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802130428.XAA10774>