linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Any reason why install_page and zap_page_range are not exported?
@ 2003-07-31 21:03 Petr Vandrovec
  2003-07-31 22:16 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Vandrovec @ 2003-07-31 21:03 UTC (permalink / raw)
  To: linux-kernel

Hi,
  in one of my projects I found that what we were doing in 2.2.x/2.4.x
with strange hacks to mmap & nopage methods to get non-linear
mappings from some device can be done in 2.[56].x with remap_file_pages. 

  Only two things are missing: install_page is not exported for modules,
so it is not possible to create own vma's populate function, as
there is no way how to put some page into pagetables. Or at least
I did not found such - even if I'll copy install_page's code to the
module, I'll just run to the other non-exported symbols :-(

  And second missing thing is zap_page_range - we need way to tell
that specified page is not mapped anywhere (mostly for debugging
purposes). At worst install_page with PROT_NONE protection can be 
used for that, but it seems natural that if there should be no page 
there, we should just put nothing to the pagetables instead of some 
fake page. And for large ranges doing one 200MB zap_page_range is
much faster than doing 50000 install_pages.

  Is it intentional that these functions are not exported for modules,
or is it just case that nobody needed such functions yet?
                                        Thanks,
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Any reason why install_page and zap_page_range are not exported?
  2003-07-31 21:03 Any reason why install_page and zap_page_range are not exported? Petr Vandrovec
@ 2003-07-31 22:16 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2003-07-31 22:16 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel

"Petr Vandrovec" <VANDROVE@vc.cvut.cz> wrote:
>
> Hi,
>   in one of my projects I found that what we were doing in 2.2.x/2.4.x
> with strange hacks to mmap & nopage methods to get non-linear
> mappings from some device can be done in 2.[56].x with remap_file_pages. 
> 
>   Only two things are missing: install_page is not exported for modules,
> so it is not possible to create own vma's populate function, as
> there is no way how to put some page into pagetables. Or at least
> I did not found such - even if I'll copy install_page's code to the
> module, I'll just run to the other non-exported symbols :-(

Agree, install_page() should be exported.  I'll submit a patch.

>   And second missing thing is zap_page_range - we need way to tell
> that specified page is not mapped anywhere (mostly for debugging
> purposes). At worst install_page with PROT_NONE protection can be 
> used for that, but it seems natural that if there should be no page 
> there, we should just put nothing to the pagetables instead of some 
> fake page. And for large ranges doing one 200MB zap_page_range is
> much faster than doing 50000 install_pages.

zap_page_range() sounds like an odd thing to be exporting.  If we had an
in-kernel module which needed it then OK.  Do you have plans in that
direction?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-31 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31 21:03 Any reason why install_page and zap_page_range are not exported? Petr Vandrovec
2003-07-31 22:16 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).