lkml.org 
[lkml]   [1997]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectUsing the zero mapped page
It seems to me that attempting to write a zero value to a page that is 
not yet allocated (ie using the zero mapped page), causes a new page to
be zeroed and assigned to the process. This seems somewhat silly when
one wants to write a zero to that page! It seemed to me that the kernel
could examine the value that is going to be assigned to the page, and not
do anything if it is a zero but return or perform its usual action if the
value is non-zero.

It occurs to me however, that perhaps the kernel would receive a page
fault everytime such a zero value assignment might occur, and further,
the kernel might not be aware of the value that is going to be put into
the page. The former might be a severe performance penalty (is it?) and
the latter would forbid this from happening.

The reason a user level solution might not be implemented is that someone
is using published libraries of some type, and may not wish to change how
they work (particularly if they are FORTRAN based, which is often where the
huge memory hogging stuff comes from).

So, I would like to know if it is technically feasible to detect whether
the kernel needs to assign a page or not depending on whether the value
to be stored is zero or not, and what kind of performance penalty there
might be, if any.


--
William Burrow -- Fredericton Area Network, New Brunswick, Canada
Copyright 1997 William Burrow
This line left intentionally blank.
And the one below it.


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