From: "Nish Aravamudan" <nish.aravamudan@gmail.com>
To: Ken Chen <kenchen@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: hugetlb: preserve hugetlb pte dirty state
Date: Tue, 6 Feb 2007 13:36:45 -0800 [thread overview]
Message-ID: <29495f1d0702061336ra41f060id52db9a1a26d47aa@mail.gmail.com> (raw)
In-Reply-To: <b040c32a0702061306l771d2b71s719cee7cf4713e71@mail.gmail.com>
On 2/6/07, Ken Chen <kenchen@google.com> wrote:
> __unmap_hugepage_range() is buggy that it does not preserve dirty
> state of huge_pte when unmapping hugepage range. It causes data
> corruption in the event of dop_caches being used by sys admin.
> For example, an application creates a hugetlb file, modify pages,
> then unmap it. While leaving the hugetlb file alive, comes along
> sys admin doing a "echo 3 > /proc/sys/vm/drop_caches".
> drop_pagecache_sb() will happily frees all pages that isn't marked
> dirty if there are no active mapping. Later when application remaps
> the hugetlb file back and all data are gone, triggering catastrophic
> flip over on application.
>
> Not only that, the internal resv_huge_pages count will also get all
> messed up. Fix it up by marking page dirty appropriately.
>
> Signed-off-by: Ken Chen <kenchen@google.com>
This fixes my bug with HugePages_Rsvd going to 2^64 - 1.
("Hugepages_Rsvd goes huge in 2.6.20-rc7" is the subject on linux-mm).
Stable material, too, I would say.
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Thanks,
Nish
--
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>
next prev parent reply other threads:[~2007-02-06 21:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-06 21:06 Ken Chen
2007-02-06 21:36 ` Nish Aravamudan [this message]
2007-02-06 21:43 ` Ken Chen
2007-02-07 0:35 ` Andrew Morton
2007-02-07 0:47 ` Ken Chen
2007-02-07 1:08 ` Andrew Morton
2007-02-07 1:22 ` Ken Chen
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=29495f1d0702061336ra41f060id52db9a1a26d47aa@mail.gmail.com \
--to=nish.aravamudan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kenchen@google.com \
--cc=linux-mm@kvack.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