* vm_operations (was: Re: release not called for my driver?)
[not found] <E125GRI-000221-00@the-village.bc.nu>
@ 2000-01-04 7:35 ` Ingo Oeser
2000-01-04 17:19 ` Stephen Williams
0 siblings, 1 reply; 2+ messages in thread
From: Ingo Oeser @ 2000-01-04 7:35 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux Kernel Development, linux-mm
On Mon, 3 Jan 2000, Alan Cox wrote:
> > the device, I get the call to release exactly how I expect. HOwever, if
> > the application does a mmap of the device, then killing the device will
> > cause the vmclose to be called, BUT RELEASE IS NOT CALLED.
>
> Guess one - you are still fiddling with the usage counts. With Linux 2.2.x
> you dont need to do that. Compare the 2.0 and 2.2 bttv drivers handling
> of mmap
Is there _any_ good Documentation on vm_opererations? When
exactly are each called? Under which conditions? (locks,
interrupt context, preparation of arguments, etc.)
Reading source is helpful, but sometimes these cases are not
_that_ clear...
E.g. I still see no method for a shared mmaped page that could be
updated "under your ass" from your device (which modifies data on
the page and can signal, if it is starting/finishing processing
the contents) to be updated in your process memory.
e.g.
- shared mmap of "/dev/page_modifier" to page AREA
- fault-in page -> device reads the page
- process write to page + calls msync -> device writes the
page
- device starts updating page -> call ???? to temporarly
unmap the page and halt process that is trying to
read/write this page
- device finishes updating page -> call ???? to map the page
again (to same location of course!) and wakeup all
processes that were trying to read/write to this page.
There could be a _long_ time between these updates and the
updates itself take also a long time (device may hang, so we
eventuelly need to reboot it after a while).
Note: This _cannot_ be a block device (because it has
non-continous memory, that is mapped and is able to do
processing on data), but it is similarly handled (because it
handles/swallows/generates mass data) ;)
Thanks and Regards
Ingo Oeser
--
Feel the power of the penguin - run linux@your.pc
<esc>:x
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.nl.linux.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: vm_operations (was: Re: release not called for my driver?)
2000-01-04 7:35 ` vm_operations (was: Re: release not called for my driver?) Ingo Oeser
@ 2000-01-04 17:19 ` Stephen Williams
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Williams @ 2000-01-04 17:19 UTC (permalink / raw)
To: Ingo Oeser; +Cc: Linux Kernel Development, linux-mm
As far as I can tell, the Linux kernel device driver interface is very
poorly documented. The Rubinni book is as close as one gets to documentation,
but that does not cover much of vm behavior, and certainly doesn't cover
the cases you and I are handling.
Example code may well be the best documentation (thanks, Alan) but a
driver for a complex dvice can get a bit opaque and what are really needed
are contrived and heavily commented examples.
Oh well, Linux drivers are part of my job description so I do have the
time to figure things out. It just would be nice if the people who add these
nifty-neato interfaces in the kernel actually took the time to describe
them.
--
Steve Williams "The woods are lovely, dark and deep.
steve@icarus.com But I have promises to keep,
steve@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.nl.linux.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-01-04 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <E125GRI-000221-00@the-village.bc.nu>
2000-01-04 7:35 ` vm_operations (was: Re: release not called for my driver?) Ingo Oeser
2000-01-04 17:19 ` Stephen Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox