Re: [PATCH] RSS ulimit enforcement for 2.6.8

From: Andrew Morton
Date: Thu Aug 05 2004 - 16:25:22 EST


Rik van Riel <riel@xxxxxxxxxx> wrote:
>
> On Thu, 5 Aug 2004, Bill Davidsen wrote:
> > Rik van Riel wrote:
> > > The patch below implements RSS ulimit enforcement for 2.6.8-rc3-mm1.
>
> > Wish there was something like RSS for cache, so that one process reading
> > every inode on the planet, or doing an md5 on an 11GB file wouldn't push
> > every damn process out if it's waiting for me to finish typing a line...
>
> I guess that's beyond the scope of a simple patch

It might not be. We could come up with some dopey per-process flag,
inherited across fork which means "invalidate each file's pagecache when I
close it". get/set that flag with a new syscall, or sys_prctl(). That
way, people could do:

/bin/run-cache-friendly tar cf /dev/tape /huge-filesystem

and not have their pagecache trodden all over. Extra points for nuking
dentries and inodes too.

It's not particularly pretty, but it would be effective for the most
commonly complained about scenarios.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/