All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <kiszka@domain.hid>
To: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] RTDM mmap alternative
Date: Tue, 07 Feb 2006 21:03:17 +0100	[thread overview]
Message-ID: <43E8FD05.5060600@domain.hid> (raw)
In-Reply-To: <200602071722.06921.lbocseg@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]

Rodrigo Rosenfeld Rosas wrote:
> Hi Jan, thank you for your precious code! :)
> 
> But, while it is executed in Linux context, ie, in a non-rt context, I could 
> register a normal Linux file descriptor and call mmap on it. Or I could mmap 

You still need the back-end, i.e. some Linux device being registered and
catch your mmap call. That's how /dev/rtheap e.g. works.

> the device /dev/mem for mapping the memory region I would need. I can obtain 
> the absolute address from a RTDM ioctl call.

/dev/mem is all or nothing: once you allow access, you cannot control
which memory region gets mapped. Closing this loop in kernel space
produces safer code with the option to get it even secure one day
(current Xenomai APIs do not address the latter aspect yet).

> 
> Anyway, I'll be missing the V4L2 compatibility but that is not a great issue. 

You mean some kind of rt_dev_mmap(..., rt-fildes, ...) (or wrapped mmap
in the posix skin)? We could define a standard RTDM-IOCTL and write the
user-space lib functions so that interested drivers can receive such
requests in a canonical way. The implementation in the driver would
still be different to Linux (just rtdm_mmap_to_user, no page-on-demand
e.g.).

> But since I only need to call this on initialization, I don't need to be in 
> RT-context in my specific application. But since I'm also developing a 
> robotic programming framework it would be nice to have this mmap capability 
> in real-time context.

Dynamic mmap'ping in RT is contradictory: Touching your current process'
mm creates dependencies on a lot of kernel code paths that can modify it
as well - if such modifications can be made deterministic at all in
Linux. But I guess you don't means this. Even V4L2 mmap's only during
init and not during the critical capturing process - it's far to slow.

You know that, due to Xenomai's automatic mode switching, you would be
free to call such rt_dev_mmap even from RT tasks? It would just switch
you temporarily over.

> 
> But thank you anyway. I really appreciate your code.
> 
> Best regards,
> 
> Rodrigo.
> 

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-02-07 20:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-03 19:27 [Xenomai-help] RTDM mmap alternative Rodrigo Rosenfeld Rosas
2006-02-04  9:07 ` Jan Kiszka
2006-02-04 12:44   ` Rodrigo Rosenfeld Rosas
2006-02-04 12:41     ` Jan Kiszka
2006-02-04 14:19       ` Rodrigo Rosenfeld Rosas
2006-02-06 21:00       ` Rodrigo Rosenfeld Rosas
2006-02-07 17:38         ` Jan Kiszka
2006-02-07 19:22           ` Rodrigo Rosenfeld Rosas
2006-02-07 20:03             ` Jan Kiszka [this message]
2006-02-08  2:15               ` Rodrigo Rosenfeld Rosas
2006-02-08 12:43           ` Rodrigo Rosenfeld Rosas
2006-02-08 13:14             ` Jan Kiszka
2006-02-08 18:03               ` Rodrigo Rosenfeld Rosas
2006-02-08 18:26                 ` Jan Kiszka
2006-02-08 19:35                   ` Rodrigo Rosenfeld Rosas
2006-02-08 19:07                 ` Rodrigo Rosenfeld Rosas
2006-02-08 21:28           ` Rodrigo Rosenfeld Rosas
2006-02-09  8:53             ` Jan Kiszka
2006-02-09 16:04               ` Rodrigo Rosenfeld Rosas
2006-02-09 16:53                 ` Jan Kiszka
2006-02-09 17:58                   ` Rodrigo Rosenfeld Rosas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43E8FD05.5060600@domain.hid \
    --to=kiszka@domain.hid \
    --cc=lbocseg@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.