From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
To: Huang Shijie <shijie8@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] remove unused line for mmap_region()
Date: Wed, 24 Jun 2009 05:22:48 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0906240512300.31848@sister.anvils> (raw)
In-Reply-To: <4A419A7F.8050604@gmail.com>
On Wed, 24 Jun 2009, Huang Shijie wrote:
> > What I expect you to find in the end is that every driver which does
> > meddle with pgoff in its ->mmap, also has some other characteristic
> > (e.g. sets VM_IO or VM_DONTEXPAND or VM_RESERVED or VM_PFNMAP, or
> > even some other flag which the new vm_flags wouldn't have set),
> > which will prevent its vmas being merged anyway.
> >
> Unfortunately,the driver's -->mmap is called below the vma_merge(),
> so even if the driver sets the VM_SPECIAL flag, it does not prevent the
> vmas being merged actually.
It does not prevent it by virtue of being VM_SPECIAL at that point,
you're right, but I believe it does prevent it by virtue of presenting
a different vm_flags. Collapsing a definition to make it clearer, see
if ((vma->vm_flags ^ vm_flags) & ~VM_CAN_NONLINEAR)
return 0;
at the beginning of is_mergeable_vma(). We have to make an exception
of VM_CAN_NONLINEAR precisely because it gets set by a normal ->mmap,
but cannot be predicted by mmap_region() before its vma_merge().
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2009-06-24 4:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-21 14:43 Huang Shijie
2009-06-21 18:30 ` Hugh Dickins
2009-06-22 3:50 ` Huang Shijie
2009-06-23 11:14 ` Hugh Dickins
2009-06-24 3:16 ` Huang Shijie
2009-06-24 4:22 ` Hugh Dickins [this message]
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.0906240512300.31848@sister.anvils \
--to=hugh.dickins@tiscali.co.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=shijie8@gmail.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