lkml.org 
[lkml]   [1998]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectsematics of vm_operations_struct.wppage() ?
Date
Yet more questions from the depths of the kernel. (2.0.32)

I would like to make a special kind of task which keeps a list of the pages
that it dirties. Simple, I thought: take all my writable pages,
write-protect them, and define vm_operations_struct.wppage() to
un-write-protect and insert them into my dirty list. Every time I write to
a page, my wppage() will update my task's dirty list and clear the wp bit.
Of course, there's a catch.

vm_operations_struct.wppage() is not called from anywhere in my version of
the kernel. All the copy-on-write stuff is handled in do_wp_page() and it
never calls wppage(). Presumably, wppage was defined in earlier versions
of the kernel but later removed when someone thought: who would ever use
that?

I would like to use it, and so I would like to put it back. My question is
where? The prototype:
unsigned long (*wppage)(struct vm_area_struct * area, unsigned long
address, unsigned long page);

declares that wppage should return an unsigned long. How exactly should
the return type be interpreted? Should it be the new page for
copy-on-write or the original page with the write protect bit cleared?
Where exactly should do_wp_page call wppage() and what should it do with
the return?

Linus?

--Noel


\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.660 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site