From: Wink Saville <wink-hKg/bvL8yClBDgjK7y7TUQ@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH 3/3] kshmem modifications to actually use kshmem
Date: Sat, 05 May 2007 18:54:02 -0700 [thread overview]
Message-ID: <463D353A.90502@saville.com> (raw)
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/
reply other threads:[~2007-05-06 1:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=463D353A.90502@saville.com \
--to=wink-hkg/bvl8yclbdgjk7y7tuq@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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