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, Gerard Roudier wrote:

> 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 ?

Probably not wrong about the ratio not depending on number of PAGES,
but seems 1% should be enough to blindly reap a dual PAGE, :-)
unless my program is completely wrong for the moment.
Will try harder to-morrow.

Reaping randomly until 32 contiguous pages are available
Total 8192, free 6754 / 32:1 16:67 8:257 4:447 2:602 1:598
Total 16384, free 12908 / 32:1 16:75 8:450 4:972 2:1328 1:1527
Total 32768, free 25355 / 32:1 16:119 8:836 4:2008 2:2754 1:3189
Total 65536, free 49278 / 32:1 16:173 8:1464 4:4005 2:5895 1:6954

Reaping randomly until 16 contiguous pages are available
Total 8192, free 4486 / 16:1 8:29 4:300 2:867 1:1304
Total 16384, free 10382 / 16:1 8:146 4:848 2:1764 1:2276
Total 32768, free 16799 / 16:1 8:77 4:1003 2:3357 1:5439
Total 65536, free 36290 / 16:1 8:270 4:2467 2:6970 1:10304

Reaping randomly until 8 contiguous pages are available
Total 8192, free 2443 / 8:1 4:47 2:476 1:1295
Total 16384, free 4847 / 8:1 4:91 2:937 1:2601
Total 32768, free 9030 / 8:1 4:128 2:1668 1:5174
Total 65536, free 14313 / 8:1 4:113 2:2319 1:9214

Reaping randomly until 4 contiguous pages are available
Total 8192, free 953 / 4:1 2:94 1:761
Total 16384, free 1056 / 4:1 2:60 1:932
Total 32768, free 1731 / 4:1 2:91 1:1545
Total 65536, free 4442 / 4:1 2:301 1:3836

Reaping randomly until 2 contiguous pages are available
Total 8192, free 107 / 2:1 1:105
Total 16384, free 144 / 2:1 1:142
Total 32768, free 201 / 2:1 1:199
Total 65536, free 301 / 2:1 1:299


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.109 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site