[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6880bed30705110300i77033b7bgc111b0e165b78097@mail.gmail.com>
Date: Fri, 11 May 2007 12:00:30 +0200
From: "Bas Westerbaan" <bas.westerbaan@...il.com>
To: "Martin J. Bligh" <mbligh@...igh.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: 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@...z.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists