mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Ozan Çağlayan" <ozancag@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel driver vs libusb performance
Date: Fri, 11 Jan 2013 06:23:13 -0800	[thread overview]
Message-ID: <20130111142313.GA30912@kroah.com> (raw)
In-Reply-To: <CAFub=KQuD_pBE-6yPV8dQOkbPC6ndi+6gO+MDJW+6iEPjZNBRw@mail.gmail.com>

On Fri, Jan 11, 2013 at 04:10:30PM +0200, Ozan Çağlayan wrote:
> > Ah, my sympathies, USB on a rpi is horrible, and you will have all sorts
> > of nasty issues, no matter how you end up doing this (in the kernel or
> > userspace).
> 
> What kind of issues? Currently I can read from the device without
> problem. But, I had very weird problems with 2 uvc cameras, you're
> right.

High cpu usage is one problem, and low overall USB bandwidth is another,
combined with slow response times.  The hardware really is bad for USB,
and the driver is a whole other beast, something that no one in the
community can, or will, touch at all.

> > Test it out and see.  I really don't think that user vs. kernel space is
> > going to be the issue here, I think you are going to see some very real
> > problems with the hardware itself in this area.
> >
> > Best of luck,
> 
> Well If I were you I would probably write that simple driver in a few
> hours but seen that I am not you, I wanted to learn will the effort
> worth the result :)

It all depends on what you want to do, but I really think that user vs.
kernelspace is not going to be the real problem here.  Start with libusb
and if you find that you are having problems, use 'perf' to see if the
kernel part is really the problem.  I think you will find all of your
time is going to be spent in the USB hardware itself, and the USB
driver, once you get the data out of that, user vs. kernel is not going
to be noticable at all.

Best of luck, and I bet you, in the end, you pick a better hardware
platform for your project (hint, go buy a Beaglebone, it actually works
and the tiny increase in cost more than makes up for the time you will
waste fighting the RPI hardware.)

greg k-h

  reply	other threads:[~2013-01-11 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11  9:53 Ozan Çağlayan
2013-01-11 13:41 ` Greg KH
2013-01-11 14:10   ` Ozan Çağlayan
2013-01-11 14:23     ` Greg KH [this message]
2013-01-11 14:40       ` Ozan Çağlayan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130111142313.GA30912@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ozancag@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®