All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Carsten Otte <cotte@de.ibm.com>
Cc: npiggin@suse.de, EHRHARDT@de.ibm.com, arnd@arndb.de,
	hollisb@us.ibm.com, borntraeger@de.ibm.com,
	kvm-devel@lists.sourceforge.net, heiko.carstens@de.ibm.com,
	jeroney@us.ibm.com, avi@qumranet.com,
	virtualization@lists.linux-foundation.org, linux-mm@kvack.org,
	schwidefsky@de.ibm.com, hugh@veritas.com, rvdheij@gmail.com,
	os@de.ibm.com, jblunck@suse.de, xiantao.zhang@intel.com
Subject: Re: [RFC/PATCH 01/15 v2] preparation: provide hook to enable pgstes in user pagetable
Date: Mon, 24 Mar 2008 14:50:02 -0700	[thread overview]
Message-ID: <20080324145002.d59f9372.akpm@linux-foundation.org> (raw)
In-Reply-To: <1206205357.7177.83.camel@cotte.boeblingen.de.ibm.com>

On Sat, 22 Mar 2008 18:02:37 +0100
Carsten Otte <cotte@de.ibm.com> wrote:

> From: Martin Schwidefsky <schwidefsky@de.ibm.com>
> 
> The SIE instruction on s390 uses the 2nd half of the page table page to
> virtualize the storage keys of a guest. This patch offers the s390_enable_sie
> function, which reorganizes the page tables of a single-threaded process to
> reserve space in the page table:
> s390_enable_sie makes sure that the process is single threaded and then uses
> dup_mm to create a new mm with reorganized page tables. The old mm is freed 
> and the process has now a page status extended field after every page table.
> 
> Code that wants to exploit pgstes should SELECT CONFIG_PGSTE.
> 
> This patch has a small common code hit, namely making dup_mm non-static.
> 
> Edit (Carsten): I've modified Martin's patch, following Jeremy Fitzhardinge's
> review feedback. Now we do have the prototype for dup_mm in
> include/linux/sched.h.
> 
> ...
>
> --- linux-host.orig/kernel/fork.c
> +++ linux-host/kernel/fork.c
> @@ -498,7 +498,7 @@ void mm_release(struct task_struct *tsk,
>   * Allocate a new mm structure and copy contents from the
>   * mm structure of the passed in task structure.
>   */
> -static struct mm_struct *dup_mm(struct task_struct *tsk)
> +struct mm_struct *dup_mm(struct task_struct *tsk)
>  {
>  	struct mm_struct *mm, *oldmm = current->mm;
>  	int err;

ack

> --- linux-host.orig/include/linux/sched.h
> +++ linux-host/include/linux/sched.h
> @@ -1758,6 +1758,8 @@ extern void mmput(struct mm_struct *);
>  extern struct mm_struct *get_task_mm(struct task_struct *task);
>  /* Remove the current tasks stale references to the old mm_struct */
>  extern void mm_release(struct task_struct *, struct mm_struct *);
> +/* Allocate a new mm structure and copy contents from tsk->mm */
> +extern struct mm_struct *dup_mm(struct task_struct *tsk);
>  
>  extern int  copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
>  extern void flush_thread(void);
> 

hm, why did we put these in sched.h?

oh well - acked-by-me.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Carsten Otte <cotte@de.ibm.com>
Cc: virtualization@lists.linux-foundation.org,
	kvm-devel@lists.sourceforge.net, avi@qumranet.com,
	npiggin@suse.de, hugh@veritas.com, linux-mm@kvack.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, os@de.ibm.com,
	borntraeger@de.ibm.com, hollisb@us.ibm.com, EHRHARDT@de.ibm.com,
	jeroney@us.ibm.com, aliguori@us.ibm.com, jblunck@suse.de,
	rvdheij@gmail.com, rusty@rustcorp.com.au, arnd@arndb.de,
	xiantao.zhang@intel.com
Subject: Re: [RFC/PATCH 01/15 v2] preparation: provide hook to enable pgstes in user pagetable
Date: Mon, 24 Mar 2008 14:50:02 -0700	[thread overview]
Message-ID: <20080324145002.d59f9372.akpm@linux-foundation.org> (raw)
In-Reply-To: <1206205357.7177.83.camel@cotte.boeblingen.de.ibm.com>

On Sat, 22 Mar 2008 18:02:37 +0100
Carsten Otte <cotte@de.ibm.com> wrote:

> From: Martin Schwidefsky <schwidefsky@de.ibm.com>
> 
> The SIE instruction on s390 uses the 2nd half of the page table page to
> virtualize the storage keys of a guest. This patch offers the s390_enable_sie
> function, which reorganizes the page tables of a single-threaded process to
> reserve space in the page table:
> s390_enable_sie makes sure that the process is single threaded and then uses
> dup_mm to create a new mm with reorganized page tables. The old mm is freed 
> and the process has now a page status extended field after every page table.
> 
> Code that wants to exploit pgstes should SELECT CONFIG_PGSTE.
> 
> This patch has a small common code hit, namely making dup_mm non-static.
> 
> Edit (Carsten): I've modified Martin's patch, following Jeremy Fitzhardinge's
> review feedback. Now we do have the prototype for dup_mm in
> include/linux/sched.h.
> 
> ...
>
> --- linux-host.orig/kernel/fork.c
> +++ linux-host/kernel/fork.c
> @@ -498,7 +498,7 @@ void mm_release(struct task_struct *tsk,
>   * Allocate a new mm structure and copy contents from the
>   * mm structure of the passed in task structure.
>   */
> -static struct mm_struct *dup_mm(struct task_struct *tsk)
> +struct mm_struct *dup_mm(struct task_struct *tsk)
>  {
>  	struct mm_struct *mm, *oldmm = current->mm;
>  	int err;

ack

> --- linux-host.orig/include/linux/sched.h
> +++ linux-host/include/linux/sched.h
> @@ -1758,6 +1758,8 @@ extern void mmput(struct mm_struct *);
>  extern struct mm_struct *get_task_mm(struct task_struct *task);
>  /* Remove the current tasks stale references to the old mm_struct */
>  extern void mm_release(struct task_struct *, struct mm_struct *);
> +/* Allocate a new mm structure and copy contents from tsk->mm */
> +extern struct mm_struct *dup_mm(struct task_struct *tsk);
>  
>  extern int  copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
>  extern void flush_thread(void);
> 

hm, why did we put these in sched.h?

oh well - acked-by-me.

--
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>

  parent reply	other threads:[~2008-03-24 21:50 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20 16:24 [RFC/PATCH 00/15] kvm on big iron Carsten Otte
2008-03-21 11:02 ` Avi Kivity
2008-03-21 11:22   ` [kvm-devel] " Carsten Otte
2008-03-21 19:44   ` [kvm-ppc-devel] [kvm-devel] buliding and testing PowerPC KVM Hollis Blanchard
2008-03-21 19:44     ` Hollis Blanchard
2008-03-25 16:56     ` [kvm-ppc-devel] [kvm-devel] " Avi Kivity
2008-03-25 16:56       ` Avi Kivity
2008-03-25 18:18       ` [kvm-ppc-devel] [kvm-devel] " Hollis Blanchard
2008-03-25 18:18         ` Hollis Blanchard
2008-03-25 18:21       ` [kvm-ppc-devel] [kvm-devel] " Jerone Young
2008-03-25 18:21         ` Jerone Young
2008-03-25 18:23         ` [kvm-ppc-devel] [kvm-devel] " Jerone Young
2008-03-25 18:23           ` Jerone Young
2008-03-26 16:40           ` [kvm-ppc-devel] [kvm-devel] " Avi Kivity
2008-03-26 16:40             ` Avi Kivity
2008-03-21 11:02 ` [kvm-devel] [RFC/PATCH 00/15] kvm on big iron Avi Kivity
2008-03-22 17:02 ` [RFC/PATCH 00/15 v2] " Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-25 17:47   ` [RFC/PATCH 00/15 v3] " Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-27 12:02     ` Avi Kivity
2008-03-27 12:02     ` Avi Kivity
2008-03-27 12:02       ` Avi Kivity
2008-03-25 17:47   ` Carsten Otte
     [not found]   ` <1206458154.6217.12.camel@cotte.boeblingen.de.ibm.com>
2008-03-25 17:47     ` [RFC/PATCH 01/15 v3] preparation: provide hook to enable pgstes in user pagetable Carsten Otte
2008-03-25 17:47       ` Carsten Otte, Martin Schwidefsky, Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 02/15 v3] preparation: host memory management changes for s390 kvm Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47       ` Carsten Otte, Heiko Carstens, Christian Borntraeger
2008-03-25 17:47     ` [RFC/PATCH 03/15 v3] preparation: address of the 64bit extint parm in lowcore Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 04/15 v3] preparation: split sysinfo defintions for kvm use Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 05/15 v3] kvm-s390: s390 arch backend for the kvm kernel module Carsten Otte
2008-03-31  5:36       ` Arnd Bergmann
2008-04-02 10:20         ` Christian Borntraeger
2008-04-02 10:20         ` Christian Borntraeger
2008-03-31  5:36       ` Arnd Bergmann
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 06/15 v3] kvm-s390: sie intercept handling Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 07/15 v3] kvm-s390: interrupt subsystem, cpu timer, waitpsw Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-31  5:43       ` Arnd Bergmann
2008-03-31  5:43       ` Arnd Bergmann
2008-03-25 17:47     ` [RFC/PATCH 08/15 v3] kvm-s390: intercepts for privileged instructions Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 09/15 v3] kvm-s390: interprocessor communication via sigp Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 10/15 v3] kvm-s390: intercepts for diagnose instructions Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 11/15 v3] kvm-s390: add kvm to kconfig on s390 Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 12/15 v3] kvm-s390: API documentation Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 13/15 v3] kvm-s390: update maintainers Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 14/15 v3] guest: detect when running on kvm Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-25 17:47     ` [RFC/PATCH 15/15 v3] guest: virtio device support, and kvm hypercalls Carsten Otte
2008-03-25 17:47     ` Carsten Otte
2008-03-22 17:02 ` [RFC/PATCH 00/15 v2] kvm on big iron Carsten Otte
     [not found] ` <1206203560.7177.45.camel@cotte.boeblingen.de.ibm.com>
2008-03-22 17:02   ` [RFC/PATCH 01/15 v2] preparation: provide hook to enable pgstes in user pagetable Carsten Otte
2008-03-22 17:02     ` Carsten Otte, Martin Schwidefsky
2008-03-24 21:50     ` Andrew Morton
2008-03-24 21:50     ` Andrew Morton [this message]
2008-03-24 21:50       ` Andrew Morton
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 02/15 v2] preparation: host memory management changes for s390 kvm Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02     ` Carsten Otte, Heiko Carstens, Christian Borntraeger
2008-03-24 21:52     ` Andrew Morton
2008-03-24 21:52     ` Andrew Morton
2008-03-24 21:52       ` Andrew Morton
2008-03-22 17:02   ` [RFC/PATCH 03/15 v2] preparation: address of the 64bit extint parm in lowcore Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 04/15 v2] preparation: split sysinfo defintions for kvm use Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 05/15 v2] kvm-s390: s390 arch backend for the kvm kernel module Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 06/15 v2] kvm-s390: sie intercept handling Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 07/15 v2] kvm-s390: interrupt subsystem, cpu timer, waitpsw Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 08/15 v2] kvm-s390: intercepts for privileged instructions Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 09/15 v2] kvm-s390: interprocessor communication via sigp Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 10/15 v2] kvm-s390: intercepts for diagnose instructions Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 11/15 v2] kvm-s390: add kvm to kconfig on s390 Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:02   ` [RFC/PATCH 12/15 v2] kvm-s390: API documentation Carsten Otte
2008-03-22 17:02   ` Carsten Otte
2008-03-22 17:03   ` [RFC/PATCH 13/15 v2] kvm-s390: update maintainers Carsten Otte
2008-03-22 17:03   ` Carsten Otte
2008-03-22 17:03   ` [RFC/PATCH 14/15 v2] guest: detect when running on kvm Carsten Otte
2008-03-22 17:03   ` Carsten Otte
2008-03-22 17:03   ` [RFC/PATCH 15/15 v2] guest: virtio device support, and kvm hypercalls Carsten Otte
2008-03-22 17:03   ` Carsten Otte

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=20080324145002.d59f9372.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=EHRHARDT@de.ibm.com \
    --cc=arnd@arndb.de \
    --cc=avi@qumranet.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hollisb@us.ibm.com \
    --cc=hugh@veritas.com \
    --cc=jblunck@suse.de \
    --cc=jeroney@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=os@de.ibm.com \
    --cc=rvdheij@gmail.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiantao.zhang@intel.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.