linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Huang\, Ying" <ying.huang@intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	 Rafael Aquini <aquini@redhat.com>,
	 Hugh Dickins <hughd@google.com>,
	 "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	 Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: [PATCH] mm: Fix a race during split THP
Date: Sat, 10 Oct 2020 08:26:26 +0800	[thread overview]
Message-ID: <87362n7wp9.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20201009132704.GS20115@casper.infradead.org> (Matthew Wilcox's message of "Fri, 9 Oct 2020 14:27:04 +0100")

Matthew Wilcox <willy@infradead.org> writes:

> On Fri, Oct 09, 2020 at 03:36:47PM +0800, Huang, Ying wrote:
>> +	if (PageSwapCache(head)) {
>> +		swp_entry_t entry = { .val = page_private(head) };
>> +
>> +		split_swap_cluster(entry);
>> +	}
> ...
>> -		if (PageSwapCache(head)) {
>> -			swp_entry_t entry = { .val = page_private(head) };
>> -
>> -			ret = split_swap_cluster(entry);
>
> Are we sure split_swap_cluster() can't fail?  Or if it does fail, it's
> OK to continue with the split and not report the error?

split_swap_cluster() can only fail for invalid swap entry.  Which isn't
expected to happen in this situation.

Best Regards,
Huang, Ying


  reply	other threads:[~2020-10-10  0:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09  7:36 Huang, Ying
2020-10-09  7:47 ` Huang, Ying
2020-10-09 13:22 ` Kirill A. Shutemov
2020-10-09 13:27 ` Matthew Wilcox
2020-10-10  0:26   ` Huang, Ying [this message]
2020-10-27 10:25 ` Michal Hocko
2020-10-28 22:43   ` Andrew Morton
2020-10-29  9:46     ` Michal Hocko

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=87362n7wp9.fsf@yhuang-dev.intel.com \
    --to=ying.huang@intel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.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