All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang@huawei.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	akpm@linux-foundation.org, qiuxishi@huawei.com, vbabka@suse.cz,
	mm-commits@vger.kernel.org,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Mel Gorman <mgorman@suse.de>,
	linux-mm@kvack.org
Subject: Re: + mm-hugetlb-fix-race-when-migrate-pages.patch added to -mm tree
Date: Thu, 21 Jul 2016 21:58:23 +0800	[thread overview]
Message-ID: <5790D4FF.8070907@huawei.com> (raw)
In-Reply-To: <20160721134044.GL26379@dhcp22.suse.cz>

On 2016/7/21 21:40, Michal Hocko wrote:
> On Thu 21-07-16 21:25:38, zhong jiang wrote:
>> On 2016/7/21 20:55, Michal Hocko wrote:
> [...]
>>> OK, now I understand what you mean. So you mean that a different process
>>> initiates the migration while this path copies to pte. That is certainly
>>> possible but I still fail to see what is the problem about that.
>>> huge_pte_alloc will return the identical pte whether it is regular or
>>> migration one. So what exactly is the problem?
>>>
>> copy_hugetlb_page_range obtain the shared dst_pte, it may be not equal
>> to the src_pte.  The dst_pte can come from other process sharing the
>> mapping.
> So you mean that the parent doesn't have the shared pte while the child
> would get one?
>  
   no,  parent must have the shared pte because the the child copy the parent.  but parent is
  not the only source pte we can get.  when we scan the maping->i_mmap, firstly ,it can obtain
  a shared pte from other process.   but I am not sure.
>> 		/* If the pagetables are shared don't copy or take references */
>> 		if (dst_pte == src_pte)
>> 			continue;
>>  
>> Even it do the fork path, we scan the i_mmap to find same pte. I think
>> that dst_pte may come from other process. It is not the parent. it
>> will lead to the dst_pte is not equal to the src_pte from the parent.
> Let's say this would be possible (I am not really sure but for the sake
> of argumentation), if the src is not shared while dst is shared and the
> page is under migration then all the page table should be marked as
> swap migrate entries no? If they are not and copy_hugetlb_page_range
> cannot handle with that then it is a bug in copy_hugetlb_page_range
> which doesn't have anything to do with the BUG_ON in  huge_pte_alloc.
> So I would argue that if the problem exists at all it is a separate
> issue IMHO.
  yes,  it is a separate issule.
> Naoya, could you comment on that please?


--
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:[~2016-07-21 14:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 23:06 + mm-hugetlb-fix-race-when-migrate-pages.patch added to -mm tree akpm
2016-07-21  7:43 ` Michal Hocko
2016-07-21  8:13   ` Naoya Horiguchi
2016-07-21 10:29     ` Michal Hocko
2016-07-21 10:54   ` zhong jiang
2016-07-21 11:27     ` Michal Hocko
2016-07-21 12:14       ` zhong jiang
2016-07-21 12:30         ` Michal Hocko
2016-07-21 12:45           ` zhong jiang
2016-07-21 12:55             ` Michal Hocko
2016-07-21 13:25               ` zhong jiang
2016-07-21 13:40                 ` Michal Hocko
2016-07-21 13:58                   ` zhong jiang [this message]
2016-07-21 14:01                     ` Michal Hocko
2016-07-21 14:13                       ` zhong jiang
2016-07-21 14:27                         ` Michal Hocko
2016-07-21 14:33                           ` zhong jiang
2016-07-22  7:17                             ` Naoya Horiguchi
2016-07-26  7:58                               ` Michal Hocko
2016-07-26 14:04                                 ` zhong jiang
2016-07-27 14:44                                   ` Michal Hocko
2016-07-29 11:27   ` Michal Hocko
2016-07-30  6:33     ` zhong jiang
2016-08-01 11:02       ` Michal Hocko
2016-08-01 15:04         ` zhong jiang
2016-08-01 15:31           ` Michal Hocko
     [not found] <003701d1e328$202ca9d0$6085fd70$@alibaba-inc.com>
2016-07-21  8:19 ` Hillf Danton
2016-07-21  8:19   ` Hillf Danton

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=5790D4FF.8070907@huawei.com \
    --to=zhongjiang@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=mike.kravetz@oracle.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=qiuxishi@huawei.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.