From: Paolo Bonzini <pbonzini@redhat.com>
To: Dominik Dingel <dingel@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@suse.cz>,
Dave Hansen <dave.hansen@intel.com>,
Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Andy Lutomirski <luto@amacapital.net>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Bob Liu <lliubbo@gmail.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Gleb Natapov <gleb@kernel.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Hugh Dickins <hughd@google.com>, Ingo Molnar <mingo@kernel.org>,
Jianyu Zhan <nasa4836@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
kvm@vger.kernel.org, linux390@de.ibm.com,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Peter Zijlstra <peterz@infradead.org>, Sasha Levin <sasha.levi>
Subject: Re: [PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process
Date: Wed, 22 Oct 2014 15:59:40 +0200 [thread overview]
Message-ID: <5447B84C.4000909@redhat.com> (raw)
In-Reply-To: <1413976170-42501-1-git-send-email-dingel@linux.vnet.ibm.com>
On 10/22/2014 01:09 PM, Dominik Dingel wrote:
> s390 has the special notion of storage keys which are some sort of page flags
> associated with physical pages and live outside of direct addressable memory.
> These storage keys can be queried and changed with a special set of instructions.
> The mentioned instructions behave quite nicely under virtualization, if there is:
> - an invalid pte, then the instructions will work on memory in the host page table
> - a valid pte, then the instructions will work with the real storage key
>
> Thanks to Martin with his software reference and dirty bit tracking,
> the kernel does not issue any storage key instructions as now a
> software based approach will be taken, on the other hand distributions
> in the wild are currently using them.
>
> However, for virtualized guests we still have a problem with guest pages
> mapped to zero pages and the kernel same page merging.
> With each one multiple guest pages will point to the same physical page
> and share the same storage key.
>
> Let's fix this by introducing a new function which s390 will define to
> forbid new zero page mappings. If the guest issues a storage key related
> instruction we flag the mm_struct, drop existing zero page mappings
> and unmerge the guest memory.
>
> v2 -> v3:
> - Clearing up patch description Patch 3/4
> - removing unnecessary flag in mmu_context (Paolo)
... and zero the mm_use_skey flag correctly, too. :)
> v1 -> v2:
> - Following Dave and Paolo suggestion removing the vma flag
Thanks, the patches look good. I expect that they will either go in
through the s390 tree, or come in via Christian.
If the latter, Martin, please reply with your Acked-by.
Paolo
--
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: Paolo Bonzini <pbonzini@redhat.com>
To: Dominik Dingel <dingel@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@suse.cz>,
Dave Hansen <dave.hansen@intel.com>,
Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Andy Lutomirski <luto@amacapital.net>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Bob Liu <lliubbo@gmail.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Gleb Natapov <gleb@kernel.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Hugh Dickins <hughd@google.com>, Ingo Molnar <mingo@kernel.org>,
Jianyu Zhan <nasa4836@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
kvm@vger.kernel.org, linux390@de.ibm.com,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Sasha Levin <sasha.levi
Subject: Re: [PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process
Date: Wed, 22 Oct 2014 15:59:40 +0200 [thread overview]
Message-ID: <5447B84C.4000909@redhat.com> (raw)
In-Reply-To: <1413976170-42501-1-git-send-email-dingel@linux.vnet.ibm.com>
On 10/22/2014 01:09 PM, Dominik Dingel wrote:
> s390 has the special notion of storage keys which are some sort of page flags
> associated with physical pages and live outside of direct addressable memory.
> These storage keys can be queried and changed with a special set of instructions.
> The mentioned instructions behave quite nicely under virtualization, if there is:
> - an invalid pte, then the instructions will work on memory in the host page table
> - a valid pte, then the instructions will work with the real storage key
>
> Thanks to Martin with his software reference and dirty bit tracking,
> the kernel does not issue any storage key instructions as now a
> software based approach will be taken, on the other hand distributions
> in the wild are currently using them.
>
> However, for virtualized guests we still have a problem with guest pages
> mapped to zero pages and the kernel same page merging.
> With each one multiple guest pages will point to the same physical page
> and share the same storage key.
>
> Let's fix this by introducing a new function which s390 will define to
> forbid new zero page mappings. If the guest issues a storage key related
> instruction we flag the mm_struct, drop existing zero page mappings
> and unmerge the guest memory.
>
> v2 -> v3:
> - Clearing up patch description Patch 3/4
> - removing unnecessary flag in mmu_context (Paolo)
... and zero the mm_use_skey flag correctly, too. :)
> v1 -> v2:
> - Following Dave and Paolo suggestion removing the vma flag
Thanks, the patches look good. I expect that they will either go in
through the s390 tree, or come in via Christian.
If the latter, Martin, please reply with your Acked-by.
Paolo
--
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: Paolo Bonzini <pbonzini@redhat.com>
To: Dominik Dingel <dingel@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@suse.cz>,
Dave Hansen <dave.hansen@intel.com>,
Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Andy Lutomirski <luto@amacapital.net>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Bob Liu <lliubbo@gmail.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Gleb Natapov <gleb@kernel.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Hugh Dickins <hughd@google.com>, Ingo Molnar <mingo@kernel.org>,
Jianyu Zhan <nasa4836@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
kvm@vger.kernel.org, linux390@de.ibm.com,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Sasha Levin <sasha.levin@oracle.com>
Subject: Re: [PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process
Date: Wed, 22 Oct 2014 15:59:40 +0200 [thread overview]
Message-ID: <5447B84C.4000909@redhat.com> (raw)
In-Reply-To: <1413976170-42501-1-git-send-email-dingel@linux.vnet.ibm.com>
On 10/22/2014 01:09 PM, Dominik Dingel wrote:
> s390 has the special notion of storage keys which are some sort of page flags
> associated with physical pages and live outside of direct addressable memory.
> These storage keys can be queried and changed with a special set of instructions.
> The mentioned instructions behave quite nicely under virtualization, if there is:
> - an invalid pte, then the instructions will work on memory in the host page table
> - a valid pte, then the instructions will work with the real storage key
>
> Thanks to Martin with his software reference and dirty bit tracking,
> the kernel does not issue any storage key instructions as now a
> software based approach will be taken, on the other hand distributions
> in the wild are currently using them.
>
> However, for virtualized guests we still have a problem with guest pages
> mapped to zero pages and the kernel same page merging.
> With each one multiple guest pages will point to the same physical page
> and share the same storage key.
>
> Let's fix this by introducing a new function which s390 will define to
> forbid new zero page mappings. If the guest issues a storage key related
> instruction we flag the mm_struct, drop existing zero page mappings
> and unmerge the guest memory.
>
> v2 -> v3:
> - Clearing up patch description Patch 3/4
> - removing unnecessary flag in mmu_context (Paolo)
... and zero the mm_use_skey flag correctly, too. :)
> v1 -> v2:
> - Following Dave and Paolo suggestion removing the vma flag
Thanks, the patches look good. I expect that they will either go in
through the s390 tree, or come in via Christian.
If the latter, Martin, please reply with your Acked-by.
Paolo
--
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: Paolo Bonzini <pbonzini@redhat.com>
To: Dominik Dingel <dingel@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@suse.cz>,
Dave Hansen <dave.hansen@intel.com>,
Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Andy Lutomirski <luto@amacapital.net>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Bob Liu <lliubbo@gmail.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Gleb Natapov <gleb@kernel.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Hugh Dickins <hughd@google.com>, Ingo Molnar <mingo@kernel.org>,
Jianyu Zhan <nasa4836@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
kvm@vger.kernel.org, linux390@de.ibm.com,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Sasha Levin <sasha.levin@oracle.com>
Subject: Re: [PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process
Date: Wed, 22 Oct 2014 15:59:40 +0200 [thread overview]
Message-ID: <5447B84C.4000909@redhat.com> (raw)
In-Reply-To: <1413976170-42501-1-git-send-email-dingel@linux.vnet.ibm.com>
On 10/22/2014 01:09 PM, Dominik Dingel wrote:
> s390 has the special notion of storage keys which are some sort of page flags
> associated with physical pages and live outside of direct addressable memory.
> These storage keys can be queried and changed with a special set of instructions.
> The mentioned instructions behave quite nicely under virtualization, if there is:
> - an invalid pte, then the instructions will work on memory in the host page table
> - a valid pte, then the instructions will work with the real storage key
>
> Thanks to Martin with his software reference and dirty bit tracking,
> the kernel does not issue any storage key instructions as now a
> software based approach will be taken, on the other hand distributions
> in the wild are currently using them.
>
> However, for virtualized guests we still have a problem with guest pages
> mapped to zero pages and the kernel same page merging.
> With each one multiple guest pages will point to the same physical page
> and share the same storage key.
>
> Let's fix this by introducing a new function which s390 will define to
> forbid new zero page mappings. If the guest issues a storage key related
> instruction we flag the mm_struct, drop existing zero page mappings
> and unmerge the guest memory.
>
> v2 -> v3:
> - Clearing up patch description Patch 3/4
> - removing unnecessary flag in mmu_context (Paolo)
... and zero the mm_use_skey flag correctly, too. :)
> v1 -> v2:
> - Following Dave and Paolo suggestion removing the vma flag
Thanks, the patches look good. I expect that they will either go in
through the s390 tree, or come in via Christian.
If the latter, Martin, please reply with your Acked-by.
Paolo
next prev parent reply other threads:[~2014-10-22 13:59 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 11:09 [PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` [PATCH 1/4] s390/mm: recfactor global pgste updates Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` [PATCH 2/4] mm: introduce mm_forbids_zeropage function Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 13:59 ` Paolo Bonzini
2014-10-22 13:59 ` Paolo Bonzini
2014-10-22 13:59 ` Paolo Bonzini
2014-10-22 13:59 ` Paolo Bonzini
2014-10-22 19:22 ` Andrew Morton
2014-10-22 19:22 ` Andrew Morton
2014-10-22 19:22 ` Andrew Morton
2014-10-22 19:22 ` Andrew Morton
2014-10-22 19:45 ` Dominik Dingel
2014-10-22 19:45 ` Dominik Dingel
2014-10-22 19:45 ` Dominik Dingel
2014-10-22 19:49 ` Andrew Morton
2014-10-22 19:49 ` Andrew Morton
2014-10-22 19:49 ` Andrew Morton
2014-10-22 19:49 ` Andrew Morton
2014-10-22 11:09 ` [PATCH 3/4] s390/mm: prevent and break zero page mappings in case of storage keys Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 11:09 ` [PATCH 4/4] s390/mm: disable KSM for storage key enabled pages Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 11:09 ` Dominik Dingel
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 14:00 ` Paolo Bonzini
2014-10-22 13:59 ` Paolo Bonzini [this message]
2014-10-22 13:59 ` [PATCH v3 0/4] mm: new function to forbid zeropage mappings for a process Paolo Bonzini
2014-10-22 13:59 ` Paolo Bonzini
2014-10-22 13:59 ` Paolo Bonzini
2014-10-23 10:19 ` Martin Schwidefsky
2014-10-23 10:19 ` Martin Schwidefsky
2014-10-23 10:19 ` Martin Schwidefsky
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=5447B84C.4000909@redhat.com \
--to=pbonzini@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=dave.hansen@intel.com \
--cc=dingel@linux.vnet.ibm.com \
--cc=gleb@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@linux.intel.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=lliubbo@gmail.com \
--cc=luto@amacapital.net \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=mingo@kernel.org \
--cc=nasa4836@gmail.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=schwidefsky@de.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 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.