Skip to contentSkip to conversation

mmotm-2010-0428: swapper_space error

DISCUSSION Randy Dunlap 2 participants 4 messages May 1, 2010 – May 6, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

mm/built-in.o: In function `mem_cgroup_get_shmem_target':
(.text+0x1f681): undefined reference to `swapper_space'

.config attached.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#1 lore raw

sorry...

I'll re-check my build test script and prepare a patch as soon as possible.

Quoted 9 lines · Randy Dunlap

mm/built-in.o: In function `mem_cgroup_get_shmem_target':
(.text+0x1f681): undefined reference to `swapper_space'

.config attached.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#2 lore raw
Quoted 4 lines · Daisuke Nishimura

sorry...

I'll re-check my build test script and prepare a patch as soon as possible.

This is a fix for memcg-move-charge-of-file-pages.patch.

After this patch, it passed the build test for all the configs with possible combinations of SWAP, SHMEM, MEM_RES_CTLR and MEM_RES_CTLR_SWAP.

===
From: Daisuke Nishimura <[email protected]>

Build fix for !CONFIG_SWAP case.

mm/built-in.o: In function `mem_cgroup_get_shmem_target':
(.text+0xde06): undefined reference to `swapper_space'

---
 mm/shmem.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
mm/shmem.c +2 -0
index 6f183ef..6517bbd 100644
@@ -2591,10 +2591,12 @@ void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff,
 
 	spin_lock(&info->lock);
 	ptr = shmem_swp_entry(info, pgoff, NULL);
+#ifdef CONFIG_SWAP
 	if (ptr && ptr->val) {
 		entry.val = ptr->val;
 		page = find_get_page(&swapper_space, entry.val);
 	} else
+#endif
 		page = find_get_page(inode->i_mapping, pgoff);
 	if (ptr)
 		shmem_swp_unmap(ptr);
Signature · 1 line
1.6.5.2
author Acked-by
#3 lore raw
Quoted 13 lines · On Thu, 6 May 2010 14:57:58 +0900 Daisuke Nishimura wrote:
Quoted 4 lines · Daisuke Nishimura

sorry...

I'll re-check my build test script and prepare a patch as soon as possible.

This is a fix for memcg-move-charge-of-file-pages.patch.

After this patch, it passed the build test for all the configs with possible combinations of SWAP, SHMEM, MEM_RES_CTLR and MEM_RES_CTLR_SWAP.

===
From: Daisuke Nishimura <[email protected]>

Quoted 7 lines

Build fix for !CONFIG_SWAP case.

mm/built-in.o: In function `mem_cgroup_get_shmem_target':
(.text+0xde06): undefined reference to `swapper_space'

Yes, that works. Thanks.

Quoted 29 lines
---
 mm/shmem.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
mm/shmem.c +2 -0
index 6f183ef..6517bbd 100644
@@ -2591,10 +2591,12 @@ void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff,
 
 	spin_lock(&info->lock);
 	ptr = shmem_swp_entry(info, pgoff, NULL);
+#ifdef CONFIG_SWAP
 	if (ptr && ptr->val) {
 		entry.val = ptr->val;
 		page = find_get_page(&swapper_space, entry.val);
 	} else
+#endif
 		page = find_get_page(inode->i_mapping, pgoff);
 	if (ptr)
 		shmem_swp_unmap(ptr);
Signature · 7 lines
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***