mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Jes Sorensen <jes@sgi.com>
Cc: Dmitry Monakhov <dmonakhov@sw.ru>,
	Christoph Hellwig <hch@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, holt@sgi.com
Subject: Re: [patch] mm: recheck lock rlim after f_op->mmap() method
Date: Wed, 11 Jul 2007 19:24:13 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0707111906180.22786@blonde.wat.veritas.com> (raw)
In-Reply-To: <46949751.1060701@sgi.com>

On Wed, 11 Jul 2007, Jes Sorensen wrote:
> Hugh Dickins wrote:
> > 
> > Or would this simpler patch be the right one?  I suspect the
> > mspec driver only says VM_LOCKED because of a deep-seated but
> > irrational fear that its pages might fall into reclaim.
> 
> My mind is rusty on this one, so I checked with Robin Holt and his
> is too .... most likely mspec has it for legacy problems, if your
> change shows up to cause new problems, we'll fix them when they appear.
> So from our side, it's fine to go ahead with this patch.

Thanks a lot, Jes: you're right, it probably did something useful
(though incorrectly) in 2.4, but we'd better get rid of it now.
I've Cc'ed Andrew, hoping he'll magically pick up the patch...


[PATCH] mspec_mmap don't set VM_LOCKED

mspec_mmap was setting VM_LOCKED (without adjusting locked_vm):
don't do that, it serves no purpose in 2.6, other than to mess
up the locked_vm accounting - mspec's pages won't get reclaimed
anyway.  Thanks to Dmitry Monakhov for raising the issue.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Jes Sorensen <jes@sgi.com>

--- 2.6.22/drivers/char/mspec.c	2007-04-26 04:08:32.000000000 +0100
+++ linux/drivers/char/mspec.c	2007-07-10 18:12:11.000000000 +0100
@@ -265,7 +265,7 @@ mspec_mmap(struct file *file, struct vm_
 	vdata->refcnt = ATOMIC_INIT(1);
 	vma->vm_private_data = vdata;
 
-	vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED | VM_PFNMAP);
+	vma->vm_flags |= (VM_IO | VM_RESERVED | VM_PFNMAP);
 	if (vdata->type == MSPEC_FETCHOP || vdata->type == MSPEC_UNCACHED)
 		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 	vma->vm_ops = &mspec_vm_ops;

  reply	other threads:[~2007-07-11 18:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-09 18:49 Dmitry Monakhov
2007-07-10 17:27 ` Hugh Dickins
2007-07-10 17:53   ` Dmitry Monakhov
2007-07-10 19:48     ` Hugh Dickins
2007-07-11  8:39   ` Jes Sorensen
2007-07-11 18:24     ` Hugh Dickins [this message]
2007-07-11  9:32   ` Christoph Hellwig
2007-07-11 10:12     ` Dmitry Monakhov
2007-07-11 10:14       ` Christoph Hellwig
2007-07-11 18:03         ` Hugh Dickins
2007-07-13  9:53           ` Christoph Hellwig
2007-07-13  8:13 ` Andrew Morton
2007-07-13 13:02   ` Hugh Dickins

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.64.0707111906180.22786@blonde.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=akpm@linux-foundation.org \
    --cc=dmonakhov@sw.ru \
    --cc=hch@infradead.org \
    --cc=holt@sgi.com \
    --cc=jes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®