Open your DMA mode (transfer)

zhaozj2021-02-17  98

Open your DMA mode (transfer) Linuxfab Linuxfab

Back to〗 Forward〗

Open your DMA mode [QA specials] on Linuxfab [QA specials] to see the way to open the DMA, can't wait to try, first instructions: HDPARM-TT / DEV / HDA test the current speed, the same instructions Run several times, then use: hdparm -d 1 / dev / hda to open the DMA function, then test the speed, wow! Sure enough, the efficiency of Timing Buff Reads has been raised more than four times! Of course, the test data is not to be refreshing. When you really run the program, there is an effect, ㄟ ...... Really, after the DMA, you will open XWindow, open Netscape to internet, I still have to read a while, as if I don't feel how much Le? Just take a table to do it, the result is something disappointing, can't open DMA, the result is the same. Ah .... How can I do this, ok, simply take out the hard drive's instruction Locate -u to give it a good gap, this should always look at the gap, um ..... didn't open DMA It took 1 minute to 22 seconds, in order to avoid some information cache influence the test results in RAM, open the DMA and then ran again, um ..... 1 minute 22 seconds, the sky, the same light is the same! Do you have DMA? Is it useless? Or HDPARM did not use a fake data at all? How could it be? Um ..... Follow the time before class did not sleep, I have a little concept about DMA, here Everyone explains. Things on the hard disk must be moved to the RAM to do it. Early work from Hard Disk to RAM, is executed by the CPU, and this work is not as easy as imagination, the information is 1 byte is moved, so you have to read 1 MB of information, the CPU will move 1 Byte to the CPU from the hard disk, and then move from the CPU to RAM, repeat such a monotonous and boring action 1048576 times. Killing chicken with a cow knife, with a high price and multi-purpose CPU to do this, it is a bit a pity, so the DMA (Direct-Memory-Access) Controller is born, as long as the CPU tells it "Please help me move 1MB Data to memory ", DMA Controller will start doing this hard work, with time CPU can do other work, wait until the information is moved well, the DMA Controller will notify the CPU, the CPU has ready-made information. Understand the principle of operation of DMA, it is not difficult to imagine why the previous test results are the same. Because of the simple matter of processing Locate, there is no more than the CPU, no DMA is a helper, and it is very appropriate. So, when you need to access a big pen from the hard disk, the value of DMA will appear in the same time CPU Loading again. The way to redesign the test, to load heavy and more access, it will be matched to MP3, so I caught the notlame, and compressed for a 53.8 MB of WAV file, um ..... No DMA flower 1 minute and 52 seconds, restart to open the DMA and try again, haha! 1 minute 37 seconds, there is more fast.

转载请注明原文地址:https://www.9cbs.com/read-31597.html

New Post(0)