public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] kshmem modifications to actually use kshmem
@ 2007-05-06  1:54 Wink Saville
  0 siblings, 0 replies; only message in thread
From: Wink Saville @ 2007-05-06  1:54 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Signed-off-by: Wink Saville <wink-hKg/bvL8yClBDgjK7y7TUQ@public.gmane.org>
---
  fs/exec.c     |   10 ++++++++++
  init/main.c   |    3 +++
  kernel/fork.c |   10 ++++++++++
  3 files changed, 23 insertions(+), 0 deletions(-)

Index: linux-2.6/fs/exec.c
===================================================================
--- linux-2.6.orig/fs/exec.c	2007-04-29 21:51:39.000000000 -0700
+++ linux-2.6/fs/exec.c	2007-04-29 21:52:04.000000000 -0700
@@ -58,6 +58,10 @@
  #include <linux/kmod.h>
  #endif

+#ifdef CONFIG_KSHMEM
+#include <linux/kshmem.h>
+#endif
+
  int core_uses_pid;
  char core_pattern[128] = "core";
  int suid_dumpable = 0;
@@ -1183,6 +1187,12 @@
  	if (retval < 0)
  		goto out;

+#ifdef CONFIG_KSHMEM
+	retval = kshmem_prepare(bprm->mm);
+	if (retval < 0)
+		goto out;
+#endif
+
  	retval = search_binary_handler(bprm,regs);
  	if (retval >= 0) {
  		free_arg_pages(bprm);
Index: linux-2.6/init/main.c
===================================================================
--- linux-2.6.orig/init/main.c	2007-04-29 21:51:39.000000000 -0700
+++ linux-2.6/init/main.c	2007-04-29 21:56:20.000000000 -0700
@@ -54,6 +54,7 @@
  #include <linux/lockdep.h>
  #include <linux/pid_namespace.h>
  #include <linux/device.h>
+#include <linux/kshmem.h>

  #include <asm/io.h>
  #include <asm/bugs.h>
@@ -615,6 +616,8 @@
  	if (efi_enabled)
  		efi_enter_virtual_mode();
  #endif
+
+	kshmem_init();
  	fork_init(num_physpages);
  	proc_caches_init();
  	buffer_init();
Index: linux-2.6/kernel/fork.c
===================================================================
--- linux-2.6.orig/kernel/fork.c	2007-04-29 21:51:39.000000000 -0700
+++ linux-2.6/kernel/fork.c	2007-04-29 21:52:04.000000000 -0700
@@ -57,6 +57,10 @@
  #include <asm/cacheflush.h>
  #include <asm/tlbflush.h>

+#ifdef CONFIG_KSHMEM
+#include <linux/kshmem.h>
+#endif
+
  /*
   * Protected counters by write_lock_irq(&tasklist_lock)
   */
@@ -221,6 +225,12 @@
  	rb_parent = NULL;
  	pprev = &mm->mmap;

+#ifdef CONFIG_KSHMEM
+	retval = kshmem_prepare(mm);
+	if (retval < 0)
+		goto out;
+#endif
+
  	for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
  		struct file *file;



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-06  1:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-06  1:54 [PATCH 3/3] kshmem modifications to actually use kshmem Wink Saville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox