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 [EMAIL PROTECTED] http://blog.w-nz.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/