linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Adds Kconfig option for Cross Memory Attach
@ 2012-04-23  4:12 Christopher Yeoh
  2012-04-23 15:48 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Yeoh @ 2012-04-23  4:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Hi Andrew,

Attached is a patch which you asked for a while back which adds a
Kconfig option to allow people who don't want cross memory attach to not
have it included in their build.

Regards,

Chris
-- 
cyeoh@au.ibm.com

Signed-off-by: Chris Yeoh <yeohc@au1.ibm.com>
 Kconfig  |   11 +++++++++++
 Makefile |    7 +++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index e338407..7619f90 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -379,3 +379,14 @@ config CLEANCACHE
 	  in a negligible performance hit.
 
 	  If unsure, say Y to enable cleancache
+
+config CROSS_MEMORY_ATTACH
+	bool "Cross Memory Support"
+	depends on MMU
+	default y
+	help
+	  Enabling this option adds the system calls process_vm_readv and
+	  process_vm_writev which allow a process with the correct privileges
+	  to directly read from or write to to another process's address space.
+	  See the man page for more details.
+
diff --git a/mm/Makefile b/mm/Makefile
index 50ec00e..1ddd00f 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -5,8 +5,11 @@
 mmu-y			:= nommu.o
 mmu-$(CONFIG_MMU)	:= fremap.o highmem.o madvise.o memory.o mincore.o \
 			   mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
-			   vmalloc.o pagewalk.o pgtable-generic.o \
-			   process_vm_access.o
+			   vmalloc.o pagewalk.o pgtable-generic.o
+
+ifdef CONFIG_CROSS_MEMORY_ATTACH
+mmu-$(CONFIG_MMU)	+= process_vm_access.o
+endif
 
 obj-y			:= filemap.o mempool.o oom_kill.o fadvise.o \
 			   maccess.o page_alloc.o page-writeback.o \


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Adds Kconfig option for Cross Memory Attach
  2012-04-23  4:12 [PATCH] Adds Kconfig option for Cross Memory Attach Christopher Yeoh
@ 2012-04-23 15:48 ` Randy Dunlap
  2012-04-24  2:13   ` Christopher Yeoh
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2012-04-23 15:48 UTC (permalink / raw)
  To: Christopher Yeoh; +Cc: Andrew Morton, linux-kernel

On 04/22/2012 09:12 PM, Christopher Yeoh wrote:

> Hi Andrew,
> 
> Attached is a patch which you asked for a while back which adds a
> Kconfig option to allow people who don't want cross memory attach to not
> have it included in their build.


and it shouldn't be default y.

Linus has written a diatribe on [not] making new options
default to y.

-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Adds Kconfig option for Cross Memory Attach
  2012-04-23 15:48 ` Randy Dunlap
@ 2012-04-24  2:13   ` Christopher Yeoh
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Yeoh @ 2012-04-24  2:13 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Andrew Morton, linux-kernel

On Mon, 23 Apr 2012 08:48:52 -0700
Randy Dunlap <rdunlap@xenotime.net> wrote:
> On 04/22/2012 09:12 PM, Christopher Yeoh wrote:
> 
> > Hi Andrew,
> > 
> > Attached is a patch which you asked for a while back which adds a
> > Kconfig option to allow people who don't want cross memory attach
> > to not have it included in their build.
> 
> 
> and it shouldn't be default y.
> 
> Linus has written a diatribe on [not] making new options
> default to y.

I'm not that fussed, but currently CMA is enabled whether you like it
or not. This just allows you to disable it. IIRC there was an exception
where a new config option allows you to disable an old feature
(although CMA has not been out that long).

Regards,

Chris
-- 
cyeoh@au.ibm.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-24  2:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23  4:12 [PATCH] Adds Kconfig option for Cross Memory Attach Christopher Yeoh
2012-04-23 15:48 ` Randy Dunlap
2012-04-24  2:13   ` Christopher Yeoh

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