Re: Translating VM address to physical addresses in a non-root app
From: Ensco (ensconews.deller_at_smsail.com)
Date: 11/19/03
- Next message: Gerhard W. Gruber: "Re: Translating VM address to physical addresses in a non-root app"
- Previous message: Kasper Dupont: "Re: Permission flag in semget() and shmget()"
- In reply to: Kasper Dupont: "Re: Translating VM address to physical addresses in a non-root app"
- Next in thread: Gerhard W. Gruber: "Re: Translating VM address to physical addresses in a non-root app"
- Reply: Gerhard W. Gruber: "Re: Translating VM address to physical addresses in a non-root app"
- Reply: David Schwartz: "Re: Translating VM address to physical addresses in a non-root app"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 19 Nov 2003 15:56:59 -0500
Kasper,
Thanks for your reply.
> I think the "normal" aproach for such a driver is to let the
> driver do the allocation of memory. The driver then implements
> a char device which the user space app can mmap into it's own
> address space. If multiple apps mmap simultaneously the memory
> will be shared, as that is how you are going to write the
> driver.
If I'm not mistaken, this approach requires the driver to allocate kernel
memory using kmalloc. It was not clear to me that kernel pages can be
mapped into user pages (don't see why not, just haven't seen any such
example).
Also, that solution has limits that are problematic. The allocation size is
run-to-run dependent, and I wouldn't want to "reserve" enough kmem for the
worst case when I might not be running a worst case, not to mention the
question of how to tell the driver how much memory to allocate for a given
run.
Also, I believe mmap is normally used for mapping "device addresses". The
smart device only as about 20 "control words". Those controls then cause
the device to become a bus master and start data transfers. Those transfers
have to go into "real" memory as the device does not have any significant
buffering.
We already mmap the control word addresses to make I/O control fast, but
there is no "buffer memory" to be mapped.
Regards,
Steve
- Next message: Gerhard W. Gruber: "Re: Translating VM address to physical addresses in a non-root app"
- Previous message: Kasper Dupont: "Re: Permission flag in semget() and shmget()"
- In reply to: Kasper Dupont: "Re: Translating VM address to physical addresses in a non-root app"
- Next in thread: Gerhard W. Gruber: "Re: Translating VM address to physical addresses in a non-root app"
- Reply: Gerhard W. Gruber: "Re: Translating VM address to physical addresses in a non-root app"
- Reply: David Schwartz: "Re: Translating VM address to physical addresses in a non-root app"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|