From: Jeremy Kerr <jk@ozlabs.org>
To: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [RESEND PATCH] powerpc/powernv: Fix vma page prot flags in opal-prd driver
Date: Mon, 29 Jun 2015 13:20:01 +0800 [thread overview]
Message-ID: <5590D581.1020903@ozlabs.org> (raw)
In-Reply-To: <20150629051150.17663.63753.stgit@drishya>
Hi Vaidy,
> opal-prd driver will mmap() firmware code/data area as private
> mapping to prd user space daemon. Write to this page will
> trigger COW faults. The new COW pages are normal kernel RAM
> pages accounted by the kernel and are not special.
>
> vma->vm_page_prot value will be used at page fault time
> for the new COW pages, while pgprot_t value passed in
> remap_pfn_range() is used for the initial page table entry.
>
> Hence:
> * Do not add _PAGE_SPECIAL in vma, but only for remap_pfn_range()
> * Also remap_pfn_range() will add the _PAGE_SPECIAL flag using
> pte_mkspecial() call, hence no need to specify in the driver
>
> This fix resolves the page accounting warning shown below:
> BUG: Bad rss-counter state mm:c0000007d34ac600 idx:1 val:19
>
> The above warning is triggered since _PAGE_SPECIAL was incorrectly
> being set for the normal kernel COW pages.
>
> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Cheers,
Jeremy
next prev parent reply other threads:[~2015-06-29 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 5:17 [RESEND PATCH] powerpc/powernv: Fix vma page prot flags in opal-prd driver Vaidyanathan Srinivasan
2015-06-29 5:20 ` Jeremy Kerr [this message]
2015-07-07 10:38 ` [RESEND] " Michael Ellerman
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=5590D581.1020903@ozlabs.org \
--to=jk@ozlabs.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=svaidy@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).