linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: Rik van Riel <riel@redhat.com>, Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: Remap_file_pages, RSS limits, security implications (was: Re: [uml-devel] Re: [RFC] [patch 0/18] remap_file_pages protection support (for UML), try 3)
Date: Wed, 21 Sep 2005 16:16:21 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0509211547270.6584@goblin.wat.veritas.com> (raw)
In-Reply-To: <200509201706.06852.blaisorblade@yahoo.it>

On Tue, 20 Sep 2005, Blaisorblade wrote:
> On Wednesday 07 September 2005 14:00, Hugh Dickins wrote:
> 
> Ahh, ok... VM_MAYSHARE is the recorded MAP_SHARED, while VM_SHARED says 
> whether the pages are actually shared and writable.

That's it (let's say "potentially writable" - VM_SHARED says they're
shared and already writable or shared and could be mprotected writable).

It is confusing, but it's been that way for years, and once you grasp it,
you like to keep it that way, so as to feel superior to everyone else ;)

> > Though thinking through that again now, the user of the nonlinear vma
> > is penalized,
> 
> Where? Not in the page fault path.... it's as penalized as the rest of the 
> system. Or will direct reclaim have a preference for pages of the calling 
> process?

Not in the page fault path, no; and no, direct reclaim doesn't have that
preference (sounds quite a good idea, but would need a different way of
choosing pages to free, and would conflict with the swap token idea?).

I meant in reclaim: that since try_to_unmap_cluster makes such poor
choices of what to reclaim, and tries to reclaim more than asked because
it's unable to target the page in question, I'd expect the user of a
nonlinear vma to suffer more thrashing under memory pressure.

> So, it would really be better to actually enforce the RSS rlimit when mapping 
> in pages in *nonlinear* areas (and fallback on setting file PTE's like on 
> NONBLOCK & page not in cache), rather than the "current" Rik's idea of 
> marking pages as inactive on memory-hog processes.

I'd go mad if I delved into these issues, luckily we have suckers like Rik
and Nick and Con who are prepared to give their lives to such endless tuning.

> But oh, right in mm/trash.c, the code which should do part of this is fully 
> commented out - and it was in the very first version of the code (looking 
> through bkcvs-git repository).

mm/trash.c?  I got quite excited, but now it looks like you just mean
mm/thrash.c.  Yawn.

Hugh

  parent reply	other threads:[~2005-09-21 15:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-26 18:23 [RFC] [patch 0/18] remap_file_pages protection support (for UML), try 3 Blaisorblade
2005-08-26 19:11 ` Hugh Dickins
2005-08-26 19:58   ` [uml-devel] " Blaisorblade
2005-09-02 21:02 ` Hugh Dickins
2005-09-04 19:10   ` [uml-devel] " Blaisorblade
2005-09-07 12:00     ` Hugh Dickins
2005-09-13 18:25       ` Blaisorblade
2005-09-20 15:06       ` Remap_file_pages, RSS limits, security implications (was: Re: [uml-devel] Re: [RFC] [patch 0/18] remap_file_pages protection support (for UML), try 3) Blaisorblade
2005-09-20 18:23         ` Rik van Riel
2005-09-21 15:16         ` Hugh Dickins [this message]
2005-09-21 16:16           ` Blaisorblade
2005-09-21 16:50             ` Hugh Dickins
2005-09-21 17:02               ` Blaisorblade
2005-09-26 15:58       ` [uml-devel] Re: [RFC] [patch 0/18] remap_file_pages protection support (for UML), try 3 Blaisorblade
2005-09-28 13:37         ` Hugh Dickins
2005-09-28 16:20           ` Blaisorblade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0509211547270.6584@goblin.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=akpm@osdl.org \
    --cc=blaisorblade@yahoo.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).