lkml.org 
[lkml]   [2005]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: advice
Hello,

Apologize for off topic questions. While I am working on a device driver
in kernel 2.4.21, I need advices from kernel developers.

1. When the read() or write() is called from user applications, the
driver can either have a static buffer with limited size or dynamic
memory allocation (kmalloc).

The static buffer is simple and reliable, but limited buffer size to
applications.

Personally, I would like to use dynamic kernel memory allocation
(kmalloc), the question is whether it could be any issues (reliability)
to frequently call kmalloc / kfree in a high speed device (100mpbs)?

2. Although there is a mechanism for user applications to access the
driver through function call read(), write(), or ioctl(). Can the
application passes a callback pointer to the driver in kernel space so
that the driver can call the callback function when some special event
is received. Or if there is a mechanism to let the driver to send a
notification to the user application?

Thank you and appreciate your helps.

Jim

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-04 02:52    [W:0.025 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site