From: shu wang <malate_wangshu@hotmail.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>
Subject: RE: [Bug 211287] New: Softdirty bit does not work with hugetlb
Date: Fri, 22 Jan 2021 18:42:18 +0000 [thread overview]
Message-ID: <BYAPR12MB336517610C8BEABEFBF95EA9F1A09@BYAPR12MB3365.namprd12.prod.outlook.com> (raw)
In-Reply-To: <999775bf-4204-2bec-7c3d-72d81b4fce30@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
Our use case is:
We maps both PMEM and hugetlb DRAM to process’s address space to provide large amount of memory to the application. Periodically, we clear the soft dirty bit by writing ‘4’ to the clear_refs. Then, we check the page’s soft dirty bit from pagemap and use this information to track write activity to memory. We migrate the data between DRAM and PMEM based the write activity for better performance.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Mike Kravetz<mailto:mike.kravetz@oracle.com>
Sent: 2021年1月21日 16:58
To: malate_wangshu@hotmail.com<mailto:malate_wangshu@hotmail.com>
Cc: Linux Memory Management List<mailto:linux-mm@kvack.org>
Subject: [Bug 211287] New: Softdirty bit does not work with hugetlb
>> Start Bug Report <<
Bug ID: 211287
https://bugzilla.kernel.org/show_bug.cgi?id=211287
Summary: Softdirty bit does not work with hugetlb
When a memory region is mapped with huge pages, the softdirty bit is set only
right after the huge pages is mapped. After the memory mapping, if the
softdirty bit is cleared and the memory is written again, the softdirty bit is
not set when reading from the process's pagemap.
>> End Bug Report <<
I am not surprised with this reported bug. The page fault code diverges
pretty quickly for hugetlb pages. I have not looked closely at the details
of soft dirty, and do not immediately see where in the fault path for normal
pages it gets reset. But, I only took a quick glance.
I can work on adding support for hugetlb.
Can you provide some details about your use case?
--
Mike Kravetz
[-- Attachment #2: Type: text/html, Size: 4192 bytes --]
next prev parent reply other threads:[~2021-01-22 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 0:58 Mike Kravetz
2021-01-22 18:42 ` shu wang [this message]
2021-01-22 21:50 ` Mike Kravetz
2021-02-02 1:02 ` Mike Kravetz
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=BYAPR12MB336517610C8BEABEFBF95EA9F1A09@BYAPR12MB3365.namprd12.prod.outlook.com \
--to=malate_wangshu@hotmail.com \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.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