From: Susheel Khiani <skhiani@codeaurora.org>
To: Hugh Dickins <hughd@google.com>
Cc: akpm@linux-foundation.org, peterz@infradead.org, neilb@suse.de,
dhowells@redhat.com, paulmcquad@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [Question] ksm: rmap_item pointing to some stale vmas
Date: Tue, 14 Apr 2015 12:31:29 +0530 [thread overview]
Message-ID: <552CBB49.5000308@codeaurora.org> (raw)
In-Reply-To: <alpine.LSU.2.11.1504101047200.28925@eggly.anvils>
On 04/10/15 23:26, Hugh Dickins wrote:
> On Thu, 9 Apr 2015, Susheel Khiani wrote:
>
>> Hi,
>>
>> We are seeing an issue during try_to_unmap_ksm where in call to
>> try_to_unmap_one is failing.
>>
>> try_to_unmap_ksm in this particular case is trying to go through vmas
>> associated with each rmap_item->anon_vma. What we see is this that the
>> corresponding page is not mapped to any of the vmas associated with 2
>> rmap_item.
>>
>> The associated rmap_item in this case looks like pointing to some valid vma
>> but the said page is not found to be mapped under it. try_to_unmap_one thus
>> fails to find valid ptes for these vmas.
>>
>> At the same time we can see that the page actually is mapped in 2 separate
>> and different vmas which are not part of rmap_item associated with page.
>>
>> So whether rmap_item is pointing to some stale vmas and now the mapping has
>> changed? Or there is something else going on here.
>> p
>> Any pointer would be appreciated.
>
> I expected to be able to argue this away, but no: I think you've found
> a bug, and I think I get it too. I have no idea what's wrong at this
> point, will set aside some time to investigate, and report back.
>
> Which kernel are you using? try_to_unmap_ksm says v3.13 or earlier.
> Probably doesn't affect the bug, but may affect the patch you'll need.
>
> Hugh
>
> --
> 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>
>
We are using kernel-3.10.49 and I have gone through patches of ksm above
this kernel version but didn't find anything relevant w.r.t issue. The
latest patch which we have for KSM on our tree is
668f9abb: mm: close PageTail race
The issue otherwise is difficult to reproduce and is appearing after
days of testing on 512MB Android platform. What I am not able to figure
out is which code path in ksm could actually land us in situation where
in stable_node we still have stale rmap_items with old vmas which are
now unmapped.
In the dumps we can see the new vmas mapping to the page but the new
rmap_items with these new vmas which maps the page are still not updated
in stable_node.
--
Susheel Khiani QUALCOMM INDIA, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Susheel Khiani <skhiani@codeaurora.org>
To: Hugh Dickins <hughd@google.com>
Cc: akpm@linux-foundation.org, peterz@infradead.org, neilb@suse.de,
dhowells@redhat.com, paulmcquad@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [Question] ksm: rmap_item pointing to some stale vmas
Date: Tue, 14 Apr 2015 12:31:29 +0530 [thread overview]
Message-ID: <552CBB49.5000308@codeaurora.org> (raw)
In-Reply-To: <alpine.LSU.2.11.1504101047200.28925@eggly.anvils>
On 04/10/15 23:26, Hugh Dickins wrote:
> On Thu, 9 Apr 2015, Susheel Khiani wrote:
>
>> Hi,
>>
>> We are seeing an issue during try_to_unmap_ksm where in call to
>> try_to_unmap_one is failing.
>>
>> try_to_unmap_ksm in this particular case is trying to go through vmas
>> associated with each rmap_item->anon_vma. What we see is this that the
>> corresponding page is not mapped to any of the vmas associated with 2
>> rmap_item.
>>
>> The associated rmap_item in this case looks like pointing to some valid vma
>> but the said page is not found to be mapped under it. try_to_unmap_one thus
>> fails to find valid ptes for these vmas.
>>
>> At the same time we can see that the page actually is mapped in 2 separate
>> and different vmas which are not part of rmap_item associated with page.
>>
>> So whether rmap_item is pointing to some stale vmas and now the mapping has
>> changed? Or there is something else going on here.
>> p
>> Any pointer would be appreciated.
>
> I expected to be able to argue this away, but no: I think you've found
> a bug, and I think I get it too. I have no idea what's wrong at this
> point, will set aside some time to investigate, and report back.
>
> Which kernel are you using? try_to_unmap_ksm says v3.13 or earlier.
> Probably doesn't affect the bug, but may affect the patch you'll need.
>
> Hugh
>
> --
> 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>
>
We are using kernel-3.10.49 and I have gone through patches of ksm above
this kernel version but didn't find anything relevant w.r.t issue. The
latest patch which we have for KSM on our tree is
668f9abb: mm: close PageTail race
The issue otherwise is difficult to reproduce and is appearing after
days of testing on 512MB Android platform. What I am not able to figure
out is which code path in ksm could actually land us in situation where
in stable_node we still have stale rmap_items with old vmas which are
now unmapped.
In the dumps we can see the new vmas mapping to the page but the new
rmap_items with these new vmas which maps the page are still not updated
in stable_node.
--
Susheel Khiani QUALCOMM INDIA, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2015-04-14 7:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 14:05 [Question] ksm: rmap_item pointing to some stale vmas Susheel Khiani
2015-04-09 14:05 ` Susheel Khiani
2015-04-10 17:56 ` Hugh Dickins
2015-04-10 17:56 ` Hugh Dickins
2015-04-14 7:01 ` Susheel Khiani [this message]
2015-04-14 7:01 ` Susheel Khiani
2015-04-15 6:22 ` Hugh Dickins
2015-04-15 6:22 ` Hugh Dickins
2015-04-30 6:07 ` Susheel Khiani
2015-04-30 6:07 ` Susheel Khiani
2015-06-09 18:26 ` Susheel Khiani
2015-06-09 18:26 ` Susheel Khiani
2015-06-22 5:19 ` Susheel Khiani
2015-06-22 5:19 ` Susheel Khiani
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=552CBB49.5000308@codeaurora.org \
--to=skhiani@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=neilb@suse.de \
--cc=paulmcquad@gmail.com \
--cc=peterz@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 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.