[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v10 0/7] Add Fieldbus subsystem + support HMS Profinet card
On Tue, Apr 16, 2019 at 5:21 PM Enrico Weigelt, metux IT consult
<> wrote:
> Yeah, that sounds logical. By the way: could we also mmap() that device?

AFAIK mmap only makes sense if you have actual device memory, accessible
through some memory controller. The process memory on anybus-s devices
is accessed through many layers of indirection, which includes a handshaking/
synchronization protocol over anybus-s.

In addition, you'd lose timing information about writes. The current API blocks
until the write to the remote PLC's process memory has been
successfully completed.

Perhaps if someone ever adds a fieldbus_dev driver for a device with mappable
process memory, we can consider mmap() as an optional extension ?

> Okay that's just a purely academical idea here, but I'm curious whether
> that would make a notable difference in performance.

Perhaps on a device with memory-mappable process memory.
But it would have to be an incredibly fast fieldbus device for the
difference between read()/write() and mmap() to matter...

> Yet another question: does each fieldbus_dev instance talk to exactly
> one plc process memory, or can there be many ?
> Having separate device nodes per plc process memory seems a good idea
> for finer access control (via chown+friends).

Good question ! I'll have to get back to you on that...

 \ /
  Last update: 2019-04-16 23:50    [W:0.086 / U:28.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site