linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: hui yang <yanghui.def@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH 26/26] mm page_fault: Reduce code complexity
Date: Wed, 27 May 2020 10:13:53 -0700	[thread overview]
Message-ID: <20200527171353.GM17206@bombadil.infradead.org> (raw)
In-Reply-To: <1590575610-4546-1-git-send-email-yanghui.def@gmail.com>

On Wed, May 27, 2020 at 06:33:30PM +0800, hui yang wrote:
> if pte_alloc_one fail alloc a page, do_fault_around will return 0.
> and in do_read_fault()->__do_fault(), it also pte_alloc_one a page.
> if pte_alloc_one failed to alloc a page,it will return VM_FAULT_OOM.
> To reduce code complexity,if alloc failed we return VM_FAULT_OOM.

This doesn't reduce code complexity at all.  You've made this error
different from every other error handled by this function because now
it returns directly instead of jumping to 'out:'.  I can't understand
your explanation, and at first glance I'm not even sure this patch is
correct.  Definitely not a simplification, so NAK with this justification.
The patch might be correct, but it'll need a lot better prose than this.


      reply	other threads:[~2020-05-27 17:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 10:33 [PATCH 26/26] mm page_fault: Reduce code complexity hui yang
2020-05-27 17:13 ` Matthew Wilcox [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=20200527171353.GM17206@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=yanghui.def@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;
as well as URLs for NNTP newsgroup(s).