[lkml]   [1996]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Ideas for reducing memory copying and zeroing times
On Tue, 16 Apr 1996, Jamie Lokier wrote:

> [cool ideas snipped out]

> Zero-mapped pages
> =================
> [snip]
> low-priority kernel thread) fill out a pool of pre-zeroed pages. When a
> process needs a zero page, if there are any in the pool it can have one
> immediately by remapping a page -- no copy on write required. Of
> course, under constant load the pool would be empty so you still need
> the fast zeroing code. At least at the start of a burst of activity
> there would be a much reduced zeroing time (such as when a program
> starts up and fills its data area). And with SMP even if all but one
> CPU is loaded, there might be a spare one with enough idle time to keep
> the pool going for the others.

currently, apart from a (usually very small) initial time, all buffers
are in use. There is a small amount of free pages reserved for interrupt
handlers and alike, but "pages that could be zeroed out" are not

There are two opposing events:

1) cached data at the end of the LRU list is needed
2) a zeroed out page is needed

if P(1) < P(2), then the whole thing makes sense, and defines an optimal
poolsize for zeroed out pages. And if we miss 1), then we are penaltized
quite badly, an unnecessary IO operation occurs. (so the relation should
be weighed by the cost of misses)

-- mingo

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