lkml.org 
[lkml]   [1998]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Strange interrupt behaviour

On Tue, 14 Jul 1998, Linus Torvalds wrote:

> On Tue, 14 Jul 1998, Linus Torvalds wrote:
> >
> > (*) For the math challenged: imagine that you have x pages [...]
>
> (note - I did this on-the-fly and wrote a stupid program to print out the
> results. Don't jump on me too hard if I had a bug in the math somewhere,
> it looks and feels sane to me but hasn't be rigorously looked at by any
> means.)

If your program seems to demonstrate that having even up to 5% memory
free does not help a lot and that the ratio of pages you will throw away
blindly for getting your dual page seem not to depend on the _actual_
number of pages, then your program is as stupid as the one I wrote a
couple of months ago (or perhaps as clever, who knows?)

No need math, in fact, just common sense should suffice:

If you replace PAGE by BALL, each BALL having a number, then it becomes
easy to feel that the number of tries for getting 2 BALLS with consecutive
numbers increase when the total number of BALLS increase. At a raw
estimate, the average number of tries to get 2 BALLS with consecutive
numbers seem to be proportionnal to the total number of BALLS.

So, if you are blind, the ratio of PAGES you will have to free in order
to get a dual PAGE should not depend on the _actual_ number of pages.

BTW, if, unfortunately, it is 50% for 4 MB, it also is 50 % for 2 GB. ;)

How wrong am I ?

Regards,
Gerard.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.186 / U:0.476 seconds]
©2003-2014 Jasper Spaans. Advertise on this site