]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (7540): em28xx: convert to use videobuf-vmalloc
authorMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 13 Apr 2008 17:37:52 +0000 (14:37 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:08:00 +0000 (14:08 -0300)
commitad0ebb96c220c461386e9a765fca3daf5590d01e
tree4c13c24682703cbb94f415eb944c573ac0835ccc
parent78e92006f410a4044f8c1760c25ac9d11d259aa2
V4L/DVB (7540): em28xx: convert to use videobuf-vmalloc

The usage of videobuf-vmalloc allows to cleanup em28xx logic.

Also, it reduced its size by about 5.42% on i386 arch (and about 7.5% on x86_64):

  39113    4876      40   44029    abfd old/em28xx.ko
  36731    4868      40   41639    a2a7 /home/v4l/master/v4l/em28xx.ko

Also, the preliminary tests, made on a single core 1.5 MHz Centrino showed
that CPU usage reduced from 42%-75% to 28%-33% (reports from "top") command.

A test with time command presented an even better result:

This is the performance tests I did, running code_example to get 1,000 frames
@29.995 Hz (about 35 seconds of stream), tested on a i386 machine, running at
1,5GHz:

The old driver:

$ time -f "%E: %Us User time, %Ss Kernel time, %P CPU used" ./capture_example
0:34.21: 8.22s User time, 25.16s Kernel time, 97% CPU used

The videobuf-based driver:

$ time -f "%E: %Us User time, %Ss Kernel time, %P CPU used" ./capture_example
0:35.36: 0.01s User time, 0.05s Kernel time, 0% CPU used

Conclusion:

The time consumption to receive the stream where reduced from about 33.38
seconds to 0.05 seconds.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/em28xx/em28xx-core.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/em28xx/em28xx.h