mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] export swapper_space
@ 2004-05-23 22:50 James Bottomley
  2004-05-23 23:03 ` hch
  2004-05-23 23:04 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: James Bottomley @ 2004-05-23 22:50 UTC (permalink / raw)
  To: Hugh Dickins, Andrew Morton, Linus Torvalds; +Cc: Linux Kernel

This is now used as part of the page_mapping() macro.  However, certain
filesystems, such as ext3, make use of this.  If it's not exported, they
can't be compiled as modules.

James

===== mm/swap_state.c 1.77 vs edited =====
--- 1.77/mm/swap_state.c	Sat May 22 16:56:26 2004
+++ edited/mm/swap_state.c	Sun May 23 16:53:37 2004
@@ -14,6 +14,7 @@
 #include <linux/pagemap.h>
 #include <linux/buffer_head.h>
 #include <linux/backing-dev.h>
+#include <linux/module.h>
 
 #include <asm/pgtable.h>
 
@@ -38,6 +39,7 @@
 	.a_ops		= &swap_aops,
 	.backing_dev_info = &swap_backing_dev_info,
 };
+EXPORT_SYMBOL(swapper_space);
 
 #define INC_CACHE_INFO(x)	do { swap_cache_info.x++; } while (0)
 



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

* Re: [PATCH] export swapper_space
  2004-05-23 22:50 [PATCH] export swapper_space James Bottomley
@ 2004-05-23 23:03 ` hch
  2004-05-23 23:04 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: hch @ 2004-05-23 23:03 UTC (permalink / raw)
  To: James Bottomley; +Cc: Hugh Dickins, Andrew Morton, Linus Torvalds, Linux Kernel

On Sun, May 23, 2004 at 05:50:36PM -0500, James Bottomley wrote:
> This is now used as part of the page_mapping() macro.  However, certain
> filesystems, such as ext3, make use of this.  If it's not exported, they
> can't be compiled as modules.

A filesystem (except for tmpfs of course) using page_mapping() looks
like a bug to me.   I can't find ext3 using it anyway..


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

* Re: [PATCH] export swapper_space
  2004-05-23 22:50 [PATCH] export swapper_space James Bottomley
  2004-05-23 23:03 ` hch
@ 2004-05-23 23:04 ` Andrew Morton
  2004-05-23 23:12   ` James Bottomley
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2004-05-23 23:04 UTC (permalink / raw)
  To: James Bottomley; +Cc: hugh, torvalds, linux-kernel

James Bottomley <James.Bottomley@SteelEye.com> wrote:
>
> This is now used as part of the page_mapping() macro.  However, certain
> filesystems, such as ext3, make use of this.  If it's not exported, they
> can't be compiled as modules.

I'd be a bit reluctant to do this.  filesystems actually have no need for
page_mapping() - page->mapping is always correct in that context and
page_mapping() has additional overhead.  So if poss we should avoid this
export so as to force filesystems to avoid page_mapping().

parisc broke because its flush_dcache_page() is inlined, and it uses
page_mapping().  I'd suggest that parisc and arm uninline that function -
it's quite large anyway.



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

* Re: [PATCH] export swapper_space
  2004-05-23 23:04 ` Andrew Morton
@ 2004-05-23 23:12   ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2004-05-23 23:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: hugh, Linus Torvalds, Linux Kernel

On Sun, 2004-05-23 at 18:04, Andrew Morton wrote:
> I'd be a bit reluctant to do this.  filesystems actually have no need for
> page_mapping() - page->mapping is always correct in that context and
> page_mapping() has additional overhead.  So if poss we should avoid this
> export so as to force filesystems to avoid page_mapping().
> 
> parisc broke because its flush_dcache_page() is inlined, and it uses
> page_mapping().  I'd suggest that parisc and arm uninline that function -
> it's quite large anyway.

You mean our fast path for flush_dcache_page

static inline void flush_dcache_page(struct page *page)
{
        struct address_space *mapping = page_mapping(page);

        if (mapping && !mapping_mapped(mapping)) {
                set_bit(PG_dcache_dirty, &page->flags);
        } else {
                __flush_dcache_page(page);
        }
}

Yes, that's the culprit...I suppose we could uninline it.

James



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

end of thread, other threads:[~2004-05-23 23:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-23 22:50 [PATCH] export swapper_space James Bottomley
2004-05-23 23:03 ` hch
2004-05-23 23:04 ` Andrew Morton
2004-05-23 23:12   ` James Bottomley

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

all inboxes | Powered by JetHome®