From: Andrew Morton <akpm@osdl.org>
To: Terence Ripperda <tripperda@nvidia.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] VM accounting change
Date: Thu, 11 Nov 2004 15:07:10 -0800 [thread overview]
Message-ID: <20041111150710.6855398a.akpm@osdl.org> (raw)
In-Reply-To: <20041111223245.GA15759@hygelac>
Terence Ripperda <tripperda@nvidia.com> wrote:
>
> I've been told that recent changes in vm accounting in mmap have
> caused some problems with our driver during mmap.
>
> the problem seems to stem from us oring vma->vm_flags w/ (VM_LOCKED
> | VM_IO). we do this for agp and pci pages that are mapped to push
> buffers. VM_LOCKED since we don't want the pages to move and VM_IO so
> they are not dumped during a core dump.
VM_LOCKED|VM_IO doesn't seem to be a sane combination. VM_LOCKED means
"don't page it out" and VM_IO means "an IO region". The kernel never even
attempts to page out IO regions because they don't have reverse mappings.
Heck, they don't even have pageframes.
How about you drop the VM_LOCKED?
> diff -ru linux-2.6.10-rc1-bk8/mm/mmap.c linux-2.6.10-rc1-bk8-2/mm/mmap.c
> --- linux-2.6.10-rc1-bk8/mm/mmap.c 2004-11-06 15:04:28.000000000 +0100
> +++ linux-2.6.10-rc1-bk8-2/mm/mmap.c 2004-11-06 15:39:47.000000000 +0100
> @@ -1011,7 +1011,8 @@
> __vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
> if (vm_flags & VM_LOCKED) {
> mm->locked_vm += len >> PAGE_SHIFT;
> - make_pages_present(addr, addr + len);
> + if (!(vm_flags & VM_IO))
> + make_pages_present(addr, addr + len);
Spose we could do that on the basis of "don't break existing drivers which
are doing peculiar things".
next prev parent reply other threads:[~2004-11-11 23:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-11 22:32 [patch] VM accounting change Terence Ripperda
2004-11-11 23:07 ` Andrew Morton [this message]
2004-11-12 0:13 ` Terence Ripperda
2004-11-12 0:27 ` Andrew Morton
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=20041111150710.6855398a.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tripperda@nvidia.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