All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] RTDM mmap alternative
Date: Wed, 08 Feb 2006 19:26:49 +0100	[thread overview]
Message-ID: <43EA37E9.8060101@domain.hid> (raw)
In-Reply-To: <200602081603.10267.lbocseg@domain.hid>

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

Rodrigo Rosenfeld Rosas wrote:
> Em Quarta 08 Fevereiro 2006 11:14, Jan Kiszka escreveu:
> 
>>> ...
>>> Jan, actually I didn't like the /dev/zero hack. If someone else is
>>> using /dev/zero it will result in a problem... I think it would be better
>>> to
>> Why? It isn't an exclusive device. And I'm only invoking open/close on
>> the original instance (which even have no handlers associated, see
>> drivers/char/mem.c), mmap gets overloaded.
> 
> I'm a little confused here. I noted you have made a backup of the 
> file_operations struct and private_data. So, I've concluded, wrongly, that 
> those handlers would be used by every process that called that open handler. 
> But, looking at the mem.c code, I think that those data (file_ops and 
> private_data) are different structs each time the user issues a call to open. 

Yep, that's the point. Actually, I was inspired by some other mmap'ing
driver which does a similar overloading on it's own device type.

> If that is true, I don't see any problem in using your approach. But I don't 
> see neither any needs for making that backup...

On first sight this is true and the backup is redundant. But it is
cleaner to not rely on a specific kernel implementation. Instead it's
saner to look at the model: I'm changing the fops without knowing what
the open handler did, so make sure that a possible release handler can
run. And this is also not very costly here. :)

Jan


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

  reply	other threads:[~2006-02-08 18:26 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
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 [this message]
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=43EA37E9.8060101@domain.hid \
    --to=jan.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.