mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Neshama Parhoti <pneshama@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: sysfs vs. ioctl
Date: Tue, 23 Feb 2010 17:58:17 +0100	[thread overview]
Message-ID: <201002231758.17454.arnd@arndb.de> (raw)
In-Reply-To: <912ec82a1002230847h11d0f628rbd38b12f38270735@mail.gmail.com>

On Tuesday 23 February 2010, Neshama Parhoti wrote:
> we are in the process of writing a new driver and we don't know
> whether to choose a sysfs or ioctl interface to user space.
> 
> we know that sysfs is preferred, but we're concerned it will have bad
> performance when compared to ioctl (our driver will have its interface
> might be used many dozens of times per second, possible even more than
> 100 times per second).
> 
> so should we opt for ioctls if a usage is expected even every 5
> miliseconds (in extreme scenarios) ?

The question is not that easy to answer generally, there are many
aspects that influence what interface to use, and sysfs is not
generally slower than ioctl either.

Can you describe what your driver is doing? One rule of thumb
is that if you already require a character device, using ioctl
is the right answer, but you shouldn't create a character device
if all you want to do over it is a single ioctl operation.

	Arnd

  reply	other threads:[~2010-02-23 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 16:47 Neshama Parhoti
2010-02-23 16:58 ` Arnd Bergmann [this message]
2010-02-24  5:28   ` Neshama Parhoti

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=201002231758.17454.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pneshama@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

Powered by JetHome