lkml.org 
[lkml]   [2007]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: userspace pagecache management tool
On Sat, 3 Mar 2007 22:41:09 +0100 bert hubert <bert.hubert@netherlabs.nl> wrote:

> > How can you make global policy decisions based on the intent
> > of one program?
>
> By not doing so.

yup.

> Andrew's program is fine in principle, except that the
> linux kernel treats the communication of a program's intent as a global
> instruction.

argh.

That felt good - let's do it again.

argh.


It is *not* a global instruction. It uses setenv, so the user's policy
affects only the target process and its forked children.


> Also, Andrew's description is a tad misleasing, as the size of the page
> cache might be altered a lot in case content is accessed that was previously
> cached!

That's true.

Although if the user knows that he'll want to use that data again soon, and
he elects to purge it all from cache beforehand then we're dealing with a pretty
dumb user.

If this user doesn't plan to use the data again, but some other user does,
then he loses.


> With my userspace hat on, I'd love to have a proper way to communicate my
> *program's* expectations to the kernel, without stomping other programs.

That is the aim and effect of this work.

> Also with the same hat on, I hope to rarely *need* to communicate my
> expectations because the kernel correctly predicts many cases.

yup. It's those odd cases where it goes wrong which I'm addressing here.

And of course there's no way for the kernel to work out that it's about to
go wrong - kernel can't read user's mind.


Well. That's not strictly true. One could envisage a database-backed
learning program which observes the users work patterns and, based on
various pattern-matchings, works out what the best strategy is likely to be
when the user starts some operation which he has performed previously.

-
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-03-03 23:17    [W:0.078 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site