lkml.org 
[lkml]   [2007]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Conveying memory pressure to userspace?
> The prev_priority field in the zoneinfo stuff is more useful for
> memory pressure. I'm playing with making a blocking callback that
> can wake someone up when this gets down to a certain priority level
> (prio=12 => everything's rosy, prio=0 => we're in deep shit).

Ah, I see. This, however, doesn't make sharing fair yet.

Take for instance two SQL servers. Both want as much cache. At a
certain moment they'll both have allocated just enough to keep the
last_priority to a constant.

When one has a slightly lesser constant than the other, that one will
keep allocating to get it down to that value whereas the other will
keep freeing to get up to his constant.

Even when they've got the same pressure they strive for then when some
pressure is releaved, it's first come first serve, which isn't really
fair.



Let applications register the amount of cache they are using (proc
entry, new madvise flag?) and let them register a priority. Then the
kernel will keep track of a factor of fairness (<1: not greedy enough;
1> too greedy.)[1]. What about adding a callback when this value
deviates a certain amount (<0.8, >1.2)?



--
Bas Westerbaan
GPG 99BA289B | SINP bas@w-nz.com
http://blog.w-nz.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-11 12:03    [W:0.049 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site