[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201002231758.17454.arnd@arndb.de>
Date: Tue, 23 Feb 2010 17:58:17 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Neshama Parhoti <pneshama@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: sysfs vs. ioctl
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists