Re: [PATCH -mm] vmscan: make mapped executable pages the firstclass citizen

From: Peter Zijlstra
Date: Sun May 10 2009 - 05:13:43 EST


On Sun, 2009-05-10 at 17:59 +0900, KOSAKI Motohiro wrote:
> 2009/5/9 Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>:
> >> The patch seems reasonable but the changelog and the (non-existent)
> >> design documentation could do with a touch-up.
> >
> > Is it right that I as a user can do things like mmap my database
> > PROT_EXEC to get better database numbers by making other
> > stuff swap first ?
> >
> > You seem to be giving everyone a "nice my process up" hack.
>
> How about this?
> if priority < DEF_PRIORITY-2, aggressive lumpy reclaim in
> shrink_inactive_list() already
> reclaim the active page forcely.
> then, this patch don't change kernel reclaim policy.
>
> anyway, user process non-changable preventing "nice my process up
> hack" seems makes sense to me.
>
> test result:
>
> echo 100 > /proc/sys/vm/dirty_ratio
> echo 100 > /proc/sys/vm/dirty_background_ratio
> run modified qsbench (use mmap(PROT_EXEC) instead malloc)
>
> active2active vs active2inactive ratio
> before 5:5
> after 1:9
>
> please don't ask performance number. I haven't reproduce Wu's patch
> improvemnt ;)
>
> Wu, What do you think?

I don't think this is desirable, like Andrew already said, there's tons
of ways to defeat any of this and we've so far always priorized mappings
over !mappings. Limiting this to only PROT_EXEC mappings is already less
than it used to be.

--
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/