Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #756

Re: Kernel to user space communication

X-Received by 10.68.215.73 with SMTP id og9mr55422pbc.1.1411317735767; Sun, 21 Sep 2014 09:42:15 -0700 (PDT)
X-Received by 10.182.110.167 with SMTP id ib7mr587obb.8.1411317735629; Sun, 21 Sep 2014 09:42:15 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!a13no1123085igq.0!news-out.google.com!rp1ni1450igb.0!nntp.google.com!a13no1123084igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.os.linux.development.apps
Date Sun, 21 Sep 2014 09:42:15 -0700 (PDT)
In-Reply-To <9ffed644-90c1-4c53-9805-2d43a4f7a5b4@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=122.164.100.3; posting-account=I9JmAwoAAAB5_GtWKJUc4O-uhmxdBmHA
NNTP-Posting-Host 122.164.100.3
References <9ffed644-90c1-4c53-9805-2d43a4f7a5b4@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <312400e5-fea2-4d8b-9d96-c2559817dc89@googlegroups.com> (permalink)
Subject Re: Kernel to user space communication
From Karthik Balaguru <karthik.balaguru007@gmail.com>
Injection-Date Sun, 21 Sep 2014 16:42:15 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Received-Bytes 2731
X-Received-Body-CRC 1874849305
Xref csiph.com comp.os.linux.development.apps:756

Show key headers only | View raw


On Wednesday, 3 September 2014 16:17:09 UTC+5:30, victor  wrote:
> Hi,
> 
>   Is anyone aware of any performance measurements for kernel to user space data access? The techniques i can think of are netlink sockets, mmap to a dev and ioctl. But i could not find any pointers on which one to use. 
> 
> 

Here are few high level inputs for your consideration :

mmap is the does transferring data between user space and kernel space without explicit copying. The challenge here is in the kernel module in case of virtual memory(memory management unit) based systems.

ioctl uses copy to user and copy from user mechanisms. Also, asynchronous messages cannot be sent to user space to kernel space incase of ioctl.
ioctl will be very useful in collection of information/statistics
The challenge here is that extending ioctl function by addition of new parameters that result in the change in the structure layout that can cause backward compatibility issues.


netlink does not use any system calls and it is based on standard socket APIs.We can send asynchronous messages from user space to kernel space. Here, the challenge is reliable transmissions from kernel to user are impossible in any case. i.e, as per the manpage, the kernel can't send a netlink message if the socket buffer is full: the message will be dropped and the kernel and the user-space process will no longer have the same view of kernel state. It is up to the application to detect when this happens.

Karthik

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Kernel to user space communication victor <ramkumar2579@gmail.com> - 2014-09-03 03:47 -0700
  Re: Kernel to user space communication Rainer Weikusat <rweikusat@mobileactivedefense.com> - 2014-09-03 14:50 +0100
  Re: Kernel to user space communication Karthik Balaguru <karthik.balaguru007@gmail.com> - 2014-09-21 09:42 -0700
    Re: Kernel to user space communication Karthik Balaguru <karthik.balaguru007@gmail.com> - 2014-09-21 10:43 -0700

csiph-web