From: "Zi Yan" <zi.yan@cs.rutgers.edu>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Michal Hocko" <mhocko@kernel.org>,
"Naoya Horiguchi" <n-horiguchi@ah.jp.nec.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Andrea Reale" <ar@linux.vnet.ibm.com>,
"Anshuman Khandual" <khandual@linux.vnet.ibm.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
"Michal Hocko" <mhocko@suse.com>
Subject: Re: [PATCH 1/3] mm, numa: rework do_pages_move
Date: Mon, 29 Jan 2018 18:39:01 -0500 [thread overview]
Message-ID: <07425013-A7A9-4BB8-8FAA-9581D966A29B@cs.rutgers.edu> (raw)
In-Reply-To: <20180129143522.68a5332ae80d28461441a6be@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
On 29 Jan 2018, at 17:35, Andrew Morton wrote:
> On Mon, 29 Jan 2018 17:06:14 -0500 "Zi Yan" <zi.yan@cs.rutgers.edu> wrote:
>
>> I discover that this patch does not hold mmap_sem while migrating pages in
>> do_move_pages_to_node().
>>
>> A simple fix below moves mmap_sem from add_page_for_migration()
>> to the outmost do_pages_move():
>
> I'm not surprised. Why does do_move_pages_to_node() need mmap_sem
> and how is a reader to discover that fact???
do_move_pages_to_node() calls migrate_pages(), which requires down_read(&mmap_sem).
In the outmost do_pages_move(), both add_page_for_migration() and
do_move_pages_to_node() inside it need to hold read lock of mmap_sem.
Do we need to add comments for both functions?
--
Best Regards
Yan Zi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 496 bytes --]
next prev parent reply other threads:[~2018-01-29 23:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 8:25 [PATCH 0/3] unclutter thp migration Michal Hocko
2018-01-03 8:25 ` [PATCH 1/3] mm, numa: rework do_pages_move Michal Hocko
2018-01-05 3:52 ` Anshuman Khandual
2018-01-05 9:14 ` Michal Hocko
2018-01-05 9:20 ` Anshuman Khandual
2018-01-05 9:33 ` Michal Hocko
2018-01-05 17:15 ` Christopher Lameter
2018-01-05 18:09 ` Michal Hocko
2018-01-05 18:41 ` Christopher Lameter
2018-01-05 18:48 ` Michal Hocko
2018-01-05 19:27 ` Christopher Lameter
2018-01-05 19:44 ` Michal Hocko
2018-01-29 22:06 ` Zi Yan
2018-01-29 22:35 ` Andrew Morton
2018-01-29 23:39 ` Zi Yan [this message]
2018-01-29 23:48 ` Andrew Morton
2018-01-03 8:25 ` [PATCH 2/3] mm, migrate: remove reason argument from new_page_t Michal Hocko
2018-01-03 9:11 ` Michal Hocko
2018-01-03 14:00 ` Anshuman Khandual
2018-01-03 14:09 ` Michal Hocko
2018-01-03 14:19 ` Anshuman Khandual
2018-01-03 8:25 ` [PATCH 3/3] mm: unclutter THP migration 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=07425013-A7A9-4BB8-8FAA-9581D966A29B@cs.rutgers.edu \
--to=zi.yan@cs.rutgers.edu \
--cc=akpm@linux-foundation.org \
--cc=ar@linux.vnet.ibm.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=n-horiguchi@ah.jp.nec.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 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).