[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGngYiV4fj7TA1Apwc57oQMSjPW3mVKzfDoLbD2QJKw-GWNzBA@mail.gmail.com>
Date: Tue, 16 Apr 2019 17:49:23 -0400
From: Sven Van Asbroeck <thesven73@...il.com>
To: "Enrico Weigelt, metux IT consult" <lkml@...ux.net>
Cc: Rob Herring <robh+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Lee Jones <lee.jones@...aro.org>, mark.rutland@....com,
Andreas Färber <afaerber@...e.de>,
treding@...dia.com, David Lechner <david@...hnology.com>,
noralf@...nnes.org, johan@...nel.org,
Michal Simek <monstr@...str.eu>, michal.vokac@...ft.com,
Arnd Bergmann <arnd@...db.de>,
Greg KH <gregkh@...uxfoundation.org>, john.garry@...wei.com,
geert+renesas@...der.be, robin.murphy@....com,
Paul Gortmaker <paul.gortmaker@...driver.com>,
sebastien.bourdelin@...oirfairelinux.com, icenowy@...c.io,
Stuart Yoder <stuyoder@...il.com>,
"J. Kiszka" <jan.kiszka@...mens.com>, maxime.ripard@...tlin.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [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
<lkml@...ux.net> 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...
Powered by blists - more mailing lists