All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, mike.kravetz@oracle.com
Subject: Re: [RFC] mm/mremap: Remove redundant checks inside vma_expandable()
Date: Tue, 11 Jul 2017 13:22:53 +0200	[thread overview]
Message-ID: <20170711112253.GA11936@dhcp22.suse.cz> (raw)
In-Reply-To: <8bcc5908-7f0d-ba5c-a484-e0763f9b7664@linux.vnet.ibm.com>

On Tue 11-07-17 16:38:46, Anshuman Khandual wrote:
> On 07/11/2017 12:26 PM, Vlastimil Babka wrote:
> > On 07/11/2017 08:50 AM, Michal Hocko wrote:
> >> On Tue 11-07-17 08:26:40, Vlastimil Babka wrote:
> >>> On 07/11/2017 08:03 AM, Michal Hocko wrote:
> >>>>
> >>>> Are you telling me that two if conditions cause more than a second
> >>>> difference? That sounds suspicious.
> >>>
> >>> It's removing also a call to get_unmapped_area(), AFAICS. That means a
> >>> vma search?
> >>
> >> Ohh, right. I have somehow missed that. Is this removal intentional?
> > 
> > I think it is: "Checking for availability of virtual address range at
> > the end of the VMA for the incremental size is also reduntant at this
> > point."
> > 
> >> The
> >> changelog is silent about it.
> > 
> > It doesn't explain why it's redundant, indeed. Unfortunately, the commit
> > f106af4e90ea ("fix checks for expand-in-place mremap") which added this,
> > also doesn't explain why it's needed.
> 
> Its redundant because there are calls to get_unmapped_area() down the
> line in the function whose failure will anyway fail the expansion of
> the VMA.

mremap code is quite complex and I am not sure you are right here.
Anyway, please make sure you document why you believe those checks are
not needed when resubmitting your patch.

-- 
Michal Hocko
SUSE Labs

WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@kernel.org>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, mike.kravetz@oracle.com
Subject: Re: [RFC] mm/mremap: Remove redundant checks inside vma_expandable()
Date: Tue, 11 Jul 2017 13:22:53 +0200	[thread overview]
Message-ID: <20170711112253.GA11936@dhcp22.suse.cz> (raw)
In-Reply-To: <8bcc5908-7f0d-ba5c-a484-e0763f9b7664@linux.vnet.ibm.com>

On Tue 11-07-17 16:38:46, Anshuman Khandual wrote:
> On 07/11/2017 12:26 PM, Vlastimil Babka wrote:
> > On 07/11/2017 08:50 AM, Michal Hocko wrote:
> >> On Tue 11-07-17 08:26:40, Vlastimil Babka wrote:
> >>> On 07/11/2017 08:03 AM, Michal Hocko wrote:
> >>>>
> >>>> Are you telling me that two if conditions cause more than a second
> >>>> difference? That sounds suspicious.
> >>>
> >>> It's removing also a call to get_unmapped_area(), AFAICS. That means a
> >>> vma search?
> >>
> >> Ohh, right. I have somehow missed that. Is this removal intentional?
> > 
> > I think it is: "Checking for availability of virtual address range at
> > the end of the VMA for the incremental size is also reduntant at this
> > point."
> > 
> >> The
> >> changelog is silent about it.
> > 
> > It doesn't explain why it's redundant, indeed. Unfortunately, the commit
> > f106af4e90ea ("fix checks for expand-in-place mremap") which added this,
> > also doesn't explain why it's needed.
> 
> Its redundant because there are calls to get_unmapped_area() down the
> line in the function whose failure will anyway fail the expansion of
> the VMA.

mremap code is quite complex and I am not sure you are right here.
Anyway, please make sure you document why you believe those checks are
not needed when resubmitting your patch.

-- 
Michal Hocko
SUSE Labs

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

  reply	other threads:[~2017-07-11 11:23 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 11:10 [RFC] mm/mremap: Remove redundant checks inside vma_expandable() Anshuman Khandual
2017-07-10 11:10 ` Anshuman Khandual
2017-07-10 13:49 ` Michal Hocko
2017-07-10 13:49   ` Michal Hocko
2017-07-11  4:28   ` Anshuman Khandual
2017-07-11  4:28     ` Anshuman Khandual
2017-07-11  6:03     ` Michal Hocko
2017-07-11  6:03       ` Michal Hocko
2017-07-11  6:26       ` Vlastimil Babka
2017-07-11  6:26         ` Vlastimil Babka
2017-07-11  6:50         ` Michal Hocko
2017-07-11  6:50           ` Michal Hocko
2017-07-11  6:56           ` Vlastimil Babka
2017-07-11  6:56             ` Vlastimil Babka
2017-07-11  7:16             ` Michal Hocko
2017-07-11  7:16               ` Michal Hocko
2017-07-11  7:22               ` Michal Hocko
2017-07-11  7:22                 ` Michal Hocko
2017-07-11 11:19                 ` Anshuman Khandual
2017-07-11 11:19                   ` Anshuman Khandual
2017-07-11 11:11               ` Anshuman Khandual
2017-07-11 11:11                 ` Anshuman Khandual
2017-07-11 11:08             ` Anshuman Khandual
2017-07-11 11:08               ` Anshuman Khandual
2017-07-11 11:22               ` Michal Hocko [this message]
2017-07-11 11:22                 ` Michal Hocko
2017-07-19  6:49                 ` Anshuman Khandual
2017-07-19  6:49                   ` Anshuman Khandual
2017-07-11 11:06           ` Anshuman Khandual
2017-07-11 11:06             ` Anshuman Khandual
2017-07-11  9:44         ` Anshuman Khandual
2017-07-11  9:44           ` Anshuman Khandual
2017-07-11  4:29   ` Anshuman Khandual
2017-07-11  4:29     ` Anshuman Khandual

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=20170711112253.GA11936@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=vbabka@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.