LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Export tiny shmem_file_setup for DRM-GEM
@ 2008-10-19 11:52 Hugh Dickins
  2008-10-20 18:02 ` Matt Mackall
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hugh Dickins @ 2008-10-19 11:52 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Keith Packard, Eric Anholt, Nick Piggin, Matt Mackall,
	David Howells, linux-kernel

We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without
swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches
to combine them).  I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup)
go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too?
But caution says still depend on MMU, since !CONFIG_MMU is.. different.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
I should admit that I've not actually tested this patch,
but can't imagine why it would be a problem: if you gobble
up too much RAM, well, that's just life with tiny-shmem.

I did promise a patch to make read_mapping_page() return -EINVAL instead
of oopsing when the underlying filesystem doesn't support it.  But that
was when people were trying to persuade GEM to map files on whatever fs:
I can't now see the point of such a patch while you're known to be on
tmpfs or ramfs, and intending later to use a new interface from Nick.

 drivers/gpu/drm/Kconfig |    2 +-
 mm/tiny-shmem.c         |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -6,7 +6,7 @@
 #
 menuconfig DRM
 	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
-	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && SHMEM
+	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
 	help
 	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
 	  introduced in XFree86 4.0. If you say Y here, you need to select
--- a/mm/tiny-shmem.c
+++ b/mm/tiny-shmem.c
@@ -95,6 +95,7 @@ put_dentry:
 put_memory:
 	return ERR_PTR(error);
 }
+EXPORT_SYMBOL_GPL(shmem_file_setup);
 
 /**
  * shmem_zero_setup - setup a shared anonymous mapping

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

* Re: [PATCH] Export tiny shmem_file_setup for DRM-GEM
  2008-10-19 11:52 [PATCH] Export tiny shmem_file_setup for DRM-GEM Hugh Dickins
@ 2008-10-20 18:02 ` Matt Mackall
  2008-10-20 18:47   ` Hugh Dickins
  2008-10-20 20:20 ` Dave Airlie
  2008-10-20 23:04 ` Hugh Dickins
  2 siblings, 1 reply; 6+ messages in thread
From: Matt Mackall @ 2008-10-20 18:02 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Dave Airlie, Keith Packard, Eric Anholt, Nick Piggin,
	David Howells, linux-kernel

On Sun, 2008-10-19 at 12:52 +0100, Hugh Dickins wrote:
> We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without
> swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches
> to combine them).  I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup)
> go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too?
> But caution says still depend on MMU, since !CONFIG_MMU is.. different.
> 
> Signed-off-by: Hugh Dickins <hugh@veritas.com>

Acked-by: Matt Mackall <mpm@selenic.com>

Hugh, what path do you usually take for upstreaming shmem bits and what
path should I take with my unify patch?

-- 
Mathematics is the supreme nostalgia of our time.


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

* Re: [PATCH] Export tiny shmem_file_setup for DRM-GEM
  2008-10-20 18:02 ` Matt Mackall
@ 2008-10-20 18:47   ` Hugh Dickins
  2008-10-20 19:38     ` Matt Mackall
  0 siblings, 1 reply; 6+ messages in thread
From: Hugh Dickins @ 2008-10-20 18:47 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Dave Airlie, Keith Packard, Eric Anholt, Nick Piggin,
	David Howells, linux-kernel

On Mon, 20 Oct 2008, Matt Mackall wrote:
> On Sun, 2008-10-19 at 12:52 +0100, Hugh Dickins wrote:
> > We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without
> > swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches
> > to combine them).  I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup)
> > go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too?
> > But caution says still depend on MMU, since !CONFIG_MMU is.. different.
> > 
> > Signed-off-by: Hugh Dickins <hugh@veritas.com>
> 
> Acked-by: Matt Mackall <mpm@selenic.com>

Thanks.

> 
> Hugh, what path do you usually take for upstreaming shmem bits and what
> path should I take with my unify patch?

I send them to Andrew (Cc linux-kernel and/or linux-mm, erratic which,
at best depending on what the area of interest is - there's not much
of interest to linux-mm in the case of this unification) to get their
airing in -mm until the next merge window.

You could do that, or were you expecting me to pick up what you had?
We can do it that way too if you prefer: as things stood, I think
you were intending to add a patch to remove that redundant function,
and another to remove CONFIG_TMPFS - but I can do them if you prefer.

Hugh

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

* Re: [PATCH] Export tiny shmem_file_setup for DRM-GEM
  2008-10-20 18:47   ` Hugh Dickins
@ 2008-10-20 19:38     ` Matt Mackall
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Mackall @ 2008-10-20 19:38 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Dave Airlie, Keith Packard, Eric Anholt, Nick Piggin,
	David Howells, linux-kernel

On Mon, 2008-10-20 at 19:47 +0100, Hugh Dickins wrote:
> On Mon, 20 Oct 2008, Matt Mackall wrote:
> > On Sun, 2008-10-19 at 12:52 +0100, Hugh Dickins wrote:
> > > We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without
> > > swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches
> > > to combine them).  I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup)
> > > go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too?
> > > But caution says still depend on MMU, since !CONFIG_MMU is.. different.
> > > 
> > > Signed-off-by: Hugh Dickins <hugh@veritas.com>
> > 
> > Acked-by: Matt Mackall <mpm@selenic.com>
> 
> Thanks.
> 
> > 
> > Hugh, what path do you usually take for upstreaming shmem bits and what
> > path should I take with my unify patch?
> 
> I send them to Andrew (Cc linux-kernel and/or linux-mm, erratic which,
> at best depending on what the area of interest is - there's not much
> of interest to linux-mm in the case of this unification) to get their
> airing in -mm until the next merge window.
> 
> You could do that, or were you expecting me to pick up what you had?
> We can do it that way too if you prefer: as things stood, I think
> you were intending to add a patch to remove that redundant function,
> and another to remove CONFIG_TMPFS - but I can do them if you prefer.

Yeah, I've got a few patches here. I'll send them to Andrew, cc:ed to
you and linux-kernel then.

-- 
Mathematics is the supreme nostalgia of our time.


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

* Re: [PATCH] Export tiny shmem_file_setup for DRM-GEM
  2008-10-19 11:52 [PATCH] Export tiny shmem_file_setup for DRM-GEM Hugh Dickins
  2008-10-20 18:02 ` Matt Mackall
@ 2008-10-20 20:20 ` Dave Airlie
  2008-10-20 23:04 ` Hugh Dickins
  2 siblings, 0 replies; 6+ messages in thread
From: Dave Airlie @ 2008-10-20 20:20 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Keith Packard, Eric Anholt, Nick Piggin, Matt Mackall,
	David Howells, linux-kernel

On Sun, 2008-10-19 at 12:52 +0100, Hugh Dickins wrote:
> We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without
> swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches
> to combine them).  I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup)
> go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too?
> But caution says still depend on MMU, since !CONFIG_MMU is.. different.
> 
> Signed-off-by: Hugh Dickins <hugh@veritas.com>

Acked-by: Dave Airlie <airlied@redhat.com>


> ---
> I should admit that I've not actually tested this patch,
> but can't imagine why it would be a problem: if you gobble
> up too much RAM, well, that's just life with tiny-shmem.
> 
> I did promise a patch to make read_mapping_page() return -EINVAL instead
> of oopsing when the underlying filesystem doesn't support it.  But that
> was when people were trying to persuade GEM to map files on whatever fs:
> I can't now see the point of such a patch while you're known to be on
> tmpfs or ramfs, and intending later to use a new interface from Nick.
> 
>  drivers/gpu/drm/Kconfig |    2 +-
>  mm/tiny-shmem.c         |    1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -6,7 +6,7 @@
>  #
>  menuconfig DRM
>  	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
> -	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && SHMEM
> +	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
>  	help
>  	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
>  	  introduced in XFree86 4.0. If you say Y here, you need to select
> --- a/mm/tiny-shmem.c
> +++ b/mm/tiny-shmem.c
> @@ -95,6 +95,7 @@ put_dentry:
>  put_memory:
>  	return ERR_PTR(error);
>  }
> +EXPORT_SYMBOL_GPL(shmem_file_setup);
>  
>  /**
>   * shmem_zero_setup - setup a shared anonymous mapping


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

* [PATCH] Export tiny shmem_file_setup for DRM-GEM
  2008-10-19 11:52 [PATCH] Export tiny shmem_file_setup for DRM-GEM Hugh Dickins
  2008-10-20 18:02 ` Matt Mackall
  2008-10-20 20:20 ` Dave Airlie
@ 2008-10-20 23:04 ` Hugh Dickins
  2 siblings, 0 replies; 6+ messages in thread
From: Hugh Dickins @ 2008-10-20 23:04 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, Dave Airlie, Keith Packard, Eric Anholt,
	Nick Piggin, Matt Mackall, David Howells, linux-kernel

We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without
swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches
to combine them).  I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup)
go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too?
But caution says still depend on MMU, since !CONFIG_MMU is.. different.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: Dave Airlie <airlied@redhat.com>
---

 drivers/gpu/drm/Kconfig |    2 +-
 mm/tiny-shmem.c         |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -6,7 +6,7 @@
 #
 menuconfig DRM
 	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
-	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && SHMEM
+	depends on (AGP || AGP=n) && PCI && !EMULATED_CMPXCHG && MMU
 	help
 	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
 	  introduced in XFree86 4.0. If you say Y here, you need to select
--- a/mm/tiny-shmem.c
+++ b/mm/tiny-shmem.c
@@ -95,6 +95,7 @@ put_dentry:
 put_memory:
 	return ERR_PTR(error);
 }
+EXPORT_SYMBOL_GPL(shmem_file_setup);
 
 /**
  * shmem_zero_setup - setup a shared anonymous mapping

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

end of thread, other threads:[~2008-10-20 23:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-19 11:52 [PATCH] Export tiny shmem_file_setup for DRM-GEM Hugh Dickins
2008-10-20 18:02 ` Matt Mackall
2008-10-20 18:47   ` Hugh Dickins
2008-10-20 19:38     ` Matt Mackall
2008-10-20 20:20 ` Dave Airlie
2008-10-20 23:04 ` Hugh Dickins

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